Creating a VGP in BMC Server Automation for a vCenter environment

You can build a repeatable process for deploying new virtual systems by using a virtual guest package (VGP). The VGP describes the new virtual system you want to add.

For example, you can base the VGP on an existing VMware vCenter template or create the VGP using values of your own, if you do not have an existing machine or template on which to base the configuration. Having a base package from which to deploy new virtual machines helps enforce consistency and standards, such as including Antivirus and management software on any new virtual machine.

The following sections describe how to create a VGP in BMC Server Automation:

Before you begin

Review the following sections for requirements and recommendations for creating VGPs.

About the VGP

A VGP bundles configuration changes so they can be deployed to hosts/clusters using a Virtual Guest Job. A VGP consists of an instruction set and any files needed for implementing configuration changes. Configuration changes can consist of additions, deletions, and modifications to any of the server objects BMC supports on all operating systems. This capability allows you to create multiple VGPs, each designed and tailored for a specific use.


  • You should create VGPs from virtual machine templates.

     Click here to review the requirements for creating VM templates.

    This section provides an overview of the steps when creating a VM template on VMware vCenter. A VM template is a reusable image created from an existing VM. You use these VM templates when creating a VGP in BMC Server Automation.


    Review the following requirements for VM templates.

    Requirement / RecommendationDescription
    IPv6 not supported

    When creating templates for BMC Cloud Lifecycle Management, ensure that IPv6 is disabled, as BMC Cloud Lifecycle Management does not support IPv6.

    For information about disabling IPv6, see the following Microsoft support article:

    How to disable IPv6 or its components in Windows

    OS customization supportBefore creating a VM template, ensure that your version of vCenter supports OS Customization for the specified guest OS. See the VMware vSphere online documentation regarding Operating System Compatibility for vCenter Server.
    VMware ToolsVMware Tools must be installed in all templates. Refer to the VMware online documentation for installation details.
    Microsoft System Preparation (Sysprep) tool VMware vCenter uses the Microsoft System Preparation (Sysprep) tool to automate the deployment of various Microsoft operating systems. Sysprep must be present on the vCenter to support OS Customization for Microsoft Windows. If Sysprep is not present for a specific version of Windows, OS Customization will fail. This in turn causes the VirtualGuest create task to fail.
    Recommendations for multiple vCenter environments

    See Working with multiple vCenter deployments.

    Adding a BMC Server Automation agent to the VM template

    Before you use a VM template to create a VGP, use the following procedure to add a BMC Server Automation RSCD agent to the template:

    1. Convert the template to a VM.
    2. Install a BMC Server Automation RSCD agent on the VM (see Installing only the RSCD agent (Linux and UNIX) and Installing an RSCD agent (Windows)).
    3. From a remote machine, use the BMC Server Automation agentinfo utility to ensure connectivity. Enter the following command:
      agentinfo hostname
      If the agent is not reachable, you may need to disable the firewall on the VM.
    4. Delete the BladeLogicRSCD user before converting the VM to a template.
    5. Convert the VM back to a template.
    Linux VM templates

    Linux VM templates must include the following:

    1. Modify the /etc/rc.d/rc.localscript to ensure successful DNS registration. See the following example for the recommended modification:

      dhcpHostname=`grep "DHCP_HOSTNAME=.*" /etc/sysconfig/network`
      dhcpHostname=`echo "$dhcpHostname" | sed "s/\s*//g"`
      if [ -z "$dhcpHostname" ]; then
      echo "DHCP_HOSTNAME=$HOSTNAME" >> /etc/sysconfig/network
      else if [ "DHCP_HOSTNAME=$HOSTNAME" != "$dhcpHostname" ]; then
      sed "s/DHCP_HOSTNAME=.*/DHCP_HOSTNAME=$HOSTNAME/g" /etc/sysconfig/network > /tmp/hostnamechange
      mv /tmp/hostnamechange /etc/sysconfig/network
    2. Distribute the UNIX Users custom object to the BMC Server Automation agent to validate users created on VMs. See the BMC Server Automation online technical documentation for details).


    For creating VM templates for the SUSE Linux, Oracle Enterprise Linux, and Cent OS platform, a cloud user must create the templates in VMware vCenter with Guest OS as RedHat Linux. BMC Server Automation supports creation of virtual guest package on these templates only.

  • Create VGPs in the CSM_Virtual_Guest_Packages folder (under Depot) in the BMC Server Automation Console.
  • To support hostname configuration in the virtual guest, select the Custom option in the VM Config Type Settings tab. For more information, see VMware - Config.
  • To make sure the VMs provisioned using the VGPs can be enrolled in BMC Server Automation successfully, the primary DNS server specified on the BMC Server Automation Application Server should be the same DNS server utilized by the vCenter. Otherwise, BMC Server Automation is forced to wait for DNS propagation before it can communicate with the BMC Server Automation agent on the virtual guest.
  • Ensure that the VGP for bare-metal virtual machines is assigned a larger disk space amount than what is assigned to the system package. Otherwise, the provisioning fails with the somewhat misleading error message OS Not Found.


