This is an archive version of the document. To get the most up-to-date information, see the current version.

Start-VBRHvInstantRecovery

Short Description

Starts Hyper-V Instant VM Recovery.

Applies to

Platform: Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Start-VBRHvInstantRecovery [-RestorePoint] <COib> [-Server <CHost>] [-Path <string>] [-VMName <string>] [-PreserveVmID <bool>] [-PowerUp <bool>] [-NICsEnabled <bool>] [-PreserveMACs <bool>] [-Reason <string>][-Credentials <CCredentials>] [-Force] [-EnableAntivirusScan] [-EnableEntireVolumeScan] [-VirusDetectionAction {DisableNetwork | AbortRecovery}]  [<CommonParameters>]

Detailed Description

This cmdlet allows you to perform Instant Recovery of a Hyper-V VM. The Instant VM Recovery for Hyper-V process creates a copy of a VM in a target location reading data from the directly from a compressed and deduplicated backup file.

With this cmdlet, you can perform the following recover scenarios:

  • Restore to original location
  • Restore to original location with different settings
  • Restore to another location
  • Secure restore

The instantly recovered VM runs from a backup and does not provide a wholly functioning service. You need to finalize the successful instant recovery by one of the following steps:

  • Remove the restored VM. You can stop publishing the recovered VM and discard the changes made to it while it was running from backup. To do this, run the Stop-VBRInstantRecovery cmdlet.
  • Migrate the restored VM to the production. To do this, run the Start-VBRHvInstantRecoveryMigration cmdlet.

Run the Restart-VBRInstantRecovery cmdlet to restart the Instant Recovery session if it failed for some reason.

Run the Get-VBRInstantRecovery cmdlet to get the session status.

Note:

  • To recover Hyper-V workloads to VMware vSphere VMs, run the Start-VBRViComputerInstantRecovery cmdlet.
  • 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
Pipeline
Input

Accept
Wildcard
Characters

RestorePoint

Specifies the VM restore point to which you want to restore the VM.

True

1

True (ByValue,
ByProperty
Name)

False

Server

Specifies the host where you want to restore the VM.

False

Named

False

False

Path

Used to redirect the redo logs.

Specifies the path to the folder where you want to restore the VM.

False

Note: This parameter is required if you provide the Server parameter.

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

PreserveVmID

If set to TRUE, the restored VM will get the ID of the original VM. Otherwise, the restored VM will get a new ID.

False

Named

False

False

PowerUp

If set to TRUE, the VM will be powered up right after it is restored. Otherwise, you will need to power up the VM manually.

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.

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.

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

Credentials

Used to access the VMs stored on shared folders.

Specifies the credentials you want to use to authenticate with the shared folder.

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

EnableAntivirusScan

Indicates that the cmdlet will perform secure restore. Veeam Backup & Replication will trigger the antivirus software to scan selected VMs before the restore.

False

Named

False

False

EnableEntireVolumeScan

For secure restore.

Indicates that the antivirus will continue VMs scan after the first virus threat is found. Use this option if you want to get the report on all virus threats.

False

Named

False

False

VirusDetectionAction

For secure restore.

Specifies the secure restore action when the infection is detected.

  • DisableNetwork - use this option if you want to restore VMs in with disabled network adapters (NICs).
  • AbortRecovery - use this option if you want to cancel the restore session.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Example 1

The example shows how to start Instant Recovery of the VM.

You will need to perform the following steps:

  1. Run Get-VBRRestorePoint to get the array of the restore points for the selected VM. Save the result to the $restorepoint variable.
  2. Run Start-VBRHvInstantRecovery with the $restorepoint and $server variables.

$restorepoint = Get-VBRRestorePoint

Start-VBRHvInstantRecovery -RestorePoint $restorepoint[1]

Example 2

The example shows how to start Instant Recovery of the VM. The job will run with the following settings:

  • The the path to the folder where the restored VM is located is "C:\Hyper-V\Virtual Hard Disks".
  • The VM will be restored with name "New-Exch01".
  • The PowerUp parameter is set to enable the VM power up automatically.

You will need to perform the following steps:

  1. Run Get-VBRRestorePoint to get the array of the restore points for the selected VM. Save the result to the $restorepoint variable.
  2. Run Get-VBRServer to get the specify the host where you want to locate the restored VM. Save the result to the $server variable.
  3. Run Start-VBRHvInstantRecovery with the $restorepoint and $server variables.

$restorepoint = Get-VBRRestorePoint

$server = Get-VBRServer

Start-VBRHvInstantRecovery -RestorePoint $restorepoint[1] -Server $server -Path "c:\Hyper-V\Virtual Hard Disks" -VMName "New-Exch01" -PowerUp $True

Example 3

The example shows how to run the secure restore of the selected VM. The job will run with the following settings:

  • The antivirus will continue VM scan after the first virus threat is found
  • In case the threat is detected, Veeam Backup & Replication will restore the VM with disabled NIC
  • The RunAsync parameter is set to bring the process to the background

You will need to perform the following steps:

  1. Run Get-VBRRestorePoint to get the array of the restore points for the selected VM. Save the result to the $restorepoint variable.
  2. Run Start-VBRHvInstantRecovery with the $restorepoint variable. Set the DisableNetwork value for the VirusDetectionAction parameter to restore the VM with disabled NIC.

$restorepoint = Get-VBRRestorePoint

Start-VBRHvInstantRecovery -RestorePoint $restorepoint[1] -RunAsync -EnableAntivirusScan -EnableEntireVolumeScan -VirusDetectionAction DisableNetwork

Related Commands

Get-VBRRestorePoint

Get-VBRServer

Get-VBRLocation