mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-05 08:41:39 +00:00
clone: correctly activate volumes (consider snapshots)
This commit is contained in:
parent
17b9763dcd
commit
eb15b9f074
@ -2281,7 +2281,7 @@ __PACKAGE__->register_method({
|
|||||||
eval {
|
eval {
|
||||||
local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = sub { die "interrupted by signal\n"; };
|
local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = sub { die "interrupted by signal\n"; };
|
||||||
|
|
||||||
PVE::Storage::activate_volumes($storecfg, $vollist);
|
PVE::Storage::activate_volumes($storecfg, $vollist, $snapname);
|
||||||
|
|
||||||
foreach my $opt (keys %$drives) {
|
foreach my $opt (keys %$drives) {
|
||||||
my $drive = $drives->{$opt};
|
my $drive = $drives->{$opt};
|
||||||
@ -2299,7 +2299,7 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
if ($target) {
|
if ($target) {
|
||||||
# always deactivate volumes - avoid lvm LVs to be active on several nodes
|
# always deactivate volumes - avoid lvm LVs to be active on several nodes
|
||||||
PVE::Storage::deactivate_volumes($storecfg, $vollist);
|
PVE::Storage::deactivate_volumes($storecfg, $vollist, $snapname);
|
||||||
|
|
||||||
my $newconffile = PVE::QemuServer::config_file($newid, $target);
|
my $newconffile = PVE::QemuServer::config_file($newid, $target);
|
||||||
die "Failed to move config to node '$target' - rename failed: $!\n"
|
die "Failed to move config to node '$target' - rename failed: $!\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user