NAME¶ 名称
podman-machine-list - List virtual machines
podman-machine-list - 列出虚拟机
SYNOPSIS¶ 概要
podman machine list [options]
podman 机器列表 [选项]
podman machine ls [options]
podman 机器列表 [选项]
DESCRIPTION¶ 描述
List Podman managed virtual machines.
列出 Podman 管理的虚拟机。
Podman on MacOS and Windows requires a virtual machine. This is because containers are Linux -
containers do not run on any other OS because containers’ core functionality are
tied to the Linux kernel. Podman machine must be used to manage MacOS and Windows machines,
but can be optionally used on Linux.
MacOS 和 Windows 上的 Podman 需要虚拟机。这是因为容器是 Linux 容器 - 容器不在任何其他操作系统上运行,因为容器的核心功能与 Linux 内核绑定。必须使用 Podman 机器来管理 MacOS 和 Windows 机器,但在 Linux 上可以选择性地使用。
Rootless only. 仅支持 Rootless。
NOTE: The podman-machine configuration file is managed under the
$XDG_CONFIG_HOME/containers/podman/machine/
directory. Changing the $XDG_CONFIG_HOME
environment variable while the machines are running can lead to unexpected behavior.
(see podman(1))
注意:podman-machine 配置文件由 $XDG_CONFIG_HOME/containers/podman/machine/
目录管理。在虚拟机运行时更改 $XDG_CONFIG_HOME
环境变量可能导致意外行为。(参见 podman(1))
OPTIONS¶ 选项
--format=format¶
Change the default output format. This can be of a supported type like ‘json’
or a Go template.
Valid placeholders for the Go template are listed below:
更改默认输出格式。这可以是支持的类型,如'json'或 Go 模板。Go 模板的有效占位符如下所示:
Placeholder |
Description |
---|---|
.CPUs |
Number of CPUs CPU 数量 |
.Created |
Time since VM creation 虚拟机创建后的时间 |
.Default |
Is default machine 是否默认机器 |
.DiskSize |
Disk size of machine 机器的磁盘大小 |
.IdentityPath |
Path to ssh identity file |
.LastUp |
Time since the VM was last run |
.Memory |
Allocated memory for machine |
.Name |
VM name 虚拟机名称 |
.Port |
SSH Port to use to connect to VM |
.RemoteUsername |
VM Username for rootless Podman |
.Running |
Is machine running 机器是否正在运行 |
.Stream |
Stream name 流名称 |
.UserModeNetworking |
Whether machine uses user-mode networking |
.VMType |
VM type 虚拟机类型 |
--help¶ --帮助 ¶
Print usage statement. 打印使用说明。
--noheading, -n¶ --noheading,-n ¶
Omit the table headings from the listing.
从列表中省略表头。
--quiet, -q¶
Only print the name of the machine. This also implies no table heading
is printed.
仅打印机器的名称。这也意味着不打印表头。
EXAMPLES¶ 示例
List all Podman machines.
列出所有的 Podman 机器。
$ podman machine list
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default qemu 2 weeks ago 2 weeks ago 1 2.147GB 10.74GB
List all Podman machines using the specified table format.
使用指定的表格格式列出所有 Podman 机器。
$ podman machine ls --format "table {{.Name}}\t{{.VMType}}\t{{.Created}}\t{{.LastUp}}"
NAME VM TYPE CREATED LAST UP
podman-machine-default qemu 2 weeks ago 2 weeks ago
List all Podman machines in json format.
以 JSON 格式列出所有 Podman 机器。
$ podman machine ls --format json
[
{
"Name": "podman-machine-default",
"Default": false,
"Created": "2021-12-27T10:36:14.373347492-05:00",
"Running": false,
"LastUp": "2021-12-27T11:22:50.17333371-05:00",
"Stream": "default",
"VMType": "qemu",
"CPUs": 1,
"Memory": "2147483648",
"DiskSize": "10737418240"
}
]
SEE ALSO¶ 参见 ¶
podman(1), podman-machine(1)
podman(1),podman-machine(1)
HISTORY¶ 历史 ¶
March 2021, Originally compiled by Ashley Cui acui@redhat.com
2021 年 3 月,最初由 Ashley Cui acui@redhat.com 编写