Use the restore vm command to restore a virtual machine that was previously backed up.
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 virtual machine backups to the ESX or ESXi server that they came from, or to a different server. To restore a full virtual machine 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 virtual machine 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 virtual machine 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 virtual machine 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 virtual machine 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.
Full virtual machine backups that were previously created by using VCB can still be restored by using the original VCB restore steps. To restore full virtual machine 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.
This command is valid on supported Linux clients that are installed on a vStorage backup server for a VMware virtual machine.
This command is valid on supported Windows clients that are installed on a vStorage backup server for a VMware virtual machine.
.-----------------------. 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-'
-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.
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. |
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. |
vmdiskprovision
This parameter is only valid when instantrestore is specified for the vmrestoretype value. |
Command line or client options file. |
vmiscsiserveraddress
This parameter is only valid when either instantaccess or instantrestore is specified for the vmrestoretype value. |
Command line or client options file. |
vmrestoretype | Command line. |
vmtempdatastore
This parameter is valid only 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. |
dsmc restore vm myvm
dsmc restore vm myvm -vmname="Test Machine"
-datacenter="myDatacenter" -host="myHostName"
-datastore="myDatastore"
dsmc restore vm myvm -vmname="Test Machine"
-datacenter="dirA/datacenters/myDatacenter"
-host="myHostName" -datastore="myDatastore"
dsmc restore vm vmTemplateName
dsmc restore vm vmTemplateName-vmname=newName
-datastore=newDatastore -host=newHost
-datacenter=newDatacenter
dsmc restore vm "vm1:vmdk=Hard Disk 2:vmdk=Hard Disk 3"
dsmc restore vm "vm1:-vmdk=Hard Disk 4"
dsmc restore vm "vm1:vmdk=Hard Disk 1:-vmdk=cnfg"
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).
Use the Restore VM command to restore Hyper-V guests. You can restore Hyper-V guests to a local disk, a SAN-attached disk, to a cluster shared volume, or to a remote file server share. Remote file server shares must be on a Windows Server 2012 (or newer) system.
If the virtual machine that you are restoring exists, the backup-archive client shuts it off 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 off the virtual machine before it deletes it, manually shutting off 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.
This command is valid on supported Windows clients that are installed on a Hyper-V host system.
>>-REStore VM-- --sourcevmspec----------------------------------> >--+------------------------------------------------+-----------> '- -vmname=--new_vm_name-- -- -targetpath=--path-' >--+----------------+------------------------------------------>< '-+------------+-' '- --options-'
Option | Where to use |
---|---|
inactive | Command line |
pick | Command line |
pitdate | Command line |
pittime | Command line |
replace | Command line, client options file, or client preferences editor. |
vmbackdir | Command line, client options file. |
vmbackuptype | Command line or client options file. To restore Hyper-V virtual machines, this must be set to -vmbackuptype=hypervfull. |
dsmc restore vm VM1
dsmc restore vm vm1 -replace=yes
dsmc restore vm VM1 -VmName=vm2
dsmc restore vm vm1 -VmName=vm2 -replace=prompt
dsmc restore vm vm1 -targetpath="E:\New Path"
dsmc restore vm vm1 -VmName=vm2 -targetpath=F:\NewPath
dsmc restore vm vm1 -pick -inactive