跳转至

VMware GuestInfo 设置

名称

  VMWARE_SETTINGS

头文件

通过 config/settings.h 配置。

示例

启用 VMware GuestInfo 设置

  #define VMWARE_SETTINGS        /* VMware GuestInfo settings */

描述

此构建选项启用 VMware GuestInfo 设置支持。

GuestInfo 设置可以在定义虚拟机的 .vmx 文件中配置。GuestInfo 设置的一般语法为:

  guestinfo.ipxe[.<network device>].<setting name>[.<setting type>] = "<value>"

例如:

  guestinfo.ipxe.net0.ip = "192.168.0.15"
  guestinfo.ipxe.net0.netmask = "255.255.255.0"
  guestinfo.ipxe.net0.gateway = "192.168.0.1"

  guestinfo.ipxe.filename = "http://boot.ipxe.org/demo/boot.php"
  guestinfo.ipxe.dns = "192.168.0.1"

  guestinfo.ipxe.scriptlet = "ifopen net0 && chain ${filename}"

另请参阅

备注

你可以使用嵌入式脚本(或 scriptlet 设置)来避免使用 DHCP。例如,如果你定义了以下 GuestInfo 设置:

  guestinfo.ipxe.net0.ip = "192.168.0.15"
  guestinfo.ipxe.net0.netmask = "255.255.255.0"
  guestinfo.ipxe.net0.gateway = "192.168.0.1"
  guestinfo.ipxe.filename = "http://boot.ipxe.org/demo/boot.php"
  guestinfo.ipxe.dns = "192.168.0.1"

并使用嵌入式脚本:

  #!ipxe

  ifopen net0
  chain ${filename}

那么虚拟机将能够使用 .vmx 文件中配置的静态 IP 地址启动。