]> git.proxmox.com Git - qemu-server.git/commitdiff
qm agent : check if qga service is running
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 28 May 2018 15:36:29 +0000 (17:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 30 May 2018 05:23:39 +0000 (07:23 +0200)
PVE/API2/Qemu/Agent.pm

index 9af5d5fa547d393fc325bf8453fee77e1c37a1f7..fbc8105b94d80f92de239b4d64c3504eb2814428 100644 (file)
@@ -174,6 +174,7 @@ sub register_command {
 
            die "No Qemu Guest Agent\n" if !defined($conf->{agent});
            die "VM $vmid is not running\n" if !PVE::QemuServer::check_running($vmid);
+           die "Qemu Guest Agent is not running\n" if !PVE::QemuServer::qga_check_running($vmid);
 
            my $cmd = $param->{command} // $command;
            my $res = PVE::QemuServer::vm_mon_cmd($vmid, "guest-$cmd");