When trying to use a different method of migration, publishing the image/snap I get this:
kumo2:~$ lxc publish ansible/snap0 --alias ansible-image
Error: Failed getting disk path: Could not locate a zvol for DATA1/virtual-machines/ansible.block@snapshot-snap0
That message about the storage at the source LXD host concerns me…
Here is what I see on the source LXD host profile:
Thank you for the update, as you can see in the start of this thread I shared the context:
CONTEXT:
LXD host: kumo2
lxc-vm to migrate: ansible
Version: 5.2-79c3c3b
Storage:
kumo2:~$ lxc storage list
±------±-------±-----------------------------------------±------------±--------±--------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
±------±-------±-----------------------------------------±------------±--------±--------+
| DATA1 | zfs | /var/snap/lxd/common/lxd/disks/DATA1.img | | 4 | CREATED |
±------±-------±-----------------------------------------±------------±--------±--------+
LXD host: lxc1
Version: 5.2-79c3c3b
Storage:
lxc1:~$ lxc storage list
±------±-------±-------±------------±--------±--------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
±------±-------±-------±------------±--------±--------+
| RAID1 | zfs | RAID1 | | 9 | CREATED |
±------±-------±-------±------------±--------±--------+
I am not sure about that error message I am getting on the destination LXD host:
kumo2:~$ lxc publish ansible/snap0 --alias ansible-image
Error: Failed getting disk path: Could not locate a zvol for DATA1/virtual-machines/ansible.block@snapshot-snap0
I am also in irc.libera.chat willing to investigate and troubleshoot, this might be related to the way the storage pool is created on my LXD hosts?
Remove the full configuration of LXD from the Ubuntu 20.04 LXD host and convert the host to a container using p2c tool.
I am trying to migrate the lxc VM out of that host and concert the host from LDX host into a normal Ubtuntu 20.04 lxc container, and then re-install Ubuntu 24.04 LTS in that box.
I may end up backing up the whole server including the lxc VM or try to convert it into a lxc container with a nested LXD configuration and lxc VM running in it.
Alright, I will try the lxc export method first, but I believe that is what I tried and got different errors I listed on the thread. I will then upgrade both LXD servers and try again.
This is the error I get when trying to export the lxc VM in the source LXD host:
kumo2:~$ lxc export ansible ansible.tar.gz
Error: Create backup: Backup create: Error getting VM block volume disk path: Could not locate a zvol for DATA1/virtual-machines/ansible.block@snapshot-snap0
I will go with the snap refresh option and try the first method of:
LXD VM container migration using LXD API and Simplestreams
Snapshots:
±------±---------------------±-----------±---------+
| NAME | TAKEN AT | EXPIRES AT | STATEFUL |
±------±---------------------±-----------±---------+
| snap0 | 2022/06/13 09:06 JST | | NO |
±------±---------------------±-----------±---------+
kumo2:~$ lxc storage volume ls DATA1 | grep ansible
kumo2:~$ lxc export ansible ansible.tar.gz
Error: Create backup: Backup create: Error getting VM block volume disk path: Could not locate a zvol for DATA1/virtual-machines/ansible.block@snapshot-snap0
Can you try rebooting that machine and trying again, I want to rule out an issue with the mount namespace inside the snap becoming out of sync with the host.
To answer your question about physical machine migration, there is a tool called lxd-migrate that you run on the machine/VM you want to migrate into LXD and specify the address of a LXD server that is configured to listen on the network.
I am still waiting for the export to complete before I attempt the migration following the LXD API method, and if that fails I will report the outcome here, and try to import the exported lxc VM into the destination LXD host manually.
I will keep you posted, and thank you for the references, those are really useful!