[pve-devel] [PATCH 8/8] re-add virtio disk hotplug/unplug
Derumier Alexandre
aderumier at odiso.com
Fri Dec 23 08:09:48 CET 2011
Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
PVE/QemuServer.pm | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 610a7f2..184331f 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2296,6 +2296,14 @@ sub vm_deviceplug {
qemu_deviceadd($vmid,$devicefull);
}
+ if($deviceid =~ m/^(virtio)(\d+)$/) {
+ qemu_driveadd($storecfg, $vmid, $device);
+ my $devicefull = print_drivedevice_full($storecfg, $vmid, $device);
+ qemu_deviceadd($vmid,$devicefull);
+ qemu_deviceaddverify($vmid,$deviceid);
+ }
+
+
}
sub vm_deviceunplug {
@@ -2310,6 +2318,12 @@ sub vm_deviceunplug {
qemu_drivedel($vmid,$deviceid);
}
+ if($deviceid =~ m/^(virtio)(\d+)$/) {
+ qemu_drivedel($vmid,$deviceid);
+ qemu_devicedel($vmid,$deviceid);
+ qemu_devicedelverify($vmid,$deviceid);
+ }
+
}
--
1.7.2.5
More information about the pve-devel
mailing list