podman-bootc

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Streamlining podman + bootc interactions

This project aims to address https://github.com/containers/podman/issues/21243 in alignment with the https://github.com/containers/bootc project.

Goals

MacOS

First be sure you have the Podman Desktop bootc extension requirements.

On MacOS you can use homebrew to install podman-bootc:

brew tap germag/podman-bootc
brew install podman-bootc

alternatively, you can download the latest development cutting-edge source

brew install --head podman-bootc

It will install xorriso and libvirt, but it doesn't install qemu. You need to install qemu manually, using brew:

brew install qemu

or by other mean and make it available in the path.

Fedora

You first must have podman-machine installed. It is required to have a rootful podman machine setup via e.g. podman machine init --rootful --now.

For Fedora 40 and Rawhide we provide a COPR repository. First, enable the COPR repository:

sudo dnf -y install 'dnf-command(copr)'
sudo dnf -y copr enable gmaglione/podman-bootc

then you can install podman-bootc as usual:

sudo dnf -y install podman-bootc

Building from source:

Our generic dependencies:

  • qemu-system-x86_64 / qemu-system-aarch64
  • xorriso/osirrox
  • golang
  • libvirt-devel

To compile it, just run in the project directory:

make

Running

The core command right now is:

podman-bootc run <imagename>

This command creates a new virtual machine, backed by a persistent disk image from a "self install" of the container image, and makes a SSH connection to it.

This requires SSH to be enabled by default in your base image; by default an automatically generated SSH key is injected via a systemd credential attached to qemu.

Even after you close the SSH connection, the machine continues to run.

Other commands:
  • podman-bootc list: List running VMs
  • podman-bootc ssh: Connect to a VM
  • podman-bootc rm: Remove a VM
Architecture

At the current time the run command uses a bootc install flow - where the container installs itself executed in a privileged mode inside the podman-machine VM.

The installation target is a raw disk image is created on the host, but loopback mounted over virtiofs/9p from the podman-machine VM.

(The need for a real-root privileged container to write Linux filesystems is part of the rationale for requiring podman-machine even on Linux is that it keeps the architecture aligned with MacOS (where it's always required))

In the future, support for installing via Anaconda and bootc-image-builder will be added.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
vm
test
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL