]> git.proxmox.com Git - qemu-server.git/commit
migration: only migrate disks used by the guest
authorAaron Lauterer <a.lauterer@proxmox.com>
Mon, 19 Jun 2023 09:29:30 +0000 (11:29 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Wed, 21 Jun 2023 10:48:11 +0000 (12:48 +0200)
commita0dbed5a6de33ae328635454a6b3ebcbd1f8a0d6
treebbc4d9dc7f03dc0d28ad88fb6100ed23488716f7
parent0b7a0b78db9ff3a50ce4c82c1f5dd1b21ece8d21
migration: only migrate disks used by the guest

When scanning all configured storages for disk images belonging to the
VM, the migration could easily fail if a storage is not available, but
enabled. That storage might not even be used by the VM at all.

By not scanning all storages and only looking at the disk images
referenced in the VM config, we can avoid unnecessary failures.
Some information that used to be provided by the storage scanning needs
to be fetched explicilty (size, format).

Behaviorally the biggest change is that unreferenced disk images will
not be migrated anymore. Only images referenced in the config will be
migrated.

The tests have been adapted accordingly.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
PVE/QemuMigrate.pm
test/MigrationTest/QemuMigrateMock.pm
test/run_qemu_migrate_tests.pl