vcenter guest: hostname generator

The hostname_generator structure specifies various mechanisms of generating the hostname for the guest inside the virtual machine while customization. This structure was added in vSphere API 7.0.0.0.

Representation:

{
    "prefix""string",
    "type""FIXED",
    "fixed_name""string"
}

Attributes:

Name Type Description
Required
type string The type of the Name Generator. This attribute was added in vSphere API 7.0.0.0.

Specifies different types of Name Generators. This enumeration was added in vSphere API 7.0.0.0. Value is one of:
FIXED: Specifies that a fixed name should be used for the hostname for the virtual machine during the customization. This constant was added in vSphere API 7.0.0.0.
PREFIX: Specifies that a unique name should be generated by concatenating the base string with a number including the network name of the guest.

Virtual machine names are unique across the set of hosts and virtual machines known to the VirtualCenter instance. VirtualCenter tracks the network names of virtual machines as well as hosts. VMware Tools runs in a guest operating system and reports information to VirtualCenter.

. This constant was added in vSphere API 7.0.0.0.
VIRTUAL_MACHINE: Specifies that the VirtualCenter should generate a virtual machine name.

The name is generated from a base prefix comprising the virtual machine entity name. A number is appended, if necessary, to make it unique.

Virtual machine names are unique across the set of hosts and virtual machines known to the VirtualCenter instance. VirtualCenter tracks the network names of the virtual machines as well as hosts. VMware Tools runs in a guest operating system and reports information to VirtualCenter, including the network name of the guest.

. This constant was added in vSphere API 7.0.0.0.
USER_INPUT_REQUIRED: Indicates that the host name is not specified in advance. The user must provide a valid value when the actual customization spec is applied to a virtual machine. This constant was added in vSphere API 7.0.0.0.
Optional
fixed_name string The virtual machine name specified by the client. This attribute was added in vSphere API 7.0.0.0.

Optional. It is only relevant when type has value FIXED. This field is optional and it is only relevant when the value of type is FIXED.

prefix string Base prefix, to which a unique number is appended. This attribute was added in vSphere API 7.0.0.0.

Optional. It is only relevant when type has value PREFIX. This field is optional and it is only relevant when the value of type is PREFIX.