start
limactl start
启动 Lima 实例
limactl start NAME|FILE.yaml|URL [flags]
示例
To create an instance "default" (if not created yet) from the default Ubuntu template, and start it:
$ limactl start
To create an instance "default" from a template "docker", and start it:
$ limactl start --name=default template://docker
选项
--arch string [limactl create] 机器架构 (x86_64, aarch64, riscv64, armv7l, s390x, ppc64le)
--containerd string [limactl create] containerd 模式 (user, system, user+system, none)
--cpus int [limactl create] CPU 数量
--disk float32 [limactl create] 磁盘大小(GiB)
--dns ipSlice [limactl create] 指定自定义 DNS(禁用主机解析器) (default [])
--foreground 在前台运行 hostagent
-h, --help help for start
--list-drivers [limactl create] 列出可用驱动并退出
--list-templates [limactl create] 列出可用模板并退出
--memory float32 [limactl create] 内存大小(GiB)
--mount strings [limactl create] 要挂载的目录,后缀 ':w' 表示可写(不要指定与现有挂载重叠的目录)
--mount-inotify [limactl create] 为挂载启用 inotify
--mount-none [limactl create] 移除所有挂载
--mount-only strings [limactl create] 类似于 --mount,但会覆盖现有挂载
--mount-type string [limactl create] 挂载类型 (reverse-sshfs, 9p, virtiofs)
--mount-writable [limactl create] 使所有挂载可写
--name string [limactl create] 覆盖实例名称
--network strings [limactl create] 附加网络,例如 "vzNAT" 或 "lima:shared" 来分配 vmnet IP
--plain [limactl create] Plain 模式。禁用挂载、端口转发、containerd 等。
--port-forward stringArray [limactl create] 端口转发 (主机:客户机),例如,'8080:80' 或 '9090:9090,static=true' 表示静态端口转发
--progress Show provision script progress by tailing cloud-init logs
--rosetta [limactl create] 启用 Rosetta(用于 vz 实例)
--set string [limactl create] 使用 yq 语法就地修改模板
--ssh-port uint16 [limactl create] SSH 端口 (0 为随机)
--timeout duration Duration to wait for the instance to be running before timing out (default 10m0s)
--video [limactl create] 启用视频输出(对 QEMU 有负面性能影响)
--vm-type string [limactl create] 虚拟机类型
从父命令继承的选项
--debug 调试模式
--log-format string 设置日志格式 [text, json] (default "text")
--log-level string 设置日志级别 [trace, debug, info, warn, error]
--tty 启用 TUI 交互,如打开编辑器。默认在终端时为 true。自动化时设为 false。
-y, --yes --tty=false 的别名
另请参见
- limactl - Lima: Linux 虚拟机