[pve-devel] [PATCH 03/14] add vm_mon_cmd and vm_mon_cmd_nocheck wrapper

Alexandre Derumier aderumier at odiso.com
Mon Jun 25 10:02:47 CEST 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index ee5fb24..b41f1f6 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2824,6 +2824,24 @@ sub vm_monitor_command {
     return $res;
 }
 
+sub vm_mon_cmd {
+    my ($vmid, $execute, %params) = @_;
+
+    my $cmd = {};
+    $cmd->{execute} = $execute;
+    $cmd->{arguments} = \%params;
+    vm_qmp_command($vmid,$cmd);
+}
+
+sub vm_mon_cmd_nocheck {
+    my ($vmid, $execute, %params) = @_;
+
+    my $cmd = {};
+    $cmd->{execute} = $execute;
+    $cmd->{arguments} = \%params;
+    vm_qmp_command($vmid,$cmd,1);
+}
+
 sub vm_qmp_command {
     my ($vmid, $cmd, $nocheck) = @_;
 
-- 
1.7.2.5




More information about the pve-devel mailing list