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.
- Verify that the Workflow engine is installed on the CommServe computer. For installation instructions, see Workflow Deployment – Install the Workflow Engine on the CommServe Computer.
- Download the latest software packages to the CommServe cache directory. For instructions, see Downloading Software Using the CommCell Console.
Downloading and Installing the Workflow
- Download the VM Package Deployment workflow from Commvault Store and install it on the CommServe computer.
For instructions, see Download Workflows from Commvault Store.
- In the CommCell Browser, click Workflows.
- On the Workflows tab, right-click VM Package Deployment, and then click All Tasks | Deploy.
The Deploy Workflow dialog box appears.
- In the Workflow Engine list, select the CommServe computer name, and then click OK.
Creating the Alert
- On the CommCell Console ribbon, click the Home tab, and then click Alert.
- Click Add.
The Add Alert Wizard appears.
- On the General Information page, create a name and specify the alert category.
- In the Display Name box, type a name for the alert.
- In the Category list, click Operation.
- In the Type list, click Event View Events.
- Click Next.
- On the Entities Selection page, click the CommServe computer name, and then click Next.
- On the Threshold and Notification Criteria Selection page, specify the event code.
- Next to Event Code, select equals to, and then type 19:1610 in the box.
- Click Next.
- On the Notification Types Selection page, set the workflow type.
- Click the Workflow tab.
- On the Regular tab, next to jobId, in the Value cell, select <JOB ID>.
- Click Next.
- 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:
- 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
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
- 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
- Enter the following command to execute the CronSetPwd.sh file:
echo "@reboot /var/tmp/cronSetPwd.sh" > /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.
- Open the CommCell Console.
- From the CommCell Browser, expand Client Computers.
- Right-click the <CommServe Client>, and then click Properties.
- Click Advanced.
- Click the Additional Settings tab.
- Click Add.
- In the Name box, type nVMDeletionGraceDays.
- From the Category list, select EventManager.
- From the Type list, select INTEGER.
- 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.
- Click OK.
Last modified: 6/11/2019 7:55:25 PM