Windows operating systems

Scenarios for running full VM instant access and full VM instant restore from the backup-archive client command line

Full VM instant access and full VM instant restore operations require a license for Tivoli® Storage Manager for Virtual Environments. You can perform either of these operations from the backup-archive client command line. Instant access and instant restore operations and options are supported only for VMware virtual machines that are hosted on VMware ESXi 5.1 servers, or later versions.

The following scenarios demonstrate the full VM instant access or full VM instant restore operations that you might perform. Before you can complete the operations that are described in the following text, you must configure at least one data mover node on the vStorage backup server so it can protect the virtual machines by starting off host backup and restore operations. The steps for setting up the data mover nodes are described in Setting up the data mover nodes in a vSphere environment.

Scenario: You want to perform a full VM instant access to verify the integrity of a backed up image of a VMware virtual machine, without actually restoring the virtual machine or disks to the ESXi host

The purpose of this goal is to verify that a backed up virtual machine image can be used to successfully restore a system if the virtual machine is deleted or its disks and data are corrupted or otherwise unusable.

For this scenario, assume that an ESX server has a virtual machine named Orion running on it. You want to verify that the backed up image that is stored by the Tivoli Storage Manager server can be used to restore this virtual machine if the current virtual machine fails.

You perform a VM instant access operation, you use the restore vm command with inventory location options specified to identify the location for the restored virtual machine. All inventory location options, such as vmname, datacenter, host, and datastore can be used in combination with the instant access option (-VMRESToretype=INSTANTAccess) to specify the location for the restored (instant access) virtual machine.

Because the Orion virtual machine does exist in the inventory and is running, you must provide a new name for a temporary virtual machine by adding the new name to the vmname option. You must also add the –VMRESToretype=INSTANTAccess option to the command line to indicate that this is an instant access restore operation.

Entering the following command prepares a virtual machine named "Orion_verify" so it is available for instant access. You can use this virtual machine to verify that the backed-up image can be restored.
dsmc restore vm Orion -vmname=Orion_verify  –Host=esxi.example.com 
  –datacenter=mydataCenter –VMRESToretype=INSTANTAccess –VMAUTOSTARTvm=YES

The –VMAUTOSTARTvm=YES option indicates that the virtual machine is started when it is restored. By default, the new virtual machine is not automatically started. With this default setting, you can reconfigure the virtual machine before you start it.

You can also list the versions of a virtual machine that were backed up by using the inactive or pick options or the pittime or pitdate options to select an inactive or active backup, from a particular date or time. For example, to display a list of backed up versions of the Orion virtual machine, by using the following command:
dsmc restore vm Orion -pick

For a virtual machine that is restored by using the –VMRESToretype=INSTANTAccess option, temporary data that is created by this virtual machine is stored in a VMware snapshot.

After you restore the temporary virtual machine (Orion_verify), run verification tools on it to verify the integrity of the disks and data. Use a utility such as chkdsk, or a utility or application of your choosing, to verify the virtual disks and data. If the temporary virtual machine passes the integrity checks, you can remove the temporary resources that were created to support the instant access restore operation.

Scenario: You want to determine whether any temporary (instant access) virtual machines exist, so you can run a clean-up operation to free the resources associated with them

Use the query vm command with one of the following options that you specify on the command line:

-VMRESToretype=INSTANTAccess
-VMRESToretype=ALLtype

Where:
-VMRESToretype=INSTANTAccess
Displays all temporary virtual machines that are running in instant access mode, created by a restore vm -VMRESToretype=INSTANTAccess operation.
-VMRESToretype=ALLtype
Displays all virtual machines with active instant access or instant restore sessions that were started by a restore vm command that uses either the -VMRESToretype=INSTANTAccess or VMRESToretype=-INSTANTRestore options.
The following examples show the syntax for the various options:
query vm * -VMREST=INSTANTA
query vm * -VMREST=ALL
You can add a –Detail option to each of the query vm commands shown to display more information about each of the temporary virtual machines.
query vm vmname –VMREST=INSTANTA –Detail
To remove the resources that were created for a temporary virtual machine named "Orion_verify", run the following command:
dsmc restore vm Orion –vmname=Orion_verify –VMRESToretype=VMCLeanup
The –VMRESToretype=VMCLeanup option deletes the temporary virtual machine from the ESXi host, unmounts any iSCIS mounts that were mounted, and clears the iSCSI device list from the ESX host. All temporary data for the temporary virtual machine is deleted from the VMware snapshot.

Scenario: You want to start an instant restore operation to restore a failed virtual machine to an ESX host, from a backup image created by Tivoli Storage Manager

The advantage of a full VM instant restore, as opposed to a classic full VM restore, is that an instant restore operation makes the virtual machine ready for immediate use, as soon as it is started. You do not have to wait for all data to be restored before you can use the virtual machine. During an instant restore operation, the virtual machine uses iSCSI disks until its local disks are fully restored. When the local disks are restored, the virtual machine switches I/O from the iSCSI disks to the local disks, without noticeable interruption of service.

Restore a virtual machine named Orion by using the following command:
dsmc restore vm Orion –Host=esxi.example.com –datacenter=mydatacenter 
  –VMTEMPDAtastore=temp_datastore –VMRESToretype=INSTANTRestore 
  –datastore=mydatastore
This command specifies the name of the virtual machine to restore, the host and data center to restore it to, and the restore type (-VMRESToretype=INSTANTRestore). The VMTEMPDAtastore option is a mandatory parameter for instant restore operations.

The temporary data store is used by vMotion to store the configuration of the restored virtual machine during the instant restore process. The name that you specify must be unique. It cannot match the name of any of the original data stores that were used by the virtual machine when it was backed up, and it cannot be the same as the name specified on the optional –datastore option. If the –datastore option is omitted, the virtual machine files are restored to the data stores that they used when the virtual machine was backed up.

By default, virtual machines that are instantly restored are provisioned with thick disks. You can change this behavior and provision thin disks by adding the –VMDISKProvision=THIN option to the command line, or in the client options file.

Important: For instant restore operations, ensure that both the temporary datastore that you specify with the vmtempdatastore option and the VMware datastore that is specified by the datastore option on the restore VM command have enough free storage to save the virtual machine that you are restoring, and the snapshot file that contains changes that were made to the data. If you are restoring a virtual machine and you specify thin or thick provisioning (-vmdiskprovision=thin or -vmdiskprovision=thick), the datastore that you restore the VM to must have enough free space to accommodate the total capacity of the VM disk, and not just the amount of disk that is used. For example, if a VM has 300 GB total capacity for its disk, you cannot restore that VM to a datastore that has less than 300 GB available, even if only a portion of the total capacity is being used.