[pve-devel] [PATCH qemu-server] Starting a running VM does not return an error

Daniel Tschlatscher d.tschlatscher at proxmox.com
Mon Mar 21 10:33:08 CET 2022


 code anymore This was adapted to match the behaviour of stopping a VM that's
 already stopped and the new container patches.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher at proxmox.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6a9f6b3..8d82b6f 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5346,7 +5346,7 @@ sub vm_start {
 
 	$params->{resume} = $has_suspended_lock || defined($conf->{vmstate});
 
-	die "VM $vmid already running\n" if $running;
+	return if $running;
 
 	if (my $storagemap = $migrate_opts->{storagemap}) {
 	    my $replicated = $migrate_opts->{replicated_volumes};
-- 
2.30.2






More information about the pve-devel mailing list