containers / crun-vm

An OCI Runtime that enables Podman, Docker, and Kubernetes to run VM images.
GNU General Public License v2.0
118 stars 10 forks source link

Autologin #67

Open ericcurtin opened 1 month ago

ericcurtin commented 1 month ago

Just a piece of random feedback but if we want to be more crun/runc/krun-like (I think we should by default), if we can edit a couple of files in the rootfs of the vm before we boot, we can make it autologin.

Automotive Stream Distribution 9
Kernel 5.14.0-447.400.el9iv.x86_64 on an x86_64

localhost login: root (automatic login)

Last login: Fri Jun  7 20:37:43 on ttyS0
[root@localhost ~]#

It's basically replace:

-o '-p -- \u'

with:

-a root

in the correct systemd getty .service file.

ericcurtin commented 1 month ago

Fits with:

Run VMs as easily as you run containers.

ericcurtin commented 3 weeks ago

Could steal some tricks from:

https://github.com/containers/podman-bootc

for this too, share ssh keys as an example.

ssh is often a more reliable IO interface than tty anyway.

ericcurtin commented 3 weeks ago

There is potential to merge podman-bootc and crun-vm efforts also.

crun-vm has advantages in that it just works, without any bootc-retrictions. And podman-bootc has advantages in terms of immutability, etc.

albertofaria commented 3 weeks ago

@ericcurtin What do you mean w.r.t. immutability?

ericcurtin commented 3 weeks ago

podman-bootc implies image-based system, OSTree, etc.

albertofaria commented 3 weeks ago

Ah, right. crun-vm will support bootc containers soon. I think it has the advantage of being closer to the usual container workflow. podman-bootc is close, but not quite the same, users have to learn a different CLI. OTOH with crun-vm VMs are containers, they show up in podman-ps, the disk images generated from bootc containers are cached as container images and show up in podman-images, etc.

podman-bootc has the advantage of working on macOS.

ericcurtin commented 3 weeks ago

The "containerdisks" VMs from here are very useful also though, I do think both should have a solution:

https://quay.io/repository/containerdisks/fedora

they are more flexible, one can install anything like a non-Atomic Desktop and it should "just work". bootc is more stringent.

I think auto-login/login-less would be a nice feature of crun-vm, it's what a user coming from OCI containers would expect, and it's more conveinient, there are multiple ways of achieving that.