]> git.proxmox.com Git - pve-container.git/commit - src/PVE/LXC/Migrate.pm
migration: only migrate volumes used by the guest
authorAaron Lauterer <a.lauterer@proxmox.com>
Mon, 19 Jun 2023 09:29:35 +0000 (11:29 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Mon, 19 Jun 2023 12:09:49 +0000 (14:09 +0200)
commitd87a7431dc2dab28398573ab5e9668efa77683df
treeb3a8654b7b7530ed5b6b955845807fde974e1a86
parentf3f80e36518684a03ae873a350a70c6f864885c8
migration: only migrate volumes used by the guest

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

By not doing that and only looking at the disk images referenced in the
config, we can avoid that.
We need to add additional steps for pending volumes with checks if they
actually exist. Changing an existing mountpoint to a new volume
will only create the volume on the next start of the container.

The big change regarding behavior is that volumes not referenced in the
container config will be ignored.  They are already orphans that used to
be migrated as well, but are now left where they are.

Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
src/PVE/LXC/Migrate.pm