From 9df5cbcc707b545848d4be865a1c08a2256fd74c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 13 Jul 2012 07:30:13 +0200 Subject: [PATCH] implement vm_human_monitor_command using qmp --- PVE/QemuServer.pm | 13 +++++++++++++ qm | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 4927cc87..81147b5b 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2819,6 +2819,19 @@ sub vm_qmp_command { return $res; } +sub vm_human_monitor_command { + my ($vmid, $cmdline) = @_; + + my $res; + + my $cmd = { + execute => 'human-monitor-command', + arguments => { 'command-line' => $cmdline}, + }; + + return vm_qmp_command($vmid, $cmd); +} + sub vm_commandline { my ($storecfg, $vmid) = @_; diff --git a/qm b/qm index 044bc21d..b5b35dea 100755 --- a/qm +++ b/qm @@ -294,7 +294,7 @@ __PACKAGE__->register_method ({ last if $input =~ m/^\s*q(uit)?\s*$/; eval { - print PVE::QemuServer::vm_monitor_command ($vmid, $input); + print PVE::QemuServer::vm_human_monitor_command ($vmid, $input); }; print "ERROR: $@" if $@; }