Hyper-V: How to Initiate a Live Migration Using Windows PowerShell

Hyper-V: How to Initiate a Live Migration Using Windows PowerShell

You can initiate Live migration using Windows PowerShell scripts for failover clustering. This is one of the steps documented in Hyper-V: Using Live Migration with Cluster Shared Volumes in Windows Server 2008 R2 (http://technet.microsoft.com/en-us/library/dd446679%28WS.10%29.aspx#BKMK_initiateLM%29

 To initiate a live migration using Windows PowerShell

  1. Open Windows PowerShell. Click Start, point to All Programs, click Windows PowerShell 2.0, and then click Windows PowerShell 2.0.

    The Failover Clustering feature must be installed on the computer on which you are starting the Windows PowerShell session. Or, you can use Remote Server Administration Tools for Windows® 7 to run the PowerShell session.

  2. To install the Failover Clustering feature, type:

    Import-Module FailoverClusters

  3. Type:

    Get-Cluster "<Cluster Name>" | Move-ClusterVirtualMachineRole -Name "<VM group name>" -Node "<Destination node name>"
  4. Check if cluster name has been successfully moved.

Where:

  • <Cluster Name> is the name of the cluster that the virtual machine is included in.
  • <VM group name> is the virtual machine resource group.
  • <Destination node name> is the name of the destination node to which you would like to move the virtual machine using live migration.

See Also

Other Languages

Leave a Comment
  • Please add 7 and 4 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Carsten Siemens edited Revision 25. Comment: Fixed misspelling

  • Henry Desouza edited Revision 22. Comment: added en-US title

  • Ed Price - MSFT edited Revision 20. Comment: Title casing. Adding tags.

  • Ed Price - MSFT edited Revision 19. Comment: Adding tags. Added "s" to "Other Languages"

  • Ed Price - MSFT edited Revision 17. Comment: Adding tags

  • Fernando Lugão Veltem edited Revision 16. Comment: update font style

  • Guowen Su edited Revision 15. Comment: Cluster migration

  • Fernando Lugão Veltem edited Revision 14. Comment: added portugues version  

  • Craig Lussier edited Revision 12. Comment: added en-US to tags and title

  • FZB edited Revision 11. Comment: added german link

Page 1 of 2 (14 items) 12
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Ed Price MSFT edited Revision 1. Comment: Added a "See Also" link.

  • yottun8 edited Revision 6. Comment: Other Language(ja-JP) added

  • yottun8 edited Revision 7. Comment: Repaired a "Number List".

  • yottun8 edited Revision 8. Comment: Repaired a "Number List".

  • FZB edited Revision 11. Comment: added german link

  • Craig Lussier edited Revision 12. Comment: added en-US to tags and title

  • Fernando Lugão Veltem edited Revision 14. Comment: added portugues version  

  • Guowen Su edited Revision 15. Comment: Cluster migration

  • Fernando Lugão Veltem edited Revision 16. Comment: update font style

  • Ed Price - MSFT edited Revision 17. Comment: Adding tags

  • Ed Price - MSFT edited Revision 19. Comment: Adding tags. Added "s" to "Other Languages"

  • is it possible to use a wildcard for the vm group name such as MainOffice* ?

  • The -Name parameter does not accept wildcards, per this article:

    technet.microsoft.com/.../ee461012.aspx

  • Ed Price - MSFT edited Revision 20. Comment: Title casing. Adding tags.

  • Henry Desouza edited Revision 22. Comment: added en-US title

Page 1 of 2 (20 items) 12