Linux operating systems Windows operating systems
IBM Tivoli Storage Manager, Version 7.1

Restore VM

Use the restore vm command to restore a virtual machine that was previously backed up.

Windows operating systems
The Restore VM command can be used to restore both Microsoft Hyper-V virtual machines and VMware virtual machines. The information for each type of restore is presented in its own heading. If you are restoring a virtual machine that is part of a Hyper-V setup, you can skip over the Restore VM for VMware virtual machines text. If you are restoring a VMware virtual machine, you do not need to read the Restore VM for Hyper-V virtual machines text.
Linux operating systems Windows operating systems

Restore VM for VMware virtual machines

The Restore VM command can be used to restore VMware virtual machines or VMware virtual machine templates.

If you have the backup-archive client installed on a separate system that is configured as a vStorage backup server, you can restore full VM backups to the ESX or ESXi server that they came from, or to a different server. To restore a full VM backup to a different server, use the -host option. The backup-archive client copies the data from the Tivoli® Storage Manager server over either the LAN or SAN. The client then writes the data directly to the ESX server, by using the transport method that is specified in the client options file.

Restoring a full VM backup creates a new virtual machine; the configuration information and content of the new machine is identical to what it was when the backup occurred. All virtual machine disks are restored to the specified point-in-time, as virtual disks in the newly created virtual machine.

When you restore a specific disk, by using the :vmdk= syntax, an existing virtual machine is updated with the specified virtual disk data. Only the specified disks are restored to the existing virtual machine; other disks in the virtual machine are not altered. The existing VM that you are restoring the disk to must be powered off before you initiate the restore operation.

To create a new virtual machine, specify the -vmname parameter and provide a name for the new virtual machine. The -vmname parameter creates a new VM with a configuration that is identical to what it was when the backup occurred. If you also specify the :vmdk= syntax, data is restored to any disks that are included in the :vmdk= parameters; disks that are not included are restored, but only as unformatted disks that do not contain data.

Virtual machines are restored to their original vApp, Resource Pool, Cluster, or VM Folder, if the containers exist. During a restore operation, if the destination target (a vCenter or ESXi host) does not have the required containers, the virtual machine is restored to the top-level default location on the target ESXi host. If you use the command-line client to restore a virtual machine, and if the virtual machine cannot be restored to its original inventory location, an informational message (ANS2091I) is displayed. If you use the Java™ GUI to restore a virtual machine, and if the virtual machine cannot be restored to its original inventory location, the informational message is not displayed, but the virtual machine is still restored to the top-level default location.

Windows operating systems Full VM backups that were previously created by using VCB can still be restored by using the original VCB restore steps. To restore full VM backups that were created by VCB, see Restoring full VM backups that were created with VMware Consolidated Backup. If you use VCB to restore a virtual machine, use the VMware converter program on the client to move the restored files to a running state on a VMware server. If the backup-archive client is running in a virtual machine, and if you performed a file-level backup of the virtual machine’s files, you can restore the backed-up files to the virtual machine by using the command-line interface or the Java GUI.

Supported Clients

Linux operating systems This command is valid on supported Linux clients that are installed on a vStorage backup server for a VMware virtual machine.

Windows operating systems This command is valid on supported Windows clients that are installed on a vStorage backup server for a VMware virtual machine.

Syntax

Read syntax diagramSkip visual syntax diagram
                             .-----------------------.   
                             V .-:vmdk=all-vmdk----. |   
>>-REStore VM--sourcevmspec----+-------------------+-+---------->
                               +-:vmdk=cnfg--------+     
                               +-:vmdk=disk label--+     
                               '-:-vmdk=disk label-'     

>--+------------------------------+--+------------+------------->
   +- -- -VMNAme="newVMname"------+  '- --options-'   
   +- --DATACENTER="myDatacenter"-+                   
   +- --HOST="myHost"-------------+                   
   '- --DATASTORE="myDatastore"---'                   

>--+---------------------+-------------------------------------><
   '-destinationfilespec-'   

Parameters

Note: Any parameter that contains spaces must be enclosed in quotation (" ") marks.
sourcevmspec
Specifies the name of the virtual machine (or VM template) that was backed up.
VMNAme
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
Specifies the new name for the virtual machine after it is restored (if you do not want to use the name that is specified by sourcevmspec). You cannot use wildcards in the virtual machine name.
DATACENTER
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
Specifies the name of the data center to restore the VM to as it is defined in the vSphere vCenter. If the data center is contained in a folder, you must specify the -datacenter option when you restore the virtual machine and include the folder structure of the data center in the data center name. For example, the following syntax is valid:
-datacenter=folder_name/datacenter_name

When you restore a virtual machine by using the GUI, you must restore the virtual machine to a different location. If you restore to the original location, you cannot specify the folder name of the data center. Without a folder name to help locate the original data center, the restore operation fails.

