Also change to mon_cmd helper, avoid calling qmp_cmd directly.

Signed-off-by: Stefan Reiter <s.rei...@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


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to