From cf1b7ebe1f8b0e0fab21423239d84c8defd515b6 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 27 Apr 2016 15:12:15 +0200 Subject: [PATCH] Raise error if qemu can not create backing image --- gns3server/modules/qemu/qemu_vm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gns3server/modules/qemu/qemu_vm.py b/gns3server/modules/qemu/qemu_vm.py index 280b7a0f..1992c30f 100644 --- a/gns3server/modules/qemu/qemu_vm.py +++ b/gns3server/modules/qemu/qemu_vm.py @@ -1261,6 +1261,8 @@ class QemuVM(BaseVM): "backing_file={}".format(disk_image), "-f", "qcow2", disk) 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)) except (OSError, subprocess.SubprocessError) as e: raise QemuError("Could not create {} disk image {}".format(disk_name, e))