Configuring VM Lifecycle Policies for VMware

The following tasks are optional configurations for virtual machine templates.

Automatically Install File System Agent on New Virtual Machines

You can use a workflow to automatically install the File System Agent on your users' newly created virtual machines. When the File System Agent installation is complete, the user receives an e-mail that says the installation succeeded or failed. To configure this option, you must first deploy the workflow, and then set the alert.


Downloading and Installing the Workflow

  1. Download the VM Package Deployment workflow from Commvault Store and install it on the CommServe computer.

    For instructions, see Download Workflows from Commvault Store.

  2. In the CommCell Browser, click Workflows.
  3. On the Workflows tab, right-click VM Package Deployment, and then click All Tasks | Deploy.

    The Deploy Workflow dialog box appears.

  4. In the Workflow Engine list, select the CommServe computer name, and then click OK.

Creating the Alert

  1. On the CommCell Console ribbon, click the Home tab, and then click Alert.
  2. Click Add.

    The Add Alert Wizard appears.

  3. On the General Information page, create a name and specify the alert category.
    1. In the Display Name box, type a name for the alert.
    2. In the Category list, click Operation.
    3. In the Type list, click Event View Events.
    4. Click Next.
  4. On the Entities Selection page, click the CommServe computer name, and then click Next.
  5. On the Threshold and Notification Criteria Selection page, specify the event code.
    1. Next to Event Code, select equals to, and then type 19:1610 in the box.
    2. Click Next.
  6. On the Notification Types Selection page, set the workflow type.
    1. Click the Workflow tab.
    2. On the Regular tab, next to jobId, in the Value cell, select <JOB ID>.
    3. Click Next.
  7. On the Summary page, click Finish.

    When the workflow completes, an e-mail is sent to the user who created the virtual machine.

Assigning Ownership to an Existing Virtual Machine

If you need to share ownership of an existing virtual machine (VM) with other user accounts, then those user accounts must have a role with the Administrative Management permission and an association with the VMware client. For instructions, see Administering the Security Associations of a User.

Managing Virtual Machines Created without a VM Lifecycle

If a virtual machine (VM) is created without a VM Lifecycle Policy, your user account must have a role with the Administrative Management permission and an association with the VM to perform operations on the VM. For instructions, see Administering the Security Associations of a User. To display VMs in the CommCell Console, see Displaying Virtual Machines in the CommCell Browser.

Setting the Password for a Linux VM

For creating a Linux VM, you must set the password of the machine as cvX1__hostname in the VM template. Follow the steps given below to set the password for a Linux VM:

  1. Use the following script to create the CronSetPwd.sh file:

    echo "hostnametemp=\`/bin/hostname\`" >> /var/tmp/cronSetPwd.sh
    echo "echo hostname is \$hostnametemp >> /var/tmp/vmlifecycle.log" >> /var/tmp/cronSetPwd.sh
    echo "echo PATH is \$PATH >> /var/tmp/vmlifecycle.log" >> /var/tmp/cronSetPwd.sh
    sleep 90
    echo "echo \"root:cvX1__\$hostnametemp\" | /usr/sbin/chpasswd" >> /var/tmp/cronSetPwd.sh
    echo "echo error code is \$? >> /var/tmp/vmlifecycle.log" >> /var/tmp/cronSetPwd.sh
    echo "/usr/bin/crontab -r" >> /var/tmp/cronSetPwd.sh

  2. Open the command prompt and enter the following command to assign the Execute permissions for the CronSetPwd.sh file:

    chmod 744 /var/tmp/cronSetPwd.sh

  3. Enter the following command to execute the CronSetPwd.sh file:

    echo "@reboot /var/tmp/cronSetPwd.sh" > /var/tmp/cronfile.txt
    crontab /var/tmp/cronfile.txt
    rm -f /var/tmp/cronfile.txt

The password of any Linux virtual machine created using the VM Lifecycle Policy, will be set to cvX1__hostname. If the system is unable to set the password specified by the user while creating the Linux virtual machine, the user can use the password, cvX1__hostname, to access the newly created Linux VM. In this example, hostname is the new host name of the virtual machine. The end user can change this password later.

If you are not able to set the IP address when you create a virtual machine using an Ubuntu template, see this article on the VMware Knowledge Base Web site: Guest customization of an Ubuntu virtual machine fails to update IP address settings (2051469).

Setting the Deletion Date for Decommissioned Virtual Machines

By default, decommissioned virtual machines are automatically deleted after 5 days. However, you can specify the number of days after which the virtual machine is deleted with an Additional Setting.

  1. Open the CommCell Console.
  2. From the CommCell Browser, expand Client Computers.
  3. Right-click the <CommServe Client>, and then click Properties.
  4. Click Advanced.
  5. Click the Additional Settings tab.
  6. Click Add.
  7. In the Name box, type nVMDeletionGraceDays.
  8. From the Category list, select EventManager.
  9. From the Type list, select INTEGER.
  10. In the Value box, type the number of days that you want to wait before automatically deleting expired virtual machines. To never delete expired virtual machines, type 0.
  11. Click OK.

Last modified: 6/11/2019 7:55:25 PM