crun-vm icon indicating copy to clipboard operation
crun-vm copied to clipboard

Autologin

Open ericcurtin opened this issue 1 year ago • 7 comments

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 avatar Jun 07 '24 20:06 ericcurtin

Fits with:

Run VMs as easily as you run containers.

ericcurtin avatar Jun 07 '24 20:06 ericcurtin

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 avatar Jun 18 '24 19:06 ericcurtin

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.

ericcurtin avatar Jun 18 '24 19:06 ericcurtin

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

albertofaria avatar Jun 18 '24 20:06 albertofaria

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

ericcurtin avatar Jun 18 '24 20:06 ericcurtin

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.

albertofaria avatar Jun 18 '24 20:06 albertofaria

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.

ericcurtin avatar Jun 18 '24 20:06 ericcurtin