What is best way to migrate VM and CT between storages? Web interface allows only migrate between cluster nodes. In such case it will migrate to same storage. But if we want to migrate between node1/storage2 to node2/storage1 or even same node node1/storage1 to node1/storage2 then there isn't such option to select destination storage in migration form.
Maybe there is such possibility using CLI. But at least pct command seems to be not supported such parameter:
USAGE: pct migrate <vmid> <target> [OPTIONS]
Migrate the container to another node. Creates a new migration task.
<vmid> integer (1 - N)
The (unique) ID of the VM.
<target> string
Target node.
-online boolean
Use online/live migration.
So maybe only "official" way is to do backup => scp image to another node => pct restore -storage storage_name. Or for local move just do backup and restore to different storage locally.
As LXC containers root filesystem is located in single file then it should be simple to move file to different storage and then update CT configuration (rootfs parameter in /etc/pve/lxc/vmid.conf) manually.
But it would be better to have such useful option also in web interface.
Maybe there is such possibility using CLI. But at least pct command seems to be not supported such parameter:
USAGE: pct migrate <vmid> <target> [OPTIONS]
Migrate the container to another node. Creates a new migration task.
<vmid> integer (1 - N)
The (unique) ID of the VM.
<target> string
Target node.
-online boolean
Use online/live migration.
So maybe only "official" way is to do backup => scp image to another node => pct restore -storage storage_name. Or for local move just do backup and restore to different storage locally.
As LXC containers root filesystem is located in single file then it should be simple to move file to different storage and then update CT configuration (rootfs parameter in /etc/pve/lxc/vmid.conf) manually.
But it would be better to have such useful option also in web interface.