]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
refactor: vm_qmp_command was moved to PVE::QemuServer::Monitor
authorStefan Reiter <s.reiter@proxmox.com>
Tue, 19 Nov 2019 11:23:50 +0000 (12:23 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Nov 2019 17:25:33 +0000 (18:25 +0100)
Also change to mon_cmd helper, avoid calling qmp_cmd directly.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
src/PVE/HA/Resources/PVEVM.pm

index aad073d66f1d3857c020a99ae7989cdf04670fde..ab9e27141e312e2ea574207d929abc441127b99e 100644 (file)
@@ -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 $@;