mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 22:53:08 +00:00
disk reassign: fix assigning to unused slot
this broke with the previous simplification. Tested-by: Aaron Lauterer <a.lauterer@proxmox.com> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
a6273aa8bf
commit
f4e4c77984
@ -3554,10 +3554,17 @@ __PACKAGE__->register_method({
|
|||||||
if PVE::QemuServer::check_running($vmid) && $disk !~ m/^unused\d+$/;
|
if PVE::QemuServer::check_running($vmid) && $disk !~ m/^unused\d+$/;
|
||||||
|
|
||||||
# now re-parse using target disk slot format
|
# now re-parse using target disk slot format
|
||||||
|
if ($target_disk =~ /^unused\d+$/) {
|
||||||
|
$drive = PVE::QemuServer::parse_drive(
|
||||||
|
$target_disk,
|
||||||
|
$source_volid,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
$drive = PVE::QemuServer::parse_drive(
|
$drive = PVE::QemuServer::parse_drive(
|
||||||
$target_disk,
|
$target_disk,
|
||||||
$source_conf->{$disk},
|
$source_conf->{$disk},
|
||||||
);
|
);
|
||||||
|
}
|
||||||
die "failed to parse source disk for target disk format - $@\n" if !$drive;
|
die "failed to parse source disk for target disk format - $@\n" if !$drive;
|
||||||
|
|
||||||
my $repl_conf = PVE::ReplicationConfig->new();
|
my $repl_conf = PVE::ReplicationConfig->new();
|
||||||
|
Loading…
Reference in New Issue
Block a user