fix: only check the disk write lock if there is no PID for the VM
This commit is contained in:
parent
1ae4af6244
commit
58599a98ab
2
quickemu
2
quickemu
|
@ -662,7 +662,7 @@ function vm_boot() {
|
||||||
fi
|
fi
|
||||||
echo " Just created, booting from ${iso}${img}"
|
echo " Just created, booting from ${iso}${img}"
|
||||||
DISK_USED="no"
|
DISK_USED="no"
|
||||||
elif [ -e "${disk_img}" ]; then
|
elif [ -e "${disk_img}" ] && [ -z "${VM_PID}" ]; then
|
||||||
# Check there isn't already a process attached to the disk image.
|
# Check there isn't already a process attached to the disk image.
|
||||||
if ! ${QEMU_IMG} info "${disk_img}" >/dev/null; then
|
if ! ${QEMU_IMG} info "${disk_img}" >/dev/null; then
|
||||||
echo " Failed to get \"write\" lock. Is another process using the disk?"
|
echo " Failed to get \"write\" lock. Is another process using the disk?"
|
||||||
|
|
Loading…
Reference in New Issue