Consider the following general recommendations for creating VGPs:

  • Do not include any static IP addresses in the configuration of the VGP.
  • Do not include any information that is instance-specific, such as a hard-coded host name.

Consider the following recommendations if you have mulitiple VMware vCenters in the deployment (a multi-site deployment, for example):

  • Make sure you have the same VM template names available on all of the vCenters. You can then create Virtual Guest Packages (VGPs) from one vCenter and still provision VMs to other vCenters.
  • To minimize template overhead, it is highly recommended to keep templates as minimal as possible (such as, only OS with optionally an enterprise-based software stack, such as antivirus program).

To create a VGP for BMC Cloud Lifecycle Management

This section describes how to create a VGP manually. Beginning with BMC Server Automation 8.2, you can also create VGPs automatically, using the Virtual Guest Template Enrollment Job. For more information, see the related topic in the BMC Server Automation documentation.

  1. From the Depot folder, right-click the depot folder where you want to add the VGP. From the pop-up menu, select New > Virtual Guest Packageand then the virtualization platform type for the package (VMware, Citrix XenServer, or IBM LPAR).


    You should create VGPs in the Depot in the CSM_Virtual_Guest_Packages folder.

  2. On the Virtual Guest Package dialog, enter the following:

    The virtual machine name and the server name are required. However, BMC Cloud Lifecycle Management overrides these values.




    Enter a name for the package.


    Enter a brief description of the package.

    Member of

    Browse to the folder in the Depot where you want the VGP to be created.

    VM Guest Package type

    Choose VMware Virtual Machine to configure the package and create a new virtual machine (a bare-metal virtual machine), or select VMware Virtual Machine/Template Clone to base it on an existing template or virtual machine.

    VMware VC Template

    Browse to the location of a template on which this VGP will be based.

  3. Click Next.
  4. On the Permissions panel, enter the permissions for the VGP. The Permissions panel is an access control list granting roles access to this VGP. Access to all objects, including the sharing of objects between roles, is controlled through access control lists (ACLs). Make sure that your role has the VirtualGuestPackage.* permission to create a VGP for a VMware vSphere environment.
  5. Click Finish.
    A dialog displays, indicating that the package is being saved to the Depot.

To modify the VGP

After the VGP is saved, the Virtual Guest Package editor is displayed, enabling you to modify the VGP.


