I have a number of "tar" files created from an old proxmox 6 server, using the vzdump tool.
The person that originally created them has left the company, and the company has changed it's container server from "Proxmox VE" to a standard Linux Ubuntu 20.04 LTS server running the latest version of LXD for it's container system.
I've now been asked if I can take these Vzdump tar files, and turn them into regular standard LXC based deployments running on the new server.
Every search I do seems to ONLY turn up converting bare bones LXC containers to Proxmox VE containers, and asking in the proxmox forums is getting me no where, because all they want to do is get me back onto proxmox, which my client no longer wishes to use.
I can vzrestore onto the new server, but the meta data in the containers is not compatible with LXD/LXC so that's proven to be a dead end so far.
In the same vein, I've also tried converting the container to an LXC template image, and building from that, but again, that's not worked as I'd hoped.
So after 2 weeks of research and reading many, many blog posts, I finally figured out how to do it.
It's not particularly staright forward, but it's not rocket science either, I do however get the feeling (and the hostility) from asking in the proxmox forums that they would rather you didn't move away from the proxmox platform, temporary or otherwise.
Anyway, the steps you need to follow are essentially
at the proxmox command line, "pct list" to get the ID of the container you want to copy.
at the same command line "vzdump -compress gzip -dumpdir /tmp" , you don't need the dump dir parameter, but the default is nested a stupid amount of folders deep, so I'd advise to use the tmp dir for easiness.
you then need to create a "meta data file" using the following commands (Please NOTE: the # symbols need to be changed to BACKTICKS before you copy and paste/use the command, I've had to use the # symbol as markdown in a SO post cannot display the backtick symbol due to the way markdown uses it) :
Move the ".tar.gz" files that you created, across to the target machine running a modern version of LXD, I used rsync for this.
ON the command line of your LXD machine, use the following command to import the metadata and dump file into an lxc image:
sudo lxc image import metadata.tar.gz <vzdump name>.tar.gz
This will import the container as an image, which is not directly runnable, type
and get the fingerprint of the image you just created
still at the LXD command line, using the fingerprint from your image use:
lxc launch <fingerprint> <name you want to give your container>
At this point, you'll have a new container, that is an exact duplicate of your original proxmox one running.
What you may not have are the same network settings however. For me, I have everything on my network running off of DHCP, including the static leases, so it was important that my new containers had the same MAC address, that was easily done by using
on the proxmox cli to display the hardware configuration, then copy and pasting the MAC address from that, followed by
If your DHCP static leases are driven from the mac address, then this will ensure that they get the same IP address, as long as your LXD host is set up to bridge IP's on the same network as your original proxmox host.
I've written a blog post which can be found at : https://shawtyds.wordpress.com/2021/11/16/converting-containers-from-proxmox-ve-back-to-plain-old-lxd-lxc/ that goes into a little more detail.
Once your copied container is running, then it's just a matter of using lxc to delete the temporary image (unless you want to keep it) and to erase the ".tar.gz" files from both servers, and possibly removing the old container from proxmox if you no longer need it.