mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-04 19:45:52 +00:00
try to detect errors before starting the background task
This commit is contained in:
parent
15f231e1c7
commit
a5ed42d347
@ -1216,9 +1216,12 @@ __PACKAGE__->register_method({
|
||||
if $param->{force} && $user ne 'root@pam';
|
||||
|
||||
# test if VM exists
|
||||
PVE::QemuServer::load_config($vmid);
|
||||
my $conf = PVE::QemuServer::load_config($vmid);
|
||||
|
||||
# try to detect errors early
|
||||
|
||||
PVE::QemuServer::check_lock($conf);
|
||||
|
||||
if (PVE::QemuServer::check_running($vmid)) {
|
||||
die "cant migrate running VM without --online\n"
|
||||
if !$param->{online};
|
||||
|
Loading…
Reference in New Issue
Block a user