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
- To get the server ID - vCenter server
- To get the datastore ID
- To get the GuestOSId and GuestOSVersionId
- To get the VMOrTemplateId
- To get the network
- To get VMware VGP values: summary and reference
Description of sections and settings
Section | Settings |
---|---|
<GeneralInfo> | <PackageName> and <PackageDescription> — Name and description of the VGP. |
<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:
|
<VMwareDiskSettings> | <SCSIAdapterType> — Set this to either LSILogic (default) or BUSLogic. In order for this value to take effect, you must set IsCustomConfig to true: |
<DiskInfo> | You can specify a DiskInfo section for each disk on the new virtual machine |
<NetworkConnection> | <Network> — The network name for the new VM. For information on how to get this name, see To get the network. |
{{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>. <AutoDNS> — True to use automatic DNS settings; false otherwise. |
<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>. myNSHPrompt% blenc hello Encoded value: BLencrypt:NAZKKTOVBMTOVVQE ... ZKOKUAAZKOOBONBW <DnsSuffix> — Optional. This is the global DNS suffix for Windows or Linux. <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.
- 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.
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 VMwareDataStoreOutput format
Name::EntityKeyOutput example
Storage1::1 VMwareDataStore datastore-4862Both 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
- 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.
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 VMwareGuestOSMappingFor 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
- 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.
- 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
- 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.
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 VMwareNetworkOutput format
Name::EntityKeyOutput example
BMC VM Network::1 VMwareNetwork VM NetworkThe <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.
- Get the vCenter server ID as described in To get the server ID - vCenter server.
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::EntityKeyOutput example
MyVM::1 VMWareVirtualMachine vm-13434For 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>VMwareDataStoreName
<Datastore>VMwareDataStoreName
<VMOrTemplateId> (Template)
VMwareTemplateEntityKey
<VMOrTemplateId> (Virtual Machine ID)
VMwareVirtualMachineEntityKey
<Network>VMwareNetworkName