Hello,
I have three VMs created using the LXD GUI. I want to convert them to containers. I dont want to lose any data. Just change the type. Is there any easy way to do it?
Thanks in advance.
Hello,
I have three VMs created using the LXD GUI. I want to convert them to containers. I dont want to lose any data. Just change the type. Is there any easy way to do it?
Thanks in advance.
Hi. There is no easy way if doing that. I recommend creating the instance again as a container and copying the data into it.
By the way, we do not support LXD on this forum. If you are interested in the forum, please migrate to Incus. We can help if needed.
Perhaps incus-migrate
could be used here?
You would need to
0. migrate to Incus,
incus-extra
in the VM so that you have incus-migrate
,incus
commands in the VM and get proper output from within that said VM).sudo incus-migrate
and follow the instructions. It would take the current filesystem in the VM and convert it into a container on your Incus setup on the host.(haven’t tried this, though it should be simple to test before doing the actual migration).
I tried this and it worked with a test Incus VM.