Creating or converting a VM to LXC

Aug 4, 2022
3
1
8
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
 
  • Like
Reactions: Paulo F. Santos
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
Hello LnxBil
Thanks for the information.
Have you experienced any difficulties using Oracle Linux (such as running Oracle DB)?