Short Description
Starts restore of the entire Hyper-V VM.
Applies to
Platform: Hyper-V
For VMware, run Start-VBRRestoreVM.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
Start-VBRHvRestoreVM [-RestorePoint] <COib> [-Server <CHost>] [-Path <string>] [-VMName <string>] [-PreserveVmID <bool>] [-PowerUp] [-RegisterAsClusterResource] [-NICsEnabled <bool>] [-PreserveMACs <bool>] [-User <string>] [-Password <string>] [-Credential <pscredential>] [-Reason <string>] [-RunAsync] [-QuickRollback] [-Force] [<CommonParameters>] |
Detailed Description
This cmdlet starts restore of the entire VM.
Starting from Veeam Backup & Replication version 9.5 Update 3, the cmdlet checks if the data of the VM you want to restore changes its geographical location.
Note: |
The cmdlet will not run if the geographical location of the repository where VM backups reside and the target host location do not match. If you still want to run the cmdlet, use the Force parameter. |
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Restore | Specifies the VM restore point to which you want to restore. | True | 1 | True (ByValue, | False |
Server | Specifies the host where you want to locate the restored VM. By default, the cmdlet will restore a VM to its original location. | False | Named | False | False |
Path | Specifies the path to the folder where you want to restore the VM. | False | Named | False | False |
VMName | Specifies the name you want to apply to the restored VM. By default, the original VM name is applied. | False | Named | False | False |
Preserve | Indicates that the restored VM will get the UUID of the original VM. NOTE: The cmdlet deletes the original VM if you restore it to the same Hyper-V host. Default: True. | False | Named | False | False |
PowerUp | If set, the restored VM will be powered up immediately after the restore. Otherwise, you will have to power up the VM manually. | False | Named | False | False |
RegisterAs | If set, the restored VM will be registered as a part of a cluster in case you restore the VM to a clustered host. | False | Named | False | False |
NICsEnabled | If set to True, the restored VM will be connected to the network. Otherwise the VM will have no network connections. Default: False. | False | Named | False | False |
PreserveMACs | If set to True, the restored VM will get the MAC address of the original VM. Otherwise, the restored VM will get a new MAC address. Note that if the original VM keeps running, preserving the MAC address will cause conflict. Preserving the MAC address is useful in case the original VM will not be used in future - in this case, the restored VM will be able to use the MAC settings used by its applications, if any are installed. Default: False. | False | Named | False | False |
User | Specifies the user name you want to use for authenticating with the VM. If you use the Username/Password scenario, the Credentials parameter must be omitted. | False | Named | False | False |
Password | Specifies the password you want to use for authenticating with the VM. If you use the Username/Password scenario, the Credentials parameter must be omitted. | False | Named | False | False |
Credential | Specifies the credentials you want to use for authenticating with the VM. If you use the Credentials scenario, the User and Password parameters must be omitted. | False | Named | False | False |
Reason | Specifies the reason for performing restore of the selected VM. The information you provide will be saved in the session history so that you can reference it later. | False | Named | False | False |
RunAsync | Indicates that the command returns immediately without waiting for the task to complete. | False | Named | False | False |
QuickRollback | Indicates that the incremental restore must be performed. | False | Named | False | False |
Force | Indicates that the cmdlet will perform VM restore even if the geographical location of the repository where VM backups reside and the target host location do not match. | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Example 1
This example shows how to restore a VM to its original location.
You will need to perform the following steps:
- Run Get-VBRRestorePoint and select the needed restore point by its creation time. Save the result to the $rp variable.
- Run Start-VBRHvRestoreVM with the $rp variable to perform VM restore.
If you want to clone the original VM and keep both copies in the same location, the restored VM must have a different name and UUID. For that, specify the VMName parameter and set the PreserveVmID parameter to False. Otherwise, the cmdlet will replace the original VM with the restored one.
PS C:\PS> $rp = Get-VBRRestorePoint -Name srv01 | Sort -Property СreationTime -Descending | Select -First 1 PS C:\PS> Start-VBRHvRestoreVM -RestorePoint $rp -VMName srv01_copy -PreserveVmID $false |
Example 2
This example shows how to restore a VM to another location.
You will need to perform the following steps:
- Run Get-VBRRestorePoint and select the needed restore point by its creation time. Save the result to the $rp variable.
- Run Get-VBRServer to get the host where you want to locate the restored VM. Save the result to the $server variable.
- Run Start-VBRHvRestoreVM with the $rp and $server variables to perform VM restore. Use the Path parameter to specify the path to the folder on the target host where you want to restore the VM.
PS C:\PS> $rp = Get-VBRRestorePoint -Name srv01 | Sort -Property СreationTime -Descending | Select -First 1 PS C:\PS> $server = Get-VBRServer -Type HvServer -Name hyperv01.east.support PS C:\PS> Start-VBRHvRestoreVM –RestorePoint $rp –Server $server -Path "D:\Storage\HyperV\srv01_restored" |
Related Commands