This is needed so that qemu process really releases the
corresponding file descriptor and thus we can dmsetup/lvremove
the device without errors.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
kvm_device = _RUNTIME_DEVICE[dev_type](entry)
kvm_devid = _GenerateDeviceKVMId(dev_type, kvm_device)
if dev_type == constants.HOTPLUG_TARGET_DISK:
- command = "device_del %s" % kvm_devid
+ command = "device_del %s\n" % kvm_devid
+ command += "drive_del %s" % kvm_devid
elif dev_type == constants.HOTPLUG_TARGET_NIC:
command = "device_del %s\n" % kvm_devid
command += "netdev_del %s" % kvm_devid