Move-ClusterVirtualMachineRole

Move-ClusterVirtualMachineRole

Moves the ownership of a clustered virtual machine to a different node.

구문

Parameter Set: InputObject
Move-ClusterVirtualMachineRole [[-Name] <String> ] [[-Node] <String> ] [-Cancel] [-Cluster <String> ] [-IgnoreLocked] [-InputObject <PSObject> ] [-MigrationType <NativeGroupHelp.VmMigrationType> ] [-VMId <Guid> ] [-Wait <Int32> ] [ <CommonParameters>]

자세한 설명

The Move-ClusterVirtualMachineRole cmdlet moves the ownership of a clustered virtual machine to a different node.

This cmdlet is used to live migrate a clustered virtual machine. For quick migration, use Move-ClusterGroup after using Get-ClusterResource and Set-ClusterParameter to set the OfflineAction parameter of the virtual machine resource to save state, or a value of 1.

Note 매개 변수를 사용하는 도메인의 DirectAccess에 대해서만 원격 액세스 에지 토폴로지에서 전체 설치를 수행하려면 다음을 실행합니다. 이 cmdlet은 서버 컴퓨터에서 CredSSP(자격 증명 보안 서비스 공급자) 인증 없이 원격으로 실행할 수 없습니다.

매개 변수

-Cancel

Specifies that an in-progress live migration of the virtual machine be canceled.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Cluster<String>

Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is . or it is omitted, then the cmdlet runs on the local cluster.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-IgnoreLocked

Specifies that locked groups are ignored when running the cmdlet.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-InputObject<PSObject>

Specifies the clustered virtual machine to move.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByValue)

와일드카드 문자 허용 여부

false

-MigrationType<NativeGroupHelp.VmMigrationType>

Specifies the type of migration to perform for the virtual machine. The options are as follows:
-- Live: Transparently migrates the virtual machine without a dropped network connection or perceived downtime.
-- Quick: Rapidly migrates a running virtual machine with minimal downtime.
-- Shutdown: Performs an orderly shutdown of the operating system (waiting for all processes to close) on the virtual machine, and then migrates the virtual machine.
-- ShutdownForce: Shuts down the operating system on the virtual machine without waiting for slower processes to finish, and then migrates the virtual machine.
-- TurnOff: Turns off the virtual machine without shutting down the operating system first, then migrates the virtual machine. This is the same as turning off the power, which means that data loss may occur.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Name<String>

Specifies the name of the clustered virtual machine to move.

별칭

없음

필수 여부

false

위치

1

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Node<String>

Specifies the name of the cluster node to which to move the virtual machine.

별칭

없음

필수 여부

false

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-VMId<Guid>

Specifies the virtual machine identifier (ID).

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-Wait<Int32>

Specifies the time in seconds to wait for the cmdlet. If the Wait parameter is not specified, then the cmdlet waits for completion. If -Wait 0 is specified, then the call is initiated and the cmdlet returns without waiting.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • Microsoft.FailoverClusters.PowerShell.ClusterGroup

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • Microsoft.FailoverClusters.PowerShell.ClusterGroup

예제

Example 1

This example performs a live migration of the clustered virtual machine named Virtual Machine1 to the node named node2. The Windows PowerShell® prompt does not return until the action is complete.

PS C:\> Move-ClusterVirtualMachineRole –Name "Virtual Machine1" -Node node2

Example 2

This example performs a live migration of clustered virtual machine named Virtual Machine1 to the node named node2. The Windows PowerShell® prompt returns as soon as the action has been initiated.

PS C:\> Get-ClusterGroup –Name "Virtual Machine1" | Move-ClusterVirtualMachineRole -Node node2 -Wait 0

Example 3

This example cancels the live migration in progress for the clustered virtual machine named Virtual Machine1.

PS C:\> Move-ClusterVirtualMachineRole –Name "Virtual Machine1" -Cancel

Example 4

This example performs a live migration of all clustered virtual machines that are currently owned by the node named node1 to the node named node2. The migration of each virtual machine should complete before the next migration is started. Use this cmdlet before performing maintenance on the specified node.

PS C:\> $groups = Get-ClusterNode –Name node1 | Get-ClusterGroup | Where-Object –FilterScript {$_ | Get-ClusterResource | Where-Object –FilterScript {$_.ResourceType -Like "Virtual Machine"}}
PS C:\> ForEach-Object -InputObject ($group in $groups) -Process { $group | Move-ClusterVirtualMachineRole -Node node2 }

관련 항목

Add-ClusterVirtualMachineRole

Update-ClusterVirtualMachineConfiguration