mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 15:34:11 +00:00
PVE/API2/Qemu.pm: aquire guest_migration_lock inside worker
This commit is contained in:
parent
c068c1c3a9
commit
f53c6ad8b9
@ -2857,17 +2857,17 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
my $code = sub {
|
my $realcmd = sub {
|
||||||
my $realcmd = sub {
|
my $upid = shift;
|
||||||
my $upid = shift;
|
|
||||||
|
|
||||||
PVE::QemuMigrate->migrate($target, $targetip, $vmid, $param);
|
PVE::QemuMigrate->migrate($target, $targetip, $vmid, $param);
|
||||||
};
|
|
||||||
|
|
||||||
return $rpcenv->fork_worker('qmigrate', $vmid, $authuser, $realcmd);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return PVE::GuestHelpers::guest_migration_lock($vmid, 10, $code);
|
my $worker = sub {
|
||||||
|
return PVE::GuestHelpers::guest_migration_lock($vmid, 10, $realcmd);
|
||||||
|
};
|
||||||
|
|
||||||
|
return $rpcenv->fork_worker('qmigrate', $vmid, $authuser, $worker);
|
||||||
}
|
}
|
||||||
|
|
||||||
}});
|
}});
|
||||||
|
Loading…
Reference in New Issue
Block a user