Information about settings in the Citrix XenServer VGP XML file
This topic contains the following sections:
- Descriptions of sections and settings
- Template-based VGP files - Rules summary (Citrix XenServer)
- To get the server ID - Citrix XenServer
- To get the Citrix VMOrTemplateName
- To get the Citrix StorageRepository name
- To get the Citrix network name
Descriptions of sections and settings
If you are creating a Citrix XenServer VGP XML file that is based on a template, there are certain settings that you cannot change. These are described in Template-based VGP files - Rules summary (Citrix XenServer).
Section | Settings |
---|---|
<GeneralInfo> | <Name> and <Description> — Name and description of the VGP. |
<CitrixXenInfo> | Mandatory tag containing Citrix information. |
<CitrixXenDisk> | <DiskName> — Name of the disk. Must be unique for this package.
|
<CitrixXenNetworkInterface> | <Network> — Name of the network. For information on how to get the network name, see To get the Citrix network name. |
Template-based VGP files - Rules summary (Citrix XenServer)
A template-based VGP has certain attributes that you cannot modify when creating the package (via createVirtualGuestPackage) or modifying the package (via updateVirtualGuestPackage).
Note the following rules when creating the <<PlatformInfo> section for the VGP file you plan to use with either command:
- You cannot delete disks that came from the template (template disks).
- You cannot modify a template disk's name and size.
To get the server ID - Citrix XenServer
Some of the commands you use to get VGP values require you to pass in the server ID of the Citrix XenServer.
To do this, use the listVirtualEntityManagers command, and pass in an EntityType argument that specifies Citrix XenServers:
Command | Virtualization listVirtualEntityManagers CitrixXenServer |
Output format | ServerId::ServerName |
Output example | 1::MyXenServer |
In this example, the server ID is 1.
To get the Citrix VMOrTemplateName
- Get the server ID of the Citrix XenServer, as described in To get the server ID - Citrix XenServer. For the purpose of this example, assume the server ID is 1.
Use the listVirtualEntitiesByEntityManagerServerIdAndEntityType command to get the VM or template name. This command takes 2 arguments — ServerId and EntityType. You already have the ServerId (1).
Depending on what information you want (VM name, built-in template name, or custom template name), specify one of the following values for EntityType:VM name
CitrixXenServerVirtualMachineBuilt-in template name
CitrixXenServerBuiltInTemplateCustom template name
CitrixXenServerCustomTemplateThe rest of this procedure walks you through getting a custom template name. Simply substitute the appropriate EntityType to get a VM name or a built-in template name.
Because you want a custom template name, you specify CitrixXenServerCustomTemplate as EntityType:Command
Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 CitrixXenServerCustomTemplateOutput format
NameOutput example
Windows 2008 x86 With Agent::::2048::4::3 CitrixXenServerCustomTemplate Windows 2008 x86 With AgentFor example, in the VGP file you might specify the following:
<VMOrTemplateName>3,CitrixXenServerCustomTemplate, Windows 2008 x86 With Agent </VMOrTemplateName>
To get the Citrix StorageRepository name
- Get the server ID of the Citrix XenServer, as described in To get the server ID - Citrix XenServer. For the purpose of this example, assume the server ID is 1.
Now you can use the listVirtualEntitiesByEntityManagerServerIdAndEntityType command to get the storage repository name. This command takes 2 arguments — ServerId and EntityType. You already have the ServerId (1).
Because you want a storage repository name, you specify CitrixXenServerStorage as EntityType:Command
Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 CitrixXenServerStorageOutput format
NameOutput example
storage2Example: In the VGP file, you might specify:
<StorageRepository>storage2</StorageRepository>
To get the Citrix network name
- Get the server ID of the Citrix XenServer, as described in To get the server ID - Citrix XenServer. 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 name, you specify CitrixXenServerNetwork as EntityType:Command
Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 CitrixXenServerNetworkOutput format
NameOutput example
network2For example, in the VGP file you might specify the following:
<Network>network2</Network>