Commit Graph

14 Commits

Author SHA1 Message Date
Alberto Faria 3f91463462 docs: Fix some links
Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-10-04 15:16:23 +01:00
Alberto Faria 138b168e33 docs: Fix QEMU emulator dependency names
Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-08-11 18:41:54 +01:00
Alberto Faria fc5d916371 docs: List skopeo as a runtime dependency
Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-07-18 19:26:02 +01:00
Alberto Faria 58da5ed7f2 Revamp docs
Add a quick start to the README, reorganize and make the main
documentation less reference-like, and add a man page.

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-07-17 23:11:26 +01:00
Alberto Faria a9118ee63c Add support for running bootc bootable containers
We attempt to detect if a container image is bootable. We can't easily
retrieve the image's labels, so we check if /usr/lib/bootc/install
exists and is a directory. If so, it is a bootable container. If it is a
bootable container but we're not running under Podman, we fail with an
error.

Once our container's entrypoint starts running, a background process on
the host (outside the container) queries Podman for the image's name and
ID, which the OCI runtime does not get but bootc-install needs. It then
saves the container image as an OCI archive.

It then runs the original container to generate the VM image. We do this
using krun [1] so that elevated privileges aren't necessary. Our
entrypoint blocks until this is done, and all subsequent logic remains
the same.

We could potentially avoid the OCI archive creation step by mounting the
host's container storage into the container running under krun. This
isn't trivial to achieve due to SELinux label and context mismatches
between the host and the krun environment, so we leave this optimization
for a future date.

Closes #26.

[1] https://github.com/containers/crun/blob/main/krun.1.md

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-07-11 15:31:11 +01:00
Alberto Faria 99d74d5acd docs: Add Fedora install instructions
crun-vm is now packaged in Fedora 38 and above.

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-03-22 07:39:21 +00:00
Alberto Faria f517340817 src/commands/exec: Try to avoid exec errors while the VM is booting
Instead make exec block until the VM's SSH server is ready.

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-02-16 18:41:10 +00:00
Alberto Faria acbe5de5af docs: Add dependency on openssh-clients Fedora package
Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-02-14 11:21:21 +00:00
Eric Blake e3344483f4 docs: various tweaks from a first-time reader
In step 1, since editing /etc is not desirable for rootless Podman,
mention the alternative location that will have the same effect.

In step 2, there's no need for the disclaimer paragraph about Docker
lacking --latest in an example that already can't use Docker because
of lack of --rootfs a couple paragraphs above.  And even for Podman,
make it clear that the initial example is limited, in that the qcow2
image has no ssh keys, root password, or alternative users installed
yet.

Signed-off-by: Eric Blake <eblake@redhat.com>
2024-01-26 09:19:45 -06:00
Alberto Faria 41d6f8c33b src/commands/create: Set RLIMIT_NOFILE for the container
This precludes the need to increase Docker's global limit.

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-01-20 01:11:43 +00:00
Daniel J Walsh 557708a336
Change name from crun-qemu to crun-vm
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-12 13:02:54 -05:00
Alberto Faria 727172048c docs: List package libselinux-devel as a dependency on Fedora
Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-01-09 11:48:16 +00:00
Alberto Faria 8c550f5666 docs: Write "crun-qemu" in plain text
Signed-off-by: Alberto Faria <afaria@redhat.com>
2023-12-24 23:44:52 +00:00
Alberto Faria 0c99f46501 Reorganize documentation
Signed-off-by: Alberto Faria <afaria@redhat.com>
2023-12-24 15:36:00 +00:00