다음을 통해 공유


Start-AzureSiteRecoveryTestFailoverJob

Site Recovery 보호 엔터티에 대한 테스트 장애 조치(failover)를 시작합니다.

참고

이 설명서에서 참조하는 cmdlet은 Service Management API를 사용하는 레거시 Azure 리소스를 관리하기 위한 것입니다. Azure Resource Manager 리소스를 관리하는 cmdlet은 Az PowerShell 모듈을 참조하세요.

Syntax

Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]

Description

Start-AzureSiteRecoveryTestFailoverJob cmdlet은 Azure Site Recovery 보호 엔터티 또는 복구 계획의 테스트 장애 조치(failover)를 시작합니다. Get-AzureRMSiteRecoveryJob cmdlet을 사용하여 작업이 성공했는지 확인할 수 있습니다.

예제

예제 1: 테스트 장애 조치(failover) 시작

PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer
PS C:\> $ProtectionEntity = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $ProtectionContainer
PS C:\> Start-AzureSiteRecoveryTestFailoverJob -ProtectionEntity $ProtectionEntity -Direction "PrimaryToRecovery"
ID               : c38eecdc-731c-405b-a61c-08db99aae2fe
ClientRequestId  : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P
State            : NotStarted
StateDescription : NotStarted
StartTime        : 
EndTime          : 
AllowedActions   : {}
Name             : 
Tasks            : {}
Errors           : {}

첫 번째 명령은 Get-AzureSiteRecoveryProtectionContainer cmdlet을 사용하여 보호된 컨테이너를 가져와서 $ProtectionContainer 변수에 저장합니다.

두 번째 명령은 Get-AzureSiteRecoveryProtectionEntity cmdlet을 사용하여 $ProtectionContainer 저장된 보호된 컨테이너에 속하는 보호된 엔터티를 가져옵니다. 이 명령은 결과를 $ProtectionEntity 변수에 저장합니다.

최종 명령은 $ProtectionEntity 저장된 보호된 엔터티에 대한 테스트 장애 조치(failover) 작업을 시작하고 장애 조치(failover)의 방향을 지정합니다.

예제 2: 복구 계획을 사용하여 테스트 장애 조치 시작

PS C:\> $RecoveryPlan = Get-AzureSiteRecoveryRecoveryPlan -Name "RecoveryPlan01"
Start-AzureSiteRecoveryTestFailoverJob -Direction PrimaryToRecovery -RecoveryPlan $RecoveryPlan

이 명령은 Get-AzureSiteRecoveryRecoveryPlan cmdlet을 사용하여 현재 Azure Site Recovery 자격 증명 모음에 대한 RecoveryPlan01이라는 복구 계획을 가져옵니다. 이 명령은 계획을 $RecoveryPlan 변수에 저장합니다.

두 번째 명령은 $RecoveryPlan 저장된 복구 계획에 대한 테스트 장애 조치(failover) 작업을 시작하고 장애 조치(failover)의 방향을 지정합니다.

매개 변수

-Direction

장애 조치 방향을 지정합니다. 이 매개 변수에 허용되는 값은 다음과 같습니다.

  • PrimaryToRecovery
  • RecoveryToPrimary
Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LogicalNetworkId

논리 네트워크의 ID를 지정합니다.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Network

테스트 장애 조치(failover)에 사용할 네트워크 개체를 지정합니다. 네트워크를 가져오려면 Get-AzureSiteRecoveryNetwork cmdlet을 사용합니다.

Type:ASRNetwork
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NetworkType

테스트 장애 조치(failover)에 사용할 네트워크 유형을 지정합니다. 이 매개 변수에 허용되는 값은 다음과 같습니다.

  • 없음
  • 새로 생성
  • Existing
Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Profile

이 cmdlet이 읽는 Azure 프로필을 지정합니다. 프로필을 지정하지 않으면 이 cmdlet은 로컬 기본 프로필에서 읽습니다.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProtectionContainerId

보호된 컨테이너의 ID를 지정합니다. 이 cmdlet은 이 cmdlet이 지정하는 컨테이너에 속하는 보호된 가상 머신에 대한 작업을 시작합니다.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ProtectionEntity

Site Recovery 보호 엔터티 개체를 지정합니다.

Type:ASRProtectionEntity
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ProtectionEntityId

작업을 시작할 보호된 가상 머신의 ID를 지정합니다.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryPlan

작업을 시작할 복구 계획을 지정합니다.

Type:ASRRecoveryPlan
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RpId

작업을 시작할 복구 계획의 ID를 지정합니다.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VmNetworkId

가상 머신 네트워크의 ID를 지정합니다.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WaitForCompletion

cmdlet이 Windows PowerShell 콘솔에 컨트롤을 반환하기 전에 작업이 완료될 때까지 대기한다는 것을 나타냅니다.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False