[pve-devel] [PATCH 4/9] add qemu_objectadd|del sub
Alexandre Derumier
aderumier at odiso.com
Fri Jan 16 11:00:56 CET 2015
used to add|dell qom objects
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuServer.pm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 464aefa..028b211 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3296,6 +3296,22 @@ sub qemu_devicedel {
my $ret = vm_mon_cmd($vmid, "device_del", id => $deviceid);
}
+sub qemu_objectadd {
+ my($vmid, $objectid, $qomtype) = @_;
+
+ vm_mon_cmd($vmid, "object-add", id => $objectid, "qom-type" => $qomtype);
+
+ return 1;
+}
+
+sub qemu_objectdel {
+ my($vmid, $objectid) = @_;
+
+ vm_mon_cmd($vmid, "object-del", id => $objectid);
+
+ return 1;
+}
+
sub qemu_driveadd {
my ($storecfg, $vmid, $device) = @_;
--
1.7.10.4
More information about the pve-devel
mailing list