Install Virtainer Lite
Updated
Virtainer Lite ships as a single Fedora bootc image. You install it by booting
the target host from a Fedora LiveCD and writing that image directly to the
host’s disk with bootc. The install itself is one podman command that you
run from the live environment.
Before you begin
Section titled “Before you begin”- A host you can boot from a Fedora LiveCD. The latest official stable Fedora release is highly recommended.
- Internet access from the live environment. The installer pulls the Virtainer
Lite image from
quay.ioduring the install, so the host must be online. - The target disk for the install. The examples below use
/dev/sda; replace it with the correct device for your host. - The network setup the host should use: DHCP, or a static address with its gateway, netmask, and interface name.
Install
Section titled “Install”-
Boot the host from a Fedora LiveCD.
Working from the live environment also lets you read the host’s real disk and network interface names before you install. Both vary from machine to machine, and you need them in the steps below.
Optional: on a host with less than 12 GB of RAM, give the live environment a larger writable overlay so the installer has room to work. Append this to the kernel command line in GRUB before booting:
GRUB kernel command line rd.live.overlay.size=12G -
Put SELinux into permissive mode for the install session:
Terminal window sudo setenforce 0 -
Write Virtainer Lite to the disk.
Run the installer from the live environment. Pick the tab that matches how the host should get its network address, and replace
/dev/sdawith your target disk.Terminal window sudo podman run --rm \--privileged \--pid=host \--ipc=host \--security-opt label=disable \-v /dev:/dev \quay.io/virtainer/lite:latest \bootc install to-disk \--source-imgref registry:quay.io/virtainer/lite:latest \--wipe \--block-setup=direct \--disable-selinux \--filesystem=xfs \--bootloader=grub \--karg=ignition.firstboot=1 \--karg=ignition.platform.id=metal \--karg=rd.neednet=1 \--karg=ip=dhcp \/dev/sdaReplace the address, gateway, netmask, and interface name with values for your host. The
ip=value uses the formatip=<address>::<gateway>:<netmask>::<interface>:none.The interface name (
ens18in the example) is host-specific: Linux derives it from the hardware and firmware, so it differs between machines. From the live environment, list the host’s interfaces to find the right name before you run the installer:Terminal window ip -br linkThen write Virtainer Lite to the disk:
Terminal window sudo podman run --rm \--privileged \--pid=host \--ipc=host \--security-opt label=disable \-v /dev:/dev \quay.io/virtainer/lite:latest \bootc install to-disk \--source-imgref registry:quay.io/virtainer/lite:latest \--wipe \--block-setup=direct \--disable-selinux \--filesystem=xfs \--bootloader=grub \--karg=ignition.firstboot=1 \--karg=ignition.platform.id=metal \--karg=rd.neednet=1 \--karg=ip=192.168.50.100::192.168.50.1:255.255.255.0::ens18:none \--karg=nameserver=1.1.1.1 \/dev/sda -
Reboot the host and remove the live media. The host boots from disk into Virtainer Lite.
Access Virtainer Lite
Section titled “Access Virtainer Lite”Once the host has rebooted, open Virtainer Lite in a browser at
http://<host-ip>:8080. Use the address the host has on your network: its
DHCP lease, or the static address you set during install (for the example
above, that is http://192.168.50.100:8080).
- First visit: complete the one-time initialization to set up Virtainer Lite.
- After initialization: open the same URL for day-to-day operation, such as creating and managing VMs and AppVMs.