If the VGP is based on a template,  you must select the Customize OS checkbox on the VMware - Config panel.

  1. On each tab in the editor, enter the desired configuration settings for your VGP.
  2. The following panels apply to VMware environments:


    To support hostname configuration in the virtual guest, select the Custom option in the VM Config Type Settings tab. Note that when you create a VGP from a VM template you are not able to select the Custom option. This option is disabled.

     VMware - Config panel - Click here to see descriptions of the fields

    In both the Config Wizard panel in the Virtual Guest Job wizard and the VM Config Type Settings panel in the Virtual Guest Package, you select the virtual guest configuration and OS settings that are appropriate for the new virtual guest. If the package is based on a template, this panel is read-only, with the exception of the virtual machine name.

    Enter a name for the virtual machine, and then specify any of the following settings. If you are creating the virtual machine from a template or a virtual machine, the template or virtual machine name is shown in the Created from VM/Template field.

    • Under Virtual Machine Configuration, choose one of the following options:
      • Typical — Select this option to choose basic settings for the virtual machine configuration.
      • Custom — Select this option to set advanced configuration options for the virtual machine.
    • Under VM Config file Datastore location, specify the following settings:
      • Select either Datastore or Datastore Cluster from the list.
        From the Datastore/Datastore Cluster window, select the VC server from the server list. Based on your selection, the datastores or datastore clusters get listed with the Capacity, Free space, Type, and, Datacenter. Additionally, Datastore Cluster is also listed if you selected Datastore as the Storage Type.
      • Choose the location for the VMX file, which is the primary configuration file for the virtual machine. This file contains all of the options you select when you set up this virtual machine.
    • Under Target VM folder, you can choose a VM folder to which you want to group the virtual machine. You can either select the folder path by browsing any of the vCenter servers or enter the path manually.


      The folder attribute will be added for each VM in the Live Browse.

    • Under Guest Operating System, specify the following information:

      • OS Type — Select the operating system type from the list.

      • OS Version — Select the operating system version from the list.

      • Power On VM after creation Select this check box if you want the VM to boot after it is created. Clear this check box if you do not want the VM to boot after it is created. This check box applies to VM provisioning as well as bare metal provisioning.

    Select the Customize OS check box if you want to specify settings for the virtual machine operating system. You specify the settings on two subsequent wizard panels: the Basic Config panel and the Computer Settings panel.

     VMware - Settings panel - Click here to see descriptions of the fields

    Both the Settings panel in the Virtual Guest Job wizard and the VM Processor\Memory\Disk Settings panel in the Virtual Guest Package lets you select the virtual processor, memory, and disk settings appropriate for the new virtual guest.

    On this panel, you can:

    • Increase or decrease the number of virtual processors, using the Virtual Processor and Memory Configuration field. Specify the number of virtual processors and the amount of memory that will be allocated to the virtual machine.
    • Increase or decrease the memory allocated to the virtual machine.
    • Add new virtual disks and modify the data stores for the ones that are part of the template, in the Virtual Disk Configuration section.

    Field descriptions


    Virtual Processor and Memory Configuration

    Number of virtual processors — Select the virtual number of virtual processors that will be dedicated to this virtual machine from the drop-down list.

    Memory for this virtual machine — Use the slide bar to set the amount of dedicated memory for this virtual machine.

    Disk Format

    Select one of the following format options from the drop-down list.

    Same format as source — Use this option if you want to use the same storage format as the source template or VM, if you are cloning a template or VM.

    Thin Provisioned format — Use this option if you want to dynamically allocate storage using VMware vStorage Thin Provisioning. In this format, the system dynamically consumes the space for the physical disk; space is allocated and expanded on demand by the VMFS 3 driver whenever the guest OS requests space. For example, if you create an 80 GB disk but only use 20 GB of that disk, the actual disk consumption on the physical drives is 20 GB.


    This option is support only for VMFS 3 and higher data stores.

    Thick format — Use this option if you want the entire defined space allocated on physical disk. For example, if you are planning to allocate 50 GB disk space to a new virtual machine, the entire 50 GB will be consumed on the physical drives.

    Virtual Disk Configuration

    Do not create a disk

    Create a new virtual disk — After selecting this option, click Add ( ) to display the Add virtual disk dialog box, where you can specify the storage adapter type, the amount of storage, and the location of the datastore.You can also select the Thin Disk Provisioning option to specify that the new virtual disk use thin disk provisioning (described above). Note that a user-added disk can be deleted or modified, however, you cannot change the size or delete the disks provided from the template.

     VMware - Network Connections panel - Click here to see descriptions of the fields

    The Network Connections panel lets you specify the network connections and networking parameters like network port groups and adaptor type. This panel is available in the Virtual Guest Job wizard and in the Virtual Guest Package.

    DNS ConfigurationIn the DNS suffixes field, enter any Domain Name System (DNS) suffixes in comma-seperated format. The DNS suffix is used in DNS name registration and DNS name resolution.
    Network connections

    Click Add () to display the Add Network Connection dialog box. You can add new virtual NICs to the virtual machine, and also modify the template-defined NICs. Any user-added NICs can be deleted, but you cannot delete the NICs provided with the template. You can also specify the IP settings for any NICs that you add.


    BMC Server Automation supports the use of VMware Distributed Virtual Switch (DVS) port groups.

    • Under Network Connection, add any of the following:
      • VC Servers—Select a vCenter server from the drop-down list.
      • Network—Select from the networks attached to the selected vCenter.
      • Adapter—Choose the adapter type from the drop-down list.
      • Connect at power on—Enable this option to have the virtual machine connect to the network when it is powered on.
    • Under IP Configuration, there are two tabs for IPv4 and IPv6 addresses. Choose to have the IP address obtained automatically using Dynamic Host Configuration Protocol (DHCP), or choose to use a specific IP address by specifying the following:
      • IP Address
      • Subnet mask (for IPv4)
      • Prefix Length (for IPv6)
      • Default gateway
    • Under DNS Configuration, choose to have the DNS server obtained automatically, or to use a specific server by specifying the following:
      • Primary DNS server
      • Secondary DNS server
      • Tertiary DNS server
    • Specify a DNS Suffix for this Connection.

     VM Basic Config - Microsoft Windows panel - Click here to see descriptions of the fields

    • Under Local Settings, specify the following:
      • Computer name—Enter a name for the VM or choose to have the name auto-generated.
      • Administrator password—Enter a password for the Administrator user account, and confirm the password by entering it again in the Confirm password field.
    • Under Workgroup or Domain, choose to add the VM to a workgroup or a domain.
      • Workgroup—Enter the name of the workgroup to which you want to add the VM.
      • Windows Server Domain—Enter the domain name to which you want to add the VM. To create a domain account, click Create a computer account in the domain, and fill in the User name, Password, and Confirm Password fields.

     VM Basic Config - Linux panel - Click here to see descriptions of the fields

    Under Computer Settings, specify the following:

    • Under Host name, enter the host name for the new VM. Host names can be any combination of alphanumeric characters and can include hyphens (-). However, special characters are not allowed. The host name field is a required field.
    • Under Domain, you can optionally add the new VM to a specific domain.

     VM Computer Settings panel - Click here to see descriptions of the fields

    • Under User Information, specify any of the following:
      • Name—Enter a name for the primary user of the virtual machine.
      • Organization—Enter a brief description of the organization to which the user belongs.
    • Under License Setup, enter the following license information for the virtual machine:
      • License key—Enter the license key in the format shown on the panel.
      • Per server/Per seat—Specify the type of license for this virtual machine.
    • Under Localization, choose the time zone and locale for the virtual machine.
      • Time zone—Select the time zone from the drop-down list, or enter a custom time zone.
      • Locale—Select the locale for the virtual machine from the drop-down list, or enter a custom locale.


    This panel is present only if the VGP was based on a template.

     Run Once Script panel - Click here to see descriptions of the fields

    The Run Once Script panel lets you specify optional RunOnce commands in a VMware Virtual Guest Package for VMware Windows-based virtual machines created using a template or from existing Virtual Machines.

    To add a RunOnce command to a Virtual Guest Package, do the following:

    1. In the Virtual Guest Package editor, select the Run Once Script tab.
    2. Click the browse button. The Edit panel is displayed.
    3. Do one of the following:
      • Enter the RunOnce command in the edit window.
      • Click Import to import the command from a script.
      • Click OK.

    The RunOnce commands you specify run after the guest operating system starts, which is in "logged on" mode with Administrator credentials. If you do not want the virtual machine logged on automatically, then add a reboot command to the end of the run once command list (for example, shutdown /r).


    You can specify only OS commands on the Run Once Script panel; there is no support for executing multi-line scripts.

    The virtual machine name and the server name are required. However, BMC Cloud Lifecycle Management overrides these values.

  3. Save the package.

    For bare-metal virtual machines, create multiple VGPs for multiple OS platforms and when pointing your virtual machines to multiple datastores. Also, you need to create multiple VGPs to provide the following options in the configuration of the virtual machine: vCenter datastore location, default CPU value, and default RAM value.

Where to go next

Publishing the Product Catalog

Was this page helpful? Yes No Submitting... Thank you