-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional linux distro when a podman machine is created #12011
Comments
it is possible to boot another distribution but that distribution must use ignition during boot and have a recent podman inside it. The doc request is perfectly valid. |
Is it documented how we could achieve that ? |
ignition is not part of podman but a separate package -> https://coreos.github.io/ignition/ |
You can use lima instead of podman, if you want to use Something like https://github.com/afbjorklund/fedora-lima/blob/main/fedora-podman.yaml
And here it is: https://github.com/afbjorklund/fedora-lima/blob/main/centos-podman.yaml $ export LIMA_INSTANCE=centos-podman
$ lima podman version
bash: line 0: cd: /home/anders/fedora-lima: No such file or directory
Version: 3.2.3
API Version: 3.2.3
Go Version: go1.15.14
Built: Thu Sep 23 21:22:19 2021
OS/Arch: linux/amd64
Fixed in:
|
Updated the lima examples to Fedora 35 and CentOS 8-Stream, since CentOS Linux is soon EOL... limactl start https://raw.githubusercontent.com/afbjorklund/fedora-lima/main/fedora-podman.yaml limactl start https://raw.githubusercontent.com/afbjorklund/fedora-lima/main/centos-podman.yaml They use the "Cloud" versions (with cloud-init), rather than the "CoreOS" versions (with ignition). $ export LIMA_INSTANCE=centos-podman
$ lima podman version
Version: 3.4.1-dev
API Version: 3.4.1-dev
Go Version: go1.16.7
Built: Tue Oct 19 16:11:42 2021
OS/Arch: linux/amd64 $ lima sh -c 'rpm -q $(rpm -q --whatprovides system-release)'
centos-stream-release-8.5-3.el8.noarch
$ lima rpm -q podman
podman-3.4.1-3.module_el8.6.0+954+963caf36.x86_64
See https://github.com/afbjorklund/fedora-lima for details |
I did a test successfully on my mac using |
The new lima version has automatic mounting of the podman.sock,
(requires 0.8.0) EDIT: updated the example now portForwards:
- guestSocket: "/run/user/{{.UID}}/podman/podman.sock"
hostSocket: "{{.Dir}}/sock/podman.sock"
message: |
To run `podman` on the host (assumes podman-remote is installed):
$ export CONTAINER_HOST=unix://{{.Dir}}/sock/podman.sock
$ podman{{if eq .HostOS "linux"}}-remote{{end}} ... |
I'm not sure it is worth the effort, to support @baude ? Before that has been done, Podman will only be able to support CoreOS for the VM. It is easier to just use Vagrant* or Lima, if all you want to do is run Podman in a VM ? * Something like: https://boot2podman.github.io/2020/07/22/machine-replacement.html |
if using lima will allow on macos to do what we could do using docker desktop, then I'm fine |
If you are happy with Docker Desktop, then by all means do continue to use Docker Desktop... As far as I know, Docker Desktop allows you to run the LinuxKit distribution - and nothing else ? |
Not really as it only allows to boot a VM running k8s or docker and not buildah and/or podman ;-) and the VM cannot realy be used as a VM to ssh, install software, .... as we can do with vagrant or lima |
Yes but we cannot really use locally the VM to ssh, install software and compile code by example |
I think you were supposed to do that in containers, not on the VM.. But anyway, seems off topic ? The Podman Machine does one thing: run the Podman daemon. For the moment, not even
There used to be support for other distributions, but it was taken out in favor of using Fedora CoreOS. It seems unlikely that it would be added back in, since there is a general trend going back to OpenShift 4... |
On the off chance that someone would like to make a custom ISO for Fedora, I added some documentation. But that brings in a lot of overhead, so it is possible to do a more customized "spin" running as a "Live CD". |
@cmoulliard : time to close ? |
I leave the old Fedora Linux docs up there in case anyone wants to re-open that thread in the future. Otherwise it should be plenty with Fedora CoreOS (podman) and Fedora Cloud (lima), meanwhile. The alternative would be to use Alpine Linux, which already has a
lima-alpine:/home/anders/lima$ more /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.14.3
PRETTY_NAME="Alpine Linux v3.14"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
BUILD_ID="v0.2.2"
VARIANT_ID="std"
lima-alpine:/home/anders/lima$ podman version
Version: 3.2.3
API Version: 3.2.3
Go Version: go1.16.8
Git Commit: b7fc5b608b641cd9b9aec2647f9236e31f8f3b27
Built: Sat Sep 11 14:33:25 2021
OS/Arch: linux/amd64 |
The content discussed here could become part of a FAQ detailing the alternatives which exist to play with |
There are no alternatives, afaik. Could add more documentation to Lima, but it doesn't have a proper website or manual yet. Documentation for using Podman (and Podman Machine) is at https://docs.podman.io/ It should cover how to install and run podman, on a selection of (but not all) distributions ? https://podman.io/getting-started/installation Theoretically you could change Podman to use RHCOS too, but for now it is: FCOS.
You can change the image stream: https://getfedora.org/en/coreos/download
There are plenty of other VM tools (like Vagrant), if you need more than "just Podman". |
Alternative was not perhaps the appropriate word. Sorry. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Suggestion: Support additional linux distro when a podman machine is created.
I downloaded a qcow2 image of Centos8 to create a podman VM but the VM do not boot.
Questions:
podman machine
to boot itas currently that fails
Steps to reproduce the issue:
Download a qcow2 file : https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2
podman machine init --image-path ~/Images/CentOS-8-GenericCloud-8.4.2105.x86_64.qcow2 centos8
podman machine start centos8
Describe the results you received:
VM do not boot
Output of
podman version
:OS`:
The text was updated successfully, but these errors were encountered: