Start-VBRHvReplicaFailover

Short Description

Fails over corrupted Hyper-V VMs to their replicas.

Applies to

Platform: Hyper-V

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

Syntax

This cmdlet provides parameter sets that allow you to:

  • Perform failover.

Start-VBRHvReplicaFailover [-RestorePoint] <COib> [-Reason <string>] [-RunAsync]  [<CommonParameters>]

  • Perform permanent failover.

Start-VBRHvReplicaFailover [-RestorePoint] <COib> [-Reason <string>] [-RunAsync] [-Definite]  [<CommonParameters>]

  • Perform planned failover.

Start-VBRHvReplicaFailover [-RestorePoint] <COib> [-Reason <string>] [-RunAsync] [-Planned]  [<CommonParameters>]

Detailed Description

This cmdlet fails over a corrupted Hyper-V VM to its successfully created replica.

This cmdlet provides 3 parameter sets for the following operations:

  • Failover
  • Permanent failover
  • Planned failover

Run the Start-VBRHvReplicaFailback cmdlet to fail back to the original VM.

Run the Stop-VBRReplicaFailover cmdlet to undo failover. You can also undo planned failover.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

RestorePoint

Specifies the replica restore point to which you want to fail over.

Accepts the COib object. To get this object, run the Get-VBRRestorePoint cmdlet.

True

1

True (ByValue,
ByProperty
Name)

Reason

Specifies the reason for performing a failover.

String

False

Named

False

RunAsync

Defines that the command returns immediately without waiting for the task to complete.

SwitchParameter

False

Named

False

Definite

Defines that the failover is permanent.

SwitchParameter

False

Named

False

Planned

Defines that the failover is planned.

SwitchParameter

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

None.

Examples

Start-VBRHvReplicaFailoverExample 1. Performing Planned Failover to VM Replica

This example shows how to perform failover to the Hyper-V WebServer VM replica.

$restorepoint = Get-VBRRestorePoint -Name "Hyper-V WebServer"

Start-VBRHvReplicaFailover -RestorePoint $restorepoint[1] -Reason "Data recovery" -RunAsync -Planned

Perform the following steps:

  1. Run the Get-VBRRestorePoint cmdlet. Specify the Name parameter value. Save the result to the $restorepoint variable.
  2. Run the Start-VBRHvReplicaFailover cmdlet. Specify the following settings:
  • Set the $restorepoint variable as the RestorePoint parameter value.

The Get-VBRRestorePoint cmdlet will return an array of restore points. Consider that the array numbering starts with 0. In our example, the fourth restore point is used.

  • Specify the Reason parameter value.
  • Provide the RunAsync parameter.
  • Provide the Planned parameter.

Start-VBRHvReplicaFailoverExample 2. Performing Permanent Failover to VM Replica

This example shows how to perform failover to the Hyper-V WebServer VM replica.

$restorepoint = Get-VBRRestorePoint -Name "Hyper-V WebServer"

Start-VBRHvReplicaFailover -RestorePoint $restorepoint[3] -Reason "Data recovery" -RunAsync -Definite

Perform the following steps:

  1. Run the Get-VBRRestorePoint cmdlet. Specify the Name parameter value. Save the result to the $restorepoint variable.
  2. Run the Start-VBRHvReplicaFailover cmdlet. Specify the following settings:
  • Set the $restorepoint variable as the RestorePoint parameter value.

The Get-VBRRestorePoint cmdlet will return an array of restore points. Consider that the array numbering starts with 0. In our example, the fourth restore point is used.

  • Specify the Reason parameter value.
  • Provide the RunAsync parameter.
  • Provide the Definite parameter.

Related Commands

Get-VBRRestorePoint