[pve-devel] [PATCH qemu-server 1/1] change task name for suspend with and without disk

Dominik Csapak d.csapak at proxmox.com
Fri Mar 29 10:44:31 CET 2019


so that we can differentiate in the gui

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 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





More information about the pve-devel mailing list