]>
git.proxmox.com Git - qemu-server.git/blob - PVE/QemuServer/QMPHelpers.pm
1 package PVE
::QemuServer
::QMPHelpers
;
6 use PVE
::QemuServer
::Monitor
qw(mon_cmd);
18 my ($vmid, $devicefull) = @_;
20 $devicefull = "driver=".$devicefull;
21 my %options = split(/[=,]/, $devicefull);
23 mon_cmd
($vmid, "device_add" , %options);
27 my ($vmid, $deviceid) = @_;
29 my $ret = mon_cmd
($vmid, "device_del", id
=> $deviceid);
33 my ($vmid, $objectid, $qomtype) = @_;
35 mon_cmd
($vmid, "object-add", id
=> $objectid, "qom-type" => $qomtype);
41 my ($vmid, $objectid) = @_;
43 mon_cmd
($vmid, "object-del", id
=> $objectid);