HOST
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
Specifies the domain name of the ESX host server to restore to as it is defined in the vSphere vCenter.
DATASTORE
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
Specifies the data store to restore the virtual machine to. The data store can be on a SAN, NAS, or iSCSI device. You can specify only one data store when you restore a virtual machine. If you do not specify a datastore parameter, the virtual machine's vmdk file is restored to the data store it was on when the backup was created.
Windows operating systems destinationfilespec
This parameter is for VMware VCB restores only. It specifies the location where VCB Full VM image files are restored. If this option is not specified the vmbackdir option is used.
:vmdk=all-vmdk
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
This option specifies that all virtual disks (*.vmdk files) are included when the VM is restored. This is the default.
:vmdk=cnfg
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
This option specifies that the virtual machine configuration information is restored. The configuration information is always restored when a new virtual machine is created. However, by default the configuration is not restored when you update an existing virtual machine with selected virtual disks.
Ordinarily, restoring configuration information to an existing virtual machine fails because the restored configuration information conflicts with the existing virtual machine configuration information. Use this option if the existing configuration file for a virtual machine on the ESX server has been deleted, and you want to use the backed up configuration to re-create it.
:vmdk=disk label
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
This option is used to specify the disk label of the virtual disks to include in the restore operation. You specify this option only if you want to selectively restore data from specific disks.
:-vmdk=disk label
This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
This option is used to specify the disk label of one or more virtual disks to exclude from the restore operation.
Table 1. Restore VM command: Related options when restoring VMware virtual machines
Option Where to use
datacenter Command line or options file. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
datastore Command line or options file. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
host Command line or options file. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
inactive Command line.
pick Command line. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
pitdate Command line. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
pittime Command line. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.
Windows operating systems vmautostartvm

This parameter is only valid when instantaccess is specified as the vmrestoretype value.

Command line or client options file.
vmbackdir Command line or client options file.
vmbackuptype Command line or client options file.
Windows operating systems vmdiskprovision

This parameter is only valid when instantrestore is specified for the vmrestoretype value.

Command line or client options file.
Windows operating systems vmiscsiserveraddress

This parameter is only valid when either instantaccess or instantrestore is specified for the vmrestoretype value.

Command line or client options file.
Windows operating systems vmrestoretype Command line.
Windows operating systems vmtempdatastore

This parameter is only valid when instantrestore is specified for the vmrestoretype value.

Command line or client options file.
vmvstortransport Command line or client options file. This parameter is not valid for restoring VMware virtual machines that were backed up using VCB.

Examples

Windows operating systems Task
To perform an instant restore or instant access operation from the command line, see Scenarios for running full VM instant access and full VM instant restore from the backup-archive client command line.
Task
Restore the most recent backup version of myVM to its original name. Use the VMware management interface to delete the original virtual machine, before you restore it using this syntax.
dsmc restore vm myvm 
Task
Restore the most recent backup version of myvm to a new machine that is created with the name "Test Machine", and with the restore target for the data center, ESX host, and datastore all specified on the command.
dsmc restore vm myvm -vmname="Test Machine" 
  -datacenter="myDatacenter" -host="myHostName" 
   -datastore="myDatastore"
Task
Restore the most recent backup version of myvm. Restore to a data center named mydatacenter. The data center is within the vCenter; the relative path within the vCenter is dirA/datacenters/.
dsmc restore vm myvm -vmname="Test Machine" 
  -datacenter="dirA/datacenters/myDatacenter" 
  -host="myHostName" -datastore="myDatastore"
Task
Restore a VM template back to the same location and name.
dsmc restore vm vmTemplateName
Task
Restore a VM template to a new location.
dsmc restore vm vmTemplateName-vmname=newName 
  -datastore=newDatastore -host=newHost 
   -datacenter=newDatacenter
Task
Restore only Hard Disk 2 and Hard Disk 3 to the existing VM named vm1.
dsmc restore vm "vm1:vmdk=Hard Disk 2:vmdk=Hard Disk 3"
Task
Restore all disks to the existing virtual machine named vm1, but do not restore the data from Hard Disk 4.
dsmc restore vm "vm1:-vmdk=Hard Disk 4"
Task
Restore only the data from hard Disk 1 to the existing virtual machine vm1; do not update any configuration information.
Note: When you restore an existing virtual machine, the default behavior is to not update the configuration information.
dsmc restore vm "vm1:vmdk=Hard Disk 1:-vmdk=cnfg"
Task
Restore all disks to the existing virtual machine named vm1.
dsmc restore vm "vm1:vmdk=all-vmdk"

This command updates all virtual disks on an existing virtual machine, named vm1. Note that this action is different from the action that is performed by dsmc restore vm vm1, which creates a new virtual machine named vm1 (vm1 must not exist in order for dsmc restore vm vm1 to succeed).

Windows operating systems

Restore VM for Microsoft Hyper-V virtual machines

Use the Restore VM command to restore Hyper-V guests. You can restore Hyper-V guests to a local disk, a SAN-attached disk, or to a cluster shared volume.

If the virtual machine that you are restoring exists, the backup-archive client shuts it down and deletes all files that comprise the virtual machine. The client then restores it from the image that is stored on the Tivoli Storage Manager server. If the virtual machine is a member of a Windows Server 2012 cluster, the virtual machine is taken offline from the cluster, which stops the virtual machine, the files are deleted, and then the client restores it from the Tivoli Storage Manager backup.

Even though the client shuts down the virtual machine before it deletes it, manually shutting down the virtual machine before you run the Restore VM command is a good practice to follow, to bring any in-progress application activities to an orderly stop. Then, use the Restore VM command to restore the virtual machine such that its content and configuration is identical to what it was when it was backed up.

Supported Clients

This command is valid on supported Windows clients that are installed on a Hyper-V host system.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-REStore VM--sourcevmspec--+------------+--------------------><
                             '- --options-'   

Parameters

Any parameter that contains spaces must be enclosed in quotation (" ") marks.

Note: Any parameter that contains spaces must be enclosed in quotation (" ") marks.
sourcevmspec
Specifies the name of the virtual machine that was backed up.
Table 2. Restore VM command: Related options when restoring Hyper-V virtual machines
Option Where to use
inactive Command line
pick Command line
pitdate Command line
pittime Command line
vmbackuptype Command line or client options file. To restore a Hyper-V virtual machine, this option must be set to HYPERVFULL.

Examples

Task
Restore the most recent backup version of a virtual machine named myVM.
dsmc restore vm myvm


Feedback