Creating or converting a VM to LXC

Paulo F. Santos

New Member
Aug 4, 2022
2
1
3
Olá Dev's, queria saber se é possível transformar uma VM em LXC? Se não, como posso criar um LXC com um sistema operacional (por exemplo, Oracle Linux)? Então, se eu puder montá-lo, disponibilizá-lo para a comunidade?
 
Google Translate:
Hello Dev's, I wanted to know if it is possible to turn a VM into LXC? If not, how can I create an LXC with an operating system (e.g. Oracle Linux)? So if I can assemble it, make it available to the community?
It's not a PVE question per-se, yet it works perfectly fine. The easiest steps would be:
  • boot a live linux inside of your VM
  • tar the filesystem and store it "outside" of the VM and compress it with e.g. gzip
  • use this file as a template for creating an LX(C) container
This is the easiest method, not the best. I would then further optimize it by removing stuff like kernel, grub and everything else boot related (e.g. efi stuff).

I'm running a couple of Oracle Linux VMs in various setup (e.g. including oracle database) for quick tests.

Here a couple of other threads about this:
https://forum.proxmox.com/threads/custom-lxc-templates.28832/post-144890
https://forum.proxmox.com/threads/proxmox-lxc-container-template-configuration.108071/post-464470
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!