by SEJeff · 5y ago · 0 comments
brew install podman; podman machine init; podman machine start; podman run ...
We have worked with the container team to introduce an actual solution, that also will hopefully soon introduce a new network stack. This we have been testing in CRC for some time.
Note: team lead on CRC, previously minisbift. Work closely with the container team. Red Hat employee
Going straight to the source (https://github.com/boot2podman/machine), it says the following:
> DEPRECATED (with huge letters)
> Podman Machine is now deprecated. Users should try using Vagrant instead.
So one can safely assume that podman-machine is in fact getting deprecated.
boot2podman/machine, what you linked, is not an official part of podman. It is a third party equivalent and not relevant. The official podman repository is https://github.com/containers/podman, and the machine bits are integrated and part of podman proper:
https://github.com/containers/podman/tree/main/cmd/podman/ma...
If it was you that downvoted my comment, please consider not doing that because you disagree. The comment was factually correct and made in good faith. You're equating a third party deprecated podman-machine with the integrated into upstream podman machine. We were not referring to the same thing whatsoever.
Hopefully this makes more sense to you now.
https://github.com/containers/podman/tree/main/cmd/podman/ma...
The `podman machine` command downloads and runs VMs with the podman service enabled within them. It also configures the native podman to use ssh to connect to the podman within the VM to allow the allusion of native podman support on the host. This is the exact same thing that Docker desktop does.
We will contact the podman-machine developers to update their website to point out that `podman machine` is the way to go, to get a VM running podman on your host system.
` DEPRECATED:
Podman v3.3 now has a podman machine included, different from podman-machine
This is a new feature based on QEMU and CoreOS, unlike the old one (described here) which is based on Docker Machine and Boot2Docker, as was available in Docker Toolbox... `
Podman machine as mentioned is a new integrated solution.
; podman machine start
INFO[0000] waiting for clients...
INFO[0000] listening tcp://0.0.0.0:7777
INFO[0000] new connection from to /var/folders/tv/ykgkkzr902n062tzjgbtwdc1bgt9y_/T/podman/qemu_podman-machine-default.sock
Waiting for VM ...
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
I hadn't dug into it because the docs for this feature are still missing, and I presumed it hasn't launched - I'd seen it in the demo https://podman.io/community/meeting/notes/2021-04-06/#podman...So I took a look again:
; vim ~/.config/containers/podman/machine/qemu/podman-machine-default.json
# added arguments to cmd, "-cpu", "host"
# based on reading https://github.com/GNS3/gns3-server/issues/1639 for that error
; rm /var/folders/tv/ykgkkzr902n062tzjgbtwdc1bgt9y_/T/podman/qemu_podman-machine-default.sock
# podman machine start will complain if you don't remove the
# socket file after the crash above. `fuser` showed nothing
# connected to it
; podman machine start
INFO[0000] waiting for clients...
INFO[0000] listening tcp://0.0.0.0:7777
INFO[0000] new connection from to /var/folders/tv/ykgkkzr902n062tzjgbtwdc1bgt9y_/T/podman/qemu_podman-machine-default.sock
Waiting for VM ...
; podman machine ls
NAME VM TYPE CREATED LAST UP
podman-machine-default\* qemu 45 seconds ago Currently running
; podman pull alpine
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e
Copying blob sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e
Copying config sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab
Writing manifest to image destination
Storing signatures
14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab
; podman run -it alpine sh
/ #
Works!-------
Podman is a tool for running Linux containers. You can do this from a MacOS desktop as long as you have access to a linux box either running inside of a VM on the host, or available via the network. Podman includes a command, podman machine that automatically manages VM’s.
To start the Podman-managed VM:
podman machine init podman machine start
-------