Creating new VMs with the BLCLI


Using the BLCLI, you can create new virtual machines (VMs) for the following virtualization environments:

Platform

What's supported

VMware vCenter

You can create a new virtual system based on a VMware vCenter template or based solely on parameters that you define by creating a Virtual Guest Package (VGP) in the Depot workspace. You can then use a Virtual Guest Job (VGJ) to deploy a new VMware VM on the VMware vCenter server (which can be either a BMC Server Automation managed server or an agentless managed object).

IBM

You can create a new LPAR or VIO based on parameters that you define by creating a VGP in the Depot workspace. You can then use a VGJ to deploy a new LPAR/VIO on the IBM Frame server (which must be a BMC Server Automation agentless managed object).

Oracle Solaris

You can create a new non-Global Zone based on parameters that you define by creating a VGP in the Depot workspace. You can then use a VGJ to deploy a new non-Global Zone on the Solaris Global Zone server (which must be a BMC Server Automation managed server).

RedHat RHEV

You can create a new domain based on parameters that you define by creating a VGP in the Depot workspace. You can then use the VGJ to deploy a new domain on the RHEV Manager server (which must be a BMC Server Automation managed server).

Citrix XenServer

You can create a new VM based on a VGP in the Depot workspace. You can then use the VGJ to deploy a new VM on the XenServer host (which must be a BMC Server Automation agentless managed object).

Microsoft System Center Virtual Machine Manager (SCVMM)

You can create a new vVM based on a VGP in the Depot workspace. You can then use the VGJ to deploy a new VM on the Hyper-V host. The Hyper-V host is managed by SCVMM, and the server that is running SCVMM must be a BMC Server Automation managed server.

To create a new VM

  1. Create a VGP in one of the following ways:.
  2. Create a VGJ.
    1. First, create a VGJ XML file.
       The VGJ file is based on the schema shown in Virtual-Guest-Job-schema. Before using the schema, familiarize yourself with the concepts described in Using-the-schemas-Backward-compatibility-and-validation. Various procedures and techniques for creating a VGJ file are contained in The-VGJ-file.
      Sample VGJ files for various environments:
    2. After you have created the VGJ XML file, run the createVirtualGuest command to create the VGJ.
      Example:

      Virtualization createVirtualGuest "//nsh-path/VirtualGuestJob.xml"

      The createVirtualGuest command returns the DBKey of the newly created job.
      You can run this job in two ways:

      • If you want to execute the job immediately, you can specify this behavior in the VGJ XML file. To do this, set the ExecuteNow element to true:
        <ExecuteNow>true</ExecuteNow>
         (See The-VGJ-file.)
      • If you want the createVirtualGuest command to create the job, but not run it. Instead, set ExecuteNow to false:
        <ExecuteNow>false</ExecuteNow>
         You can then manipulate and run the job later by using commands in the Job namespace.
        Example of pseudocode where ExecuteNow is set to false:

        blcli Virtualization createVirtualGuest "//nsh-path/VirtualGuestJob.xml"
        # Output (includes message and job DBKey):
        Job is created and will execute by users request with Job DB Key DBKey:JobKeyImpl:32
        JOB_KEY=DBKey:JobKeyImpl:32
        blcli Job execute $JOB_KEY

         

        When you execute the VGJ, it creates a new virtual machine with the characteristics specified in the VGJ XML file.

        Note

        Run a VGJ only once with the same data. You need to edit at least the virtual machine name in the VGJ XML file before reusing the rest of the information in the file to create and run a new job.

  3. The newly created VM now appears as a registered server in the Servers workspace in the BMC Server Automation GUI. It will also appear when you live browse the parent machine. For example, if this is a VMware computer, it will also appear when you live browse the parent vCenter server.
  4. If necessary, provide an OS:
    • If you created this VM based on a template, the OS is already installed.
    • If you did not use a template, you now need to provision this VM with an OS. See Provisioning-a-bare-metal-VM.

 

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