network create
limactl network create
创建 Lima 网络
limactl network create NETWORK [flags]
示例
创建网络:
$ limactl network create foo --gateway 192.168.42.1/24
将 VM 实例连接到新创建的网络:
$ limactl create --network lima:foo --name vm1
$ limactl create --network lima:foo --name vm2
选项
--gateway string 网关,例如 "192.168.42.1/24"
-h, --help help for create
--interface string 桥接模式的接口
--mode string 模式 (default "user-v2")
从父命令继承的选项
--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 network - Lima 网络管理