Podman 机器在 Ubuntu 上启动

can*_*var 7 linux ubuntu podman

我在 podman 上启动机器时遇到问题 我正在使用 ubuntu 20.04 服务器 我像这样安装了 podman

echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key" | sudo apt-key add -
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install podman
Run Code Online (Sandbox Code Playgroud)

podman 版本是

podman version
Version:      3.4.2
API Version:  3.4.2
Go Version:   go1.16.6
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64
Run Code Online (Sandbox Code Playgroud)

我需要启动 podman 机器,但出现错误

我正在这样创作

root@ubuntu:# podman machine init
Extracting compressed file
root@ubuntu:# podman machine list
NAME                     VM TYPE     CREATED         LAST UP         CPUS        MEMORY      DISK SIZE
podman-machine-default*  qemu        28 seconds ago  28 seconds ago  1           2.147GB     10.74GB
Run Code Online (Sandbox Code Playgroud)

当我尝试启动机器时看起来很好我有这个

root@ubuntu:# podman machine start
Error: unable to start host networking: "could not find \"gvproxy\" in one of [/usr/local/libexec/podman /usr/local/lib/podman /usr/libexec/podman /usr/lib/podman]"

Run Code Online (Sandbox Code Playgroud)

但我不认为我的 podman 安装有问题,因为我可以运行容器

root@ubuntu:# podman run hello-world
Resolved "hello-world" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/hello-world:latest...
Getting image source signatures
Copying blob 2db29710123e done
Copying config feb5d9fea6 done
Writing manifest to image destination
Storing signatures

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Run Code Online (Sandbox Code Playgroud)

Rax*_*ume 13

我遇到了和你完全相同的问题。我是通过手动安装解决的gvproxy。步骤:

  1. 转到https://github.com/containers/gvisor-tap-vsock/releases并单击最新的版本。在资产下,下载gvproxy-linux
  2. 将其移动到/usr/libexec/podman名称下gvproxy

请注意,您很可能需要sudo将文件移动到/usr/libexec/podman.

  • `sudo wget https://github.com/containers/gvisor-tap-vsock/releases/download/v0.6.2/gvproxy-linux -O /usr/libexec/podman/gvproxy && sudo chmod +x /usr/libexec/ podman/gvproxy` Linux 的当前最新版本 (2认同)