[pve-devel] [PATCH v3 ha-manager 7/8] refactor: vm_qmp_command was moved to PVE::QemuServer::Monitor
Stefan Reiter
s.reiter at proxmox.com
Mon Nov 4 14:57:32 CET 2019
Also change to mon_cmd helper, avoid calling qmp_cmd directly.
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
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 0a37cf6..70bf8ad 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;
}
@@ -128,7 +130,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