]> git.proxmox.com Git - qemu-server.git/commit
Include vmstate and unused volumes in foreach_volid
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 16 Apr 2020 12:54:43 +0000 (14:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Apr 2020 10:14:40 +0000 (12:14 +0200)
commitae180b8f08b6637a5d712ef296205cf93a653939
treefb0356c05184829e2434c71081fa1fb7b0df9dbd
parentb24f07d406d8bcb9494eceddaf52d846f31d5e9d
Include vmstate and unused volumes in foreach_volid

and refactor the test_volid closure. Like this get_replicatable_volumes doesn't
need a separate loop for unused volumes anymore. For get_vm_volumes, which is used
for activation/deactivation of volumes at migration and deactivation in vm_stop_cleanup,
includes those volumes now. For migration it's an improvement, because those volumes
might need to be migrated and for vm_stop_cleanup it shouldn't hurt. The last user
of foreach_volid is check_vm_disks_local used by migrate_vm_precondition,
where information about the additional volumes doesn't hurt either.

Note that replicate is (still) set by default, so the behavior for
get_replicatable_volumes for unused volumes should not change.

Hibernation vmstate files are now also included and recognized as 'is_vmstate'.
The 'size' attribute will not be overwritten by subsequent iterations for the
same volid anymore (a volid may appear both in the config and in snapshots),
so the size from the current config is now preferred.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuConfig.pm
PVE/QemuMigrate.pm
PVE/QemuServer.pm