Now we move virtual machines from node to node with or without being in a cluster.  To follow along read on!

 

This lab assumes that you have followed along with the previous part located on my blog here:

http://virtuallycloud9.com/index.php/category/labs/

 

Overview

In Lab 1, you will configure and use shared nothing live migration to transfer a running VM from one Hyper-V host to another without any interruption of service on the running virtual machine.

In Lab 2, you will implement a live storage migration. Live storage migration enables you to transfer the storage of a running VM from one Hyper-V host to another, from a local server to a cluster, or between folders, without any interruption of service on the running virtual machine. 

These labs combine technologies such as live storage migration and Hyper-V over SMB to perform the transfer without any required downtime. 

Objectives

In this series of exercises, you will explore the following:

·       Enabling live migration.

·       Performing a shared nothing live migration.

·       Performing a Live Storage Migration.

Prerequisites

·       Knowledge of Hyper-V

·       Familiarity with Windows PowerShell


Lab Deployment

This lab requires that the following host computers and virtual machines be running.

Host Computers:

WS2012VMHost

Host Name: WS2012VMHost

OS: Windows Server 2012

Primary Roles: Hyper-V Server; contains all lab VMs (except Server3)

WS2012VMHost1

Host Name: WS2012VMHost1

OS: Windows Server 2012

Primary Roles: Hyper-V Server; contains Server3 VM

WS2012VMHost2

Host Name: WS2012VMHost2

OS: Windows Server 2012

Primary Roles: Hyper-V Server

Virtual Machines:

WS2012VMDC

Virtual Machine Name: WS2012VMDC

OS: Windows Server 2012

Primary Roles: Domain Controller and Enterprise Root CA for the domain

Additional Roles: DHCP, DNS

Server3

Virtual Machine Name: WS2012VMServer3

OS: Windows Server 2012

Primary Roles: File and Storage Services

Node1

Virtual Machine Name: WS2012VMNode1

OS: Windows Server 2012

Primary Role: Failover Clustering

Node2

Virtual Machine Name: WS2012VMNode2

OS: Windows Server 2012

Primary Role: Failover Clustering

 

 

Lab 1 – Shared Nothing Live Migration

Tasks in this lab module

1)      Enable live migration on host machines

2)      Perform a shared nothing live migration

 

1)     Enable live migration on host machines

Log on to one of the hosts as Domain\Administrator using the password Passw0rd!

From the Taskbar, open Server Manager.

Click Add other servers to manager.

Click Find Now.

Press CTRL, select WS2012VMHost1 and WS2012VMHost2, and then click the Add arrow to add them to the list of selected computers. 

Click OK.

In Server Manager, click the Hyper-V Console.

Right-click WS2012VMHost1, and then click Remote Desktop Connection. 

Log on to WS2012VMHost1 as Domain\Administrator using the password Passw0rd!

On WS2012VMHost1, open Server Manager, and then launch the Hyper-V console.

Repeat steps 8-10 to open the Hyper-V console on WS2012VMHost2.

In Server Manager, click Tools, and then click Hyper-V Manager.

Click Connect to Server, type WS2012VMHost1, and then click OK.

Click Hyper-V Manager.

Click Connect to Server, type WS2012VMHost2, and then click OK.

Click WS2012VMHost1, click WS2012VMServer3, and then click Start.

Wait for the VM to fully start.

Click Windows PowerShell and then type the following commands, pressing ENTER after each. If the script fails to run, type Set-ExecutionPolicy RemoteSigned and then re-run the script.

 

Enable-VMMigration -ComputerName WS2012VMHost1

Set-VMHost -ComputerName WS2012VMHost1 -VirtualMachineMigrationAuthenticationType Kerberos -UseAnyNetworkForMigration $True

Enable-VMMigration -ComputerName WS2012VMHost2

Set-VMHost -ComputerName WS2012VMHost2 -VirtualMachineMigrationAuthenticationType Kerberos -UseAnyNetworkForMigration $True

 

2)     Perform a live migration

Open Windows PowerShell.

Type MSTSC  /V:Server3 and press ENTER.

Log on to Server3 as Domain\Administrator using the password Password!

Click OK to acknowledge the password notification.

Open Task Manager, and then display the CPU graph on the Performance tab.

Note: Position this screen so that you can see it during the remainder of the lab. This will allow you to see that the server remains “online” during the migration.

Switch to the console of WS2012VMHost1.

Switch to Hyper-V Manager.

Click WS2012VMServer3.

In the Actions pane, click Move.

Click Next.

Click Next to move the virtual machine.

In Name, type WS2012VMHost2, and then click Next.

Click Next to move the virtual machines data to a single location.

In Folder, type C:\Vmstore, and then click Next.

Click Finish.

Optionally, reverse the above process to move the VM back to the original host.

 

Lab 2 – Hyper-V Live Storage Migration

Tasks in this lab module

 

Perform a Hyper-V live storage migration.

Note:  Before beginning this lab, ensure that Lab 1, Task 1 has been completed.

IMPORTANT:  Before beginning this lab, use Windows Explorer to connect to \\hafileserver\vmstore and delete any contents.  This will ensure that there is enough room on the share to perform the move operations.

                                                                                                                                                             

Perform a Hyper-V live storage migration

Type MSTSC  /V:Server3 and press ENTER.

Log on to Server3 as Domain\Administrator using the password Password!

Click OK to acknowledge the password notification.

Switch to the console of WS2012VMHost1.

Note:  If you did not perform Lab 1, Task 2, Step 12, use WS2012VMHost2.

On Server3, open Server Manager, click Tools, and then click Hyper-V Manager.

On Server3, open Windows PowerShell.

Type test-connection Server3 –count 200 and then press ENTER.

Position your windows so that you can see both the Hyper-V Manager containing WS2012VMServer3 and the 3 PowerShell window on Server 3.

 

Note:  This will allow you to see that the storage migration to the failover cluster is live, and that no downtime is incurred.

 

Switch to Hyper-V Manager.

Click WS2012VMServer3.

In the Actions pane, click Move.

Click Move the virtual machine's storage, and then click Next.

Click Move only the virtual machine's virtual hard disks, and then click Next.

Accept the default VHD selection, and then click Next.

In Folder, type \\HAFileServer\VMStore, and then click Next.

Click Finish.

The move operation will take a few minutes to complete. During this time, use the Hyper-V console to observe the progress of the move and the Windows PowerShell windows to observe the test-connection activity. Note that the remote desktop session is not interrupted. This move will take several minutes. You can wait for the move to end, or click Cancel.

 

More Information

Tommy’s Blog

http://virtuallycloud9.com/

Windows Server Blogs

http://blogs.technet.com/b/windowsserver/

Windows Server 2012 Product Download

http://aka.ms/ws2012tp

Microsoft Virtual Academy

http://aka.ms/tpva

Windows Server 2012 Virtual Labs

http://technet.microsoft.com/en-us/windowsserver/hh968267.aspx

Windows Azure 90-Day Free Trial Page

http://aka.ms/mshosting