mirror of
https://github.com/GNS3/gns3-server
synced 2025-08-01 11:28:12 +00:00
Raise error if qemu can not create backing image
This commit is contained in:
parent
1d08d4a5fa
commit
cf1b7ebe1f
@ -1261,6 +1261,8 @@ class QemuVM(BaseVM):
|
|||||||
"backing_file={}".format(disk_image),
|
"backing_file={}".format(disk_image),
|
||||||
"-f", "qcow2", disk)
|
"-f", "qcow2", disk)
|
||||||
retcode = yield from process.wait()
|
retcode = yield from process.wait()
|
||||||
|
if retcode is not None and retcode != 0:
|
||||||
|
raise QemuError("Could not create {} disk image".format(disk_name))
|
||||||
log.info("{} returned with {}".format(qemu_img_path, retcode))
|
log.info("{} returned with {}".format(qemu_img_path, retcode))
|
||||||
except (OSError, subprocess.SubprocessError) as e:
|
except (OSError, subprocess.SubprocessError) as e:
|
||||||
raise QemuError("Could not create {} disk image {}".format(disk_name, e))
|
raise QemuError("Could not create {} disk image {}".format(disk_name, e))
|
||||||
|
Loading…
Reference in New Issue
Block a user