Convert a Linux VM into a Linux Container

,

Hello,

I want to convert a virtual machine into a container. Is there any tutorial how to do that. AI doesn’t seem to know much about Incus, it either tells me it’s not possible or to use commands like “incus convert” which doesn’t exist.

Almost a year ago there was this thread: How to convert VM to container?

It gives some very brief steps what to do, but I’m completely new to Incus, so that is much to little detail for me, can someone either point me to a tutorial or give me a bit more details?

Host: Debian 13 with Incus LTS from zabbly repository
VM: Appliance based on OpenSUSE 15.6, installed from iso

Best regards
Stefan

Start here, it’s pretty clear:

Note that “The tool can create both containers and virtual machines”

3 Likes

Also, here is the list of executables that are provided by Incus (Zabbly packages). Notable commands include

  • incus-migrate, the one that performs the migration of Linux installations to Incus containers.
  • distrobuilder, the tool to build your own Incus image for your favorite Linux distribution.
  • lxd-to-incus, migrate from LXD to Incus
  • lxc-to-incus, convert from LXC container to Incus container
  • incus-benchmark, perform benchmarking of your Incus installation by launching many instances and seeing how your system copes.
$ ls /opt/incus/bin/
criu             incus-migrate        lxd-to-incus          qemu-vmsr-helper
distrobuilder    incus-simplestreams  mc                    skopeo
fuidshift        incus-user           minio                 swtpm
incus            lego                 nvidia-container-cli  truenas_incus_ctl
incus-benchmark  lxcfs                qemu-img              virtiofsd
incusd           lxc-to-incus         qemu-system-x86_64
$

Other commands are used internally by Incus.

1 Like

Thanks, that worked just fine. All I had to do is to remove the efi partition from fstab, that’s where it hang during boot.