Skip to Content

虚拟机

Nanocl 中,Virtual Machine 表示虚拟机配置。
创建后,系统确保虚拟机持续运行。
下面是用于创建虚拟机的 VmSpecPartial OpenAPI 规范:

null or VmHostConfig (object)
Hostname
string or null

VM 主机名(默认:根据名称生成)。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
object or null

用户定义的键值元数据。

MacAddress
string or null

VM 的 MAC 地址(默认自动生成)。

object

用户定义的元数据。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(默认:cloud)。

SshKey
string or null

用户默认 SSH 公钥(推荐)。

User
string or null

VM 默认用户(默认:cloud)。

最后更新于