Information about settings in the Citrix XenServer VGP XML file


This topic contains the following sections:

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.
<DepotGroupId> — You store VGPs in the Depot. You can get the ID of a depot group by using the command DepotGroup : groupNameToId.
<VirtualGuestPackageType> — Specify the following integer:
10 - CitrixXenVM
<VirtualGuestName> — Name of the virtual machine you are creating.

<CitrixXenInfo>

Mandatory tag containing Citrix information.
<VGDescription> — Optional. Description of virtual machine.
<VMOrTemplateName> — If you are using this file to create a VGP, this tag is mandatory. If you are using this file to update an existing VGP, this tag is optional.
This tag contains identifying information about the template or virtual machine on which you are basing the VGP, for example:
2000300, CitrixXenServerCustomTemplate,mahesh_w28_x64_xen02
For information on how to get the VMOrTemplateName, see To get the Citrix VMOrTemplateName.
<NumberOfvCPUs> — Positive int value, for example: 2
<MemoryInMB> — Positive int value, for example: 1024
<AutoBoot> — True to automatically start the new VM as soon as it is installed, created, or deployed; false otherwise.
<BootParams> — Specifies advanced boot parameters for the VM. For example: single. BootParams value is ignored if this is a Windows-based VM.

<CitrixXenDisk>

<DiskName> — Name of the disk. Must be unique for this package.
<Description> — Description of the disk.
<SizeInMB> — Positive int value, for example: 1024
<StorageRepository> — Name of the storage repository where disk should be stored.

  • For information about how to get this name, see To get the Citrix StorageRepository name.
  • Using the <StorageRepository> setting with a built-in template. If you are using a built-in template, you need to perform either of the following additional steps after you create the initial VGP file:
  • Run the updateVirtualGuestPackage command to update the VGP with a valid StorageRepository value.
  • Specify a value for <StorageRepository> in the VGJ XML file for the template disks.
    Make sure the value for <StorageRepository> is not empty or blank for any disks that you want to create.
<CitrixXenNetworkInterface>

<Network> — Name of the network. For information on how to get the network name, see To get the Citrix network name.
<AutoGenerateMAC> — True to have the hypervisor automatically generate a MAC address for the new VM; false otherwise.
<MACAddress> — If you want to use your own MAC address for the new VM, specify it here.

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

  1. 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.
  2. 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

    CitrixXenServerVirtualMachine

    Built-in template name

    CitrixXenServerBuiltInTemplate

    Custom template name

    CitrixXenServerCustomTemplate

    The 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 CitrixXenServerCustomTemplate

    Output format

    Name

    Output example

    Windows 2008 x86 With Agent::::2048::4::3 CitrixXenServerCustomTemplate Windows 2008 x86 With Agent

    For 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

  1. 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.
  2. 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 CitrixXenServerStorage

    Output format

    Name

    Output example

    storage2

    Example: In the VGP file, you might specify:

    <StorageRepository>storage2</StorageRepository>

To get the Citrix network name

  1. 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.
  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 name, you specify CitrixXenServerNetwork as EntityType:

    Command

    Virtualization listVirtualEntitiesByEntityManagerServerIdAndEntityType 1 CitrixXenServerNetwork

    Output format

    Name

    Output example

    network2

    For example, in the VGP file you might specify the following:

    <Network>network2</Network>

 

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