[pve-devel] [PATCH v4 ha-manager 7/8] refactor: vm_qmp_command was moved to PVE::QemuServer::Monitor

Stefan Reiter s.reiter at proxmox.com
Tue Nov 19 12:23:50 CET 2019


Also change to mon_cmd helper, avoid calling qmp_cmd directly.

Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---

Requires a depends on qemu-server.

 src/PVE/HA/Resources/PVEVM.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/HA/Resources/PVEVM.pm b/src/PVE/HA/Resources/PVEVM.pm
index aad073d..ab9e271 100644
--- a/src/PVE/HA/Resources/PVEVM.pm
+++ b/src/PVE/HA/Resources/PVEVM.pm
@@ -11,6 +11,8 @@ BEGIN {
 	import  PVE::QemuConfig;
 	require PVE::QemuServer;
 	import  PVE::QemuServer;
+	require PVE::QemuServer::Monitor;
+	import  PVE::QemuServer::Monitor;
 	require PVE::API2::Qemu;
 	import  PVE::API2::Qemu;
     }
@@ -134,7 +136,7 @@ sub check_running {
 	my $conf = PVE::QemuConfig->load_config($vmid, $nodename);
 	if (defined($conf->{lock}) && $conf->{lock} eq 'backup') {
 	    my $qmpstatus = eval {
-		PVE::QemuServer::vm_qmp_command($vmid, { execute => 'query-status' })
+		PVE::QemuServer::Monitor::mon_cmd($vmid, 'query-status')
 	    };
 	    warn "$@\n" if $@;
 
-- 
2.20.1





More information about the pve-devel mailing list