Information about settings in the VMware VGP XML file


If you are creating a VMware VGP XML file that is based on a template, there are certain settings that you cannot change and concepts you need to understand. These are described in Working with Virtual Guest Package (VGP) files that are based on a template or on an existing virtual machine (VM).

This topic contains the following sections:

Description of sections and settings

Section

Settings

<GeneralInfo>

<PackageName> and <PackageDescription> — Name and description of the VGP.
<DepotGroupId> — You store VGPs in the Depot. You can get the ID of a depot group by using the command DepotGroup : groupNameToId.
<VirtualGuestPackageType> — Specify one of the following integers:
1 - VMware-Baremetal
2 - VMware-Based on a VMTemplate or on an existing VM
<VirtualGuestName> — Name of the new VM you are creating.

<PlatformInfo>

The following sections are part of the PlatformInfo section.

<VMwareInfo>

<ClonedDiskFormat>: Applies to VGPs based on a template or on another VM. Set this to one of the following values:

  • sameAsSource (this is the default)
  • thinProvision
  • thickProvision

    All the disks of the template or source VM will be copied using the format specified in <ClonedDiskFormat>.
    <IsCustomConfig> — Set this to true if you want to specify a SCSI adapter type in the SCSIAdapterType element. If you omit the IsCustomConfig element, or set it to false, then the system ignores the <SCSIAdapterType> setting.
    <VMXDatastore> — ID of the datastore that contains the .vmx configuration files for the new VM. For information on how to get this ID, see To get the datastore ID.
    <GuestOSId> — ID of the OS that will be installed on this VM. See To get the GuestOSId and GuestOSVersionId.
    <GuestOSVersionId> — ID that indicates the OS version. See To get the GuestOSId and GuestOSVersionId.
    <VMOrTemplateId> — If you are creating a VGP based on a template, or based on the characteristics of another VM, specify the ID of the template or the ID of the VM.
    For information on how to get these IDs, see To get the VMOrTemplateId.
    <NumOfProcessors> — The number of processors you want the new VM to have.
    <MemoryInMB> — The amount of memory you want the new VM to have. Specify this value in MB. For example, 1024 means you want the machine to have 1024 MB memory.
<VMwareDiskSettings>

<SCSIAdapterType> — Set this to either LSILogic (default) or BUSLogic. In order for this value to take effect, you must set IsCustomConfig to true:
<IsCustomConfig>true</IsCustomConfig>
If <IsCustomConfig> is set to false or is not present, then the system ignores whatever value you specify for <SCSIAdapterType>.

<DiskInfo>

You can specify a DiskInfo section for each disk on the new virtual machine
<DiskSize> — Specify this value using the unit you specify in DiskSizeUnit. For example, if you set DiskSizeUnit to MB, then set DiskSize to 1024, that means you want this disk to have a size of 1024 MB.
<DiskSizeUnit> — Used in conjunction with the <DiskSize> element. The unit in which you want to express the size of the new disk. Specify one of the following units:
MB
GB
<Datastore> — ID of the datastore that contains the .vmdk file for the disk you are describing in this <DiskInfo> section. For information on how to get this ID, see To get the datastore ID.
<ThinProvisioning> — Set this to true to use thin provisioning for the disk; false otherwise. Applies to bare metal and new disks added to cloned VMs.

<NetworkConnection>

<Network> — The network name for the new VM. For information on how to get this name, see To get the network.
<Adapter> — Specify one of the following values:
VMXNET
VMXNET 2 (Enhanced)
VMXNET 3
E1000
Flexible (default)
<ConnectAtPowerOn> — If you set this to true, the associated NIC is powered on when the VM is powered on. This is helpful if you want the VM to boot from the network. If you set this to false, the NIC is available only after the guest OS is loaded.

{{id name="InformationaboutsettingsintheVMwareVGPXMLfile-GuestNetworkConfiguration"/}}

<GuestNetworkConfiguration>

Settings for an IPv4 connection.

<AutoIPAddress> — Optional. True to automatically assign an IP address; false otherwise. Use only if you specify <OSCustomizationInfo>.
If the IP address is not assigned automatically, you must provide the following additional settings:
<IPAddress>
<SubnetMask>
<DefaultGateway>

<AutoDNS> — True to use automatic DNS settings; false otherwise.
If DNS settings are not assigned automatically, you must provide the following additional settings:
<PrimaryDNS>
<SecondaryDNS>
<TertiaryDNS>

<DnsSuffixForConnection> — The DNS suffix for this connection. Applies only to Windows-based VGPs that are based on a template or VM.

<GuestIPv6NetworkConfiguration>

Settings for an IPv6 connection.

For details about these settings, see the description for the <GuestNetworkConfiguration> section.

<OSCustomizationInfo>

You can optionally add sections for <WindowsCustomizationInfo> or <LinuxCustomizationInfo>.
<AdminPassword> — For <AdminPassword>, you can use the encrypted value you obtain from using the blenc utility.
Example:

myNSHPrompt% blenc hello
Encoded value:
BLencrypt:NAZKKTOVBMTOVVQE ... ZKOKUAAZKOOBONBW 

<DnsSuffix> — Optional. This is the global DNS suffix for Windows or Linux.
<RunOnceCommands> — Available only for Windows-based virtual machines created using a template or from existing virtual machines. The Run Once commands you specify will run the first time a user logs into the guest operating system.
Example. The following example adds a specified route in the local IP routing table:

<RunOnceCommands>
<Command> route -p add  192.168.1.13 mask 255.255.255.0 192.168.1.1</Command>
</RunOnceCommands>

To get the server ID - vCenter server

Many of the commands you use to get VGP values require you to pass the server ID of the vCenter server.

To do this, use the listVirtualEntityManagers command, and pass in an EntityType argument that specifies VMWare Virtual Center servers:

Command

Virtualization listVirtualEntityManagers VMWareVirtualCenter

Output format

ServerId::ServerName

Output example

1::MyVC

In this example, the server ID is 1.

To get the datastore ID

Use this procedure to get the datastore ID that you specify in either the <VMXDatastore> element or the <Datastore> element.

  1. Get the server ID of the vCenter server, as described in To get the server ID - vCenter server. For the purpose of this example, assume the server ID is 1.
  2. Use the listVirtualEntitiesByEntityManagerServerIdAndEntityType command to get the datastore ID. This command takes 2 arguments – ServerId and EntityType. You already have the ServerId (1). Because you want a VMware datastore, you specify VMwareDataStore as EntityType:

    Command

    Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 VMwareDataStore

    Output format

    Name::EntityKey

    Output example

    Storage1::1 VMwareDataStore datastore-4862

    Both the <VMXDatastore> and <Datastore> elements use the Name, so in this example you would specify entries like:

    <VMXDatastore>Storage1</VMXDatastore>
    <Datastore>Storage1</Datastore>

To get the GuestOSId and GuestOSVersionId

  1. Get the server ID of the vCenter server, as described in To get the server ID - vCenter server. For the purpose of this example, assume the server ID is 1.
  2. Use the listVirtualEntitiesByEntityManagerServerIdAndEntityType command to list the GuestOsId and GuestOSVersionId values. This command takes 2 arguments — ServerId and EntityType. You already have the ServerId (1). Because you want guest OS information, you specify VMwareGuestOSMapping as EntityType:

    Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 VMwareGuestOSMapping

    For convenience, the output of this command is listed in a static table located in VMware GuestOSId and GuestOSVersionId values. However, BMC recommends that you use the BLCLI command to make sure you obtain current values.

To get the VMOrTemplateId

  1. Get the server ID of the vCenter server, as described in To get the server ID - vCenter server. For the purpose of this example, assume the server ID is 1.
  2. Use the listVirtualEntitiesByEntityManagerServerIdAndEntityType command to get either the template ID or the virtual machine ID. This command takes 2 arguments — ServerId and EntityType. You already have the ServerId (1).

Template ID example

To get the template ID, specify VMwareTemplate as EntityType:

Command

Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 VMwareTemplate

Output format

Name::EntityKey

Output example

MyTemplate::1 VMWareTemplate vm-13434

The <VMOrTemplateId> element in the Virtual Guest Package XML file uses the EntityKey as the ID, so in this example you would specify:
<VMOrTemplateId>1 VMWareTemplate vm-13434</VMOrTemplateId>

VM ID example

To get the VM ID, specify VMwareVirtualMachine as EntityType:

Command

Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 VMwareVirtualMachine

Output format

Name::EntityKey

Output example

MyVM::1 VMWareVirtualMachine vm-13434

The <VMOrTemplateId> element in the Virtual Guest Package XML file uses the EntityKey as the ID, so in this example you would specify:
<VMOrTemplateId>1 VMWareVirtualMachine vm-13434</VMOrTemplateId>

To get the network

  1. Get the server ID of the vCenter server, as described in To get the server ID - vCenter server. For the purpose of this example, assume the server ID is 1.
  2. Use the listVirtualEntitiesByEntityManagerServerIdAndEntityType command to get the network name. This command takes 2 arguments — ServerId and EntityType. You already have the ServerId (1). Because you want a network, you specify VMwareNetwork as EntityType:

    Command

    Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 VMwareNetwork

    Output format

    Name::EntityKey

    Output example

    BMC VM Network::1 VMwareNetwork VM Network

    The <Network> element in the VGP XML file uses the Name, so in this example you would specify:
    <Network>BMC VM Network</Network>

To get VMware VGP values: summary and reference

Here is a quick summary of how to get various VGP values. For a more detailed presentation, see To get the datastore ID, To get the VMOrTemplateId, and To get the network.

  1. Get the vCenter server ID as described in To get the server ID - vCenter server.
  2. Use the command listVirtualEntitiesByEntityManagerServerIdAndEntityType, passing in the ServerId and one of the EntityTypevalues shown in the table below.

    Command

    Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType <ServerId> <EntityType>

    Output format

    Name::EntityKey

    Output example

    MyVM::1 VMWareVirtualMachine vm-13434
  3. For each VGP element in the XML file, specify either Name or EntityKey in the listVirtualEntitiesByEntityManagerServerIdAndEntityTypecommand, as indicated in the table below.

    Element

    EntityType value to specify

    Name/EntityKey

    <VMXDatastore>
    VMwareDataStore

    Name

    <Datastore>
    VMwareDataStore

    Name

    <VMOrTemplateId> (Template)

    VMwareTemplate

    EntityKey

    <VMOrTemplateId> (Virtual Machine ID)

    VMwareVirtualMachine

    EntityKey

    <Network>
    VMwareNetwork

    Name

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*