-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
podman-remote setup for lima-ubuntu vm #11533
Comments
You can use Then you can change it with Note: this is instead of / in addition to the legacy CONTAINER_HOST and CONTAINER_SSHKEY environment variables (Which are in turn instead of the PODMAN_USER/PODMAN_HOST/PODMAN_PORT/PODMAN_IDENTITY_FILE env var) |
You should be able to start the socket listener with: $ limactl shell ubuntu systemctl --user start podman.socket And then see the connection details with
Set up a connection: $ podman-remote system connection add --default ubuntu ssh://127.0.0.1:60022 And run it:
The error is normal, since podman version 3.2.3 can't talk to podman version 3.0.1. If installing a matching older version on the host, then it works fine to connect to it. https://packages.ubuntu.com/hirsute/podman Alternatively one could install a newer ubuntu podman from an alternative source. There are some packages available from the Kubic project, see podman: Get Started https://build.opensuse.org/package/show/devel:kubic:libcontainers:stable/podman A temporary workaround is also to run the server podman binary remotely over ssh: # better living through environment
$ export LIMA_INSTANCE=ubuntu
$ lima podman version
Version: 3.0.1
API Version: 3.0.0
Go Version: go1.16
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
$ lima podman --remote version
Client:
Version: 3.0.1
API Version: 3.0.0
Go Version: go1.16
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
Server:
Version: 3.0.1
API Version: 3.0.0
Go Version: go1.16
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64 |
Great. This is extremely helpful and for now, I will leverage the workaround. Can we update the docs for this scenario or point me to where it is in case I missed it. |
Don't think we have any documentation on using Lima with Podman at the moment (our focus primarily being on |
Currently all documentation and config files are on the Lima side. "(Other container engines can be used too)" https://github.com/lima-vm/lima#lima-linux-virtual-machines-on-macos-in-most-cases
Eventually this will be alternative for Podman on Mac (and Linux), just like running under WSL is on Windows: https://podman.io/blogs/2021/09/06/podman-on-macs.html
|
But lima should work "out of the box" if using the provided "podman" image, the problem was with the "ubuntu" image.
It should be two lines: $ limactl start podman.yaml
? Creating an instance "podman" Proceed with the default configuration
INFO[0001] Attempting to download the image from "https://cloud-images.ubuntu.com/impish/current/impish-server-cloudimg-amd64.img"
...
INFO[0098] READY. Run `limactl shell podman` to open the shell.
$ LIMA_INSTANCE=podman lima podman version
Version: 3.2.1
API Version: 3.2.1
Go Version: go1.16.2
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64 Or some more, for remote.
You would probably have similar issues with setting it up, if trying to run Podman Machine with say an Ubuntu image ? The user experience should be better, after fixing some issues with displaying the connections and creating a socket :
After those, setting up the remote environment would also be simple one-liners. Well, except for some other issues... |
As always, the websites and the documentation are behind the code... "Patches accepted" ? |
You can find older podman client binaries under the GitHub releases, such as v3.0.1 $ podman version
Version: 3.2.3
API Version: 3.2.3
Go Version: go1.15.2
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
$ podman-remote version
Error: cannot connect to the Podman socket, please verify that Podman REST API service is running: server API version is too old. Client "3.1.0" server "3.0.0"
$ podman-remote-static version
Client:
Version: 3.0.1
API Version: 3.0.0
Go Version: go1.15.8
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
Server:
Version: 3.0.1
API Version: 3.0.0
Go Version: go1.16
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
|
@tk185141 are you planning on opening a PR to update the documentation on how to do this? |
Would you need some external link similar to WSL*, or what is needed for Podman on lima ? * https://www.redhat.com/sysadmin/podman-windows-wsl2 Seems to be the same basic approach, install the Linux distribution of your choice and then add Podman to it. |
Sure a Blog on this would be great. |
Just couldn't find any info on either (on podman.io), to PR against. I described my experience when running on Linux (above), but I think it would be more interesting to hear from a Mac user - similar to the article that @TomSweeneyRedHat wrote for Win 10. https://www.redhat.com/sysadmin/podman-windows-wsl And probably Fedora, rather than Ubuntu - right ? 😉 |
This comment has been minimized.
This comment has been minimized.
Here is such a YAML file, for running podman with fedora instead: https://github.com/afbjorklund/fedora-lima $ brew install lima
$ export LIMA_INSTANCE=fedora-podman
$ lima podman version
Version: 3.4.0
API Version: 3.4.0
Go Version: go1.16.8
Built: Thu Sep 30 19:40:21 2021
OS/Arch: linux/amd64 |
A friendly reminder that this issue had no activity for 30 days. |
@tk185141 @afbjorklund Is this something you are willing to write up a document on to explain how to set this up, then we could add it to the installation guide. |
Friendly ping |
I think it was waiting for another magazine article, probably best if written by a Mac user (instead of Linux) ? |
Hopefully it was fairly straight-forward, how to install lima and how to make it run podman/fedora instead of nerdctl/ubuntu.
ubuntu-nerdctl
fedora-podman
Maybe @ashley-cui have time to give it a try ? The GUI is available from here: lima-gui.app (zip) There has been some improvements since, so now the unix socket is directly exposed on the Mac machine (through tunnel). $ export CONTAINER_HOST=unix://$HOME/podman.sock
$ podman --remote version
Client:
Version: 3.3.1
API Version: 3.3.1
Go Version: go1.16.6
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
Server:
Version: 3.4.1
API Version: 3.4.1
Go Version: go1.16.8
Built: Wed Oct 20 16:35:28 2021
OS/Arch: linux/amd64 There is a fair share of overlap between $ limactl list
NAME STATUS SSH ARCH CPUS MEMORY DISK DIR
default Running 127.0.0.1:60022 x86_64 4 4GiB 100GiB /home/anders/.lima/default
fedora-podman Running 127.0.0.1:36745 x86_64 2 2GiB 20GiB /home/anders/.lima/fedora-podman
|
The lima messages have been improved a bit in lima version 0.8.0, so that it now gives actionable output:
The location of the socket and the podman binary, depends on the current user and operating system. # To run `podman` on the host (assumes podman-remote is installed):
# $ export CONTAINER_HOST=$(limactl list podman --format 'unix://{{.Dir}}/sock/podman.sock')
# $ podman --remote ...
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=$(limactl list podman --format 'unix://{{.Dir}}/sock/podman.sock')
# $ docker ... See https://github.com/lima-vm/lima/blob/v0.8.0/examples/podman.yaml (currently: podman 3.2.1) https://packages.ubuntu.com/search?keywords=podman&searchon=names&exact=1&suite=all§ion=all Instead of using the remote client, it is also possible to run podman in the instance using the shell command:
For newer podman versions, see the alternative lima yaml files using fedora instead of the default ubuntu:
|
A friendly reminder that this issue had no activity for 30 days. |
This seems to be more of a discussion then an issue. Moving to discussion. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
No.. This is more of HOWTO or question
Description
Unable to find the documentation for connecting to the lima-ubuntu VM. There is documentation for podman but not for the ubuntu (https://github.com/lima-vm/lima/blob/master/examples/podman.yaml#L5-L9)
Steps to reproduce the issue:
Describe the results you received:
podman-remote is returning the podman images from the lima-podman VM instead of lima-ubuntu vm
Describe the results you expected:
podman-remote can be configured to ssh to the lima ubuntu vm
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Host
Guest
Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Found this article multiple times and decided that even though it says will not work for mac, I figured to give it a shot. This entire process was run inside of the guest lima VM
Start a ubuntu shell inside of lima
WUSTK185141-CV3:~ tk185141$ limactl start ubuntu
Install buildah
tk185141@lima-ubuntu:/Users/tk185141$ sudo apt install buildah
Build an OCI image using buildah
tk185141@lima-ubuntu:/Users/tk185141/test$ buildah bud -f ./Dockerfile -t my-app-buildah .
Install podman
tk185141@lima-ubuntu:/Users/tk185141/test$ sudo apt install podman
Run podman build
tk185141@lima-ubuntu:/Users/tk185141/test$ podman build -t testimage .
Run podman images
The text was updated successfully, but these errors were encountered: