so that we can differentiate in the gui

Signed-off-by: Dominik Csapak <[email protected]>
---
 PVE/API2/Qemu.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 99e37d8..4093720 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2390,6 +2390,8 @@ __PACKAGE__->register_method({
        die "Cannot suspend HA managed VM to disk\n"
            if $todisk && PVE::HA::Config::vm_is_ha_managed($vmid);
 
+       my $taskname = $todisk ? 'qmsuspend' : 'qmpause';
+
        my $realcmd = sub {
            my $upid = shift;
 
@@ -2400,7 +2402,7 @@ __PACKAGE__->register_method({
            return;
        };
 
-       return $rpcenv->fork_worker('qmsuspend', $vmid, $authuser, $realcmd);
+       return $rpcenv->fork_worker($taskname, $vmid, $authuser, $realcmd);
     }});
 
 __PACKAGE__->register_method({
-- 
2.11.0


_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to