we need to remove drive after device has correctly by remove.
With this patch:
Windows : if drive is locked/"mounted", the hot-unplug fail and disk is accessible (100% safe)
Linux: without hotplug module : the hot-unplug fail and disk is accessible (100% safe)
Linux : with hotplug module : the hot-unplug work, but no verification is done is the drive is mounted
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Currently we delete netdev before acpi hot-unplug.
if guest don't support hotplug, this break network.
We need to remove netdev after the device had be correctly unplug.(we check that device has been correctly removed)
So, If guest don't support hotplug, It's simply thrown a unplug error message without breaking the network
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
- usb-tablet on ehci is buggy
- convert to -device syntax
info usb before
----------------
Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
info usb after
--------------
Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
we need an id to allow hotplug
info pci before
---------------
Bus 0, device 1, function 2:
USB controller: PCI device 8086:7020
IRQ 11.
BAR4: I/O at 0xc040 [0xc05f].
id ""
info pci after
--------------
Bus 0, device 1, function 2:
USB controller: PCI device 8086:7020
IRQ 11.
BAR4: I/O at 0xc040 [0xc05f].
id "uhci"
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
if files (raw,qcow2) are a template, we forbid vm_start.
note : the readonly protection do already the job, but we need a clear message for users
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
if a qcow2 current is a template, we can't rollback to a previous snapshot.
(note that file readonly protection do already the job, but we need a clear error message for user)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
return 1 if vm is a full template (all disks are base image)
return 2 if vm is a semi-tempalte (mix of base and non-base image)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
qm template <vmid> [-disk virtio0]
convert a full vm to a template (or only a disk if specify)
we orignal disk to /base (file) or base- (lvm,rbd,sheepdog,nexenta)
we create a snapshot @base if storage need it for clone
we protect the volume or snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
We don't need to set balloon value and polling interval when a vm is coming from a livemigrate.
(Values are keep in guest memory)
So with autoballooning, this avoid to set the ballon size at ballon_min value when the vm is migrated
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>