名称¶
podman-machine-start - 启动虚拟机
简介¶
podman machine start [名称]
描述¶
启动 Podman 虚拟机。
仅限无根用户。
Podman 在 macOS 和 Windows 上需要虚拟机。这是因为容器是 Linux 操作系统——容器无法在任何其他操作系统上运行,因为容器的核心功能与 Linux 内核紧密相关。Podman machine 必须用于管理 macOS 和 Windows 机器,但也可以选择性地用于 Linux。
默认机器名称为 podman-machine-default
。如果未指定机器名称作为参数,则将启动 podman-machine-default
。
一次只能有一个 Podman 管理的虚拟机处于活动状态。如果虚拟机已在运行,则 podman machine start
将返回错误。
podman machine start 启动运行容器的 Linux 虚拟机。
选项¶
--help¶
打印使用说明。
--no-info¶
禁止显示信息提示。
--quiet, -q¶
禁止显示机器启动状态输出。
示例¶
启动指定的 podman 机器。
$ podman machine start myvm
Starting machine "myvm"
This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:
podman machine set --rootful myvm
API forwarding listening on: /var/folders/my/k1kpd8ds7p938mchyb1r_4mw0000gn/T/podman/myvm-api.sock
The system helper service is not installed; the default Docker API socket
address can't be used by podman. If you would like to install it, run the following commands:
sudo /opt/homebrew/Cellar/podman/5.2.4/bin/podman-mac-helper install
podman machine stop myvm; podman machine start myvm
You can still connect Docker API clients by setting DOCKER_HOST using the
following command in your terminal session:
export DOCKER_HOST='unix:///var/folders/my/k1kpd8ds7p938mchyb1r_4mw0000gn/T/podman/myvm-api.sock'
Machine "myvm" started successfully
使用 --no-info 启动
$ podman machine start --no-info myvm
Starting machine "myvm"
Machine "myvm" started successfully
使用 --quiet 启动
$ podman machine start --quiet myvm
Machine "myvm" started successfully
另请参阅¶
历史¶
2021 年 3 月,由 Ashley Cui acui@redhat.com 初次编译