The following is a description of the procedures used to perform automated restoration using the VMware script provided.
Stopping the virtual machine to be restored
Stop the virtual machine to be restored.
Deletion of all snapshots of virtual machine to be restored
Delete all snapshots of the virtual machine to be restored.
Execute the restore script
Execute the restore script in the same directory as the backup script from the command prompt on vCenter Server. The following is an example.
> powershell C:\Script_ETERNUS_1\exe\VMRestore.ps1 -vm VM1 -l C:\Script_ETERNUS_1\log\backup.log
The restore script is processed in the following sequence.
The data of backup volume is restored to the restore volume.
Storage adapter is re-scanned and datastore is updated.
The restore volume is resignatured with the datastore.
The System Area of a virtual machine on a transaction volume to be restored is deleted from the disk.
A virtual machine to be restored is added from the resignatured datastore on the restore volume.
The snapshots of the restored virtual machine are restored.
The virtual machine restored to the restore volume is moved to the original transaction volume through Cold Migration.
The datastore resignatured for restoration is deleted.
Start the restored virtual machine
Start the virtual machine restored in step 3.
The following is an overview of restore script processing executed in step 3.
Figure E.7 Overview of Restore Script Processing (When "VM1" is specified for -vm option at the time the restore script is executed)
Note
This script may be restored when a virtual machine subject to restoration exists. If a virtual machine subject to restoration does not exist, make a new registration with the same virtual machine name as when the backup was performed.