]> git.proxmox.com Git - qemu-server.git/commit
migration: alloc nbd disks: fix fall-back for remote live migration
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 17 Jul 2023 14:00:20 +0000 (16:00 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 27 Jul 2023 08:05:20 +0000 (10:05 +0200)
commit0d4e8cbde08dd272bcf91318fe67845a58712bec
treec5f03915a90fe91e8749ebf821aa1951b7da0b7b
parent8056ee3030385da07c3334305ad2afc767348963
migration: alloc nbd disks: fix fall-back for remote live migration

While the comment sated
>    # order of precedence, filtered by whether storage supports it:
>    # 1. explicit requested format
>    # 2. format of current volume
>    # 3. default format of storage

the code did not fall back to the default format in the case of remote
migration, because the format was already set and the code used
> $format //= $defFormat;

This made remote migration from dir with qcow2 to e.g. LVM-thin fail.

Move extracting the format from the volume name to the call side for
local migration. This allows the logic here to be much simpler.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/API2/Qemu.pm
PVE/QemuServer.pm