VM Mobility with Hyper-VKristian NeseCTOLumagate
Mobility Core to Private Cloud• Virtualization is the basis of a Microsoft private cloud• Virtual machine mobility is key ...
AgendaLive Migration
Live Migration without Infrastructure• You can even live migrate virtual machines between two  Hyper-V servers with no sha...
DEMOLIVE MIGRATION
Hyper-V Server 1                 Hyper-V Server 2    VMMS                              VMMS                   Negotiation ...
Hyper-V Server 1                   Hyper-V Server 2    VMMS                                VMMS                   LM Conne...
Hyper-V Server 1                       Hyper-V Server 2    VMMS                                    VMMS                   ...
Hyper-V Server 1                    Hyper-V Server 2    VMMS                                 VMMS                   LM Con...
Hyper-V Server 1                    Hyper-V Server 2    VMMS                                 VMMS                   LM Con...
Hyper-V Server 1                    Hyper-V Server 2    VMMS                                 VMMS                   LM Con...
Hyper-V Server 1                   Hyper-V Server 2    VMMS                                VMMS                   LM Conne...
Hyper-V Server 1                   Hyper-V Server 2    VMMS                                VMMS                   LM Conne...
Hyper-V Server 1   Hyper-V Server 2    VMMS                VMMS                       Virtual                       Machin...
PowerShell • Move-VM “VM10" “TOMWAITS" •     -IncludeStorage –DestinationStoragePath •     “C:VMS"
AGENDALIVE MIGRATION WITH SMB
Live Migration with SMB• Storage is not moved, just the running virtual machine   • Like live migration in a cluster, with...
Setting up SMB for Live Migration• There are a couple of steps involved in getting this right• Both users and computers ne...
Setting up the share – SharePermissions
Setting up the share – SharePermissions
Setting up the share – SharePermissions
Setting up the share – File Permissions
Setting up the share – File Permissions
Setting up the share
Setting up the share
PowerShell•   MD X:VMS•   ICACLS.EXE X:VMS --% /Grant PrivateAdministrator:(CI)(OI)F•   ICACLS.EXE X:VMS --% /Grant Privat...
DEMOLIVE MIGRATION - SMB
PowerShell • Move-VM “VM20" “THEWHO"
AGENDALIVE MIGRATION AND CLUSTERS
Live Migration Improvements• Live Migration in Windows Server 2008 R2 is  great  • but how to make it better?
Live Migration Improvements•   Live Migration in Windows Server 2008 R2 is great    •   but   how to make it better?      ...
Live Migration between clusters• You can move a virtual machine between two clusters   • Follow these steps:      • Remove...
DEMOLIVE MIGRATION BETWEEN CLUSTERS
AGENDALIVE MIGRATION SECURITY
Configuring Live Migration
Ensure Live Migration Networks areSecure• Physically Secure• IPSec / other encryption options
Managing security and authentication• This gets very complicated once more than two  computers are involved  • And sometim...
Understanding credential security
Understanding credential security
Understanding credential security
How this affects Hyper-V
How this affects Hyper-V
How this affects Hyper-V
How to make this work?• Two options:  • Allow user credentials to be shared between the Hyper-V    servers – just for the ...
Enabling Constrained Delegation•   On the domain controller, open Active Directory Users and    Computers.•   In the conso...
More Resources• Taylor Brown’s Blog:  • http://blogs.msdn.com/b/taylorb/• Official Documentation:  • http://technet.micros...
PowerShell Remoting with CredSSP•   On the server:     •   Enable-WSManCredSSP Server•   On the client     •   Enable-WSMa...
Remote Desktop•   Hopefully I do not need to tell you how to use this 
AGENDALIVE STORAGE MIGRATION
Storage Migration•   Move any part of a running virtual machine with no need to turn it off     •   VHDs     •   Config fi...
Storage Migration Architecture                  VHD            Source Device   Destination Device
Storage Migration Architecture                  VHD           VHD            Source Device   Destination Device
Storage Migration Architecture                  VHD           VHD            Source Device   Destination Device
Storage Migration Architecture                  VHD           VHD            Source Device   Destination Device
Storage Migration Architecture                                VHD            Source Device   Destination Device
DEMOLIVE STORAGE MIGRATION
PowerShell • Move-VMStorage "File Server 3" ` •   -DestinationStoragePath ` •   "K:Virtual MachinesFile Server 3"
Storage Migration – Performance• Data is moved with an un-buffered file copy operation   • XCOPY /J• Causes a lot of I/O c...
Configuring Storage Migration
AGENDAIMPORTING VIRTUAL MACHINES
Improvements to VM Import• Basic building block of mobility• Improvements:1. Allow you to import a raw XML file2. Provide ...
DEMOIMPORTING A VM
PowerShell -VhdSourcePath "C:UsersbenarmDesktopImport"PS C:> Import-VM "C:UsersbenarmDesktopImport76F5DA48-5181-4E75-83ED-...
PowerShell = Compare-vmPS C:> $VMCompatReport"C:UsersbenarmDesktopImport76F5DA48-5181-4E75-83ED-FB2F65B56C8F.xml" -Copy -V...
PowerShellPS C:> $VMCompatReport.Incompatibilities | ft messageMessage-------Could not find Ethernet switch Public.Cannot ...
PowerShell -VM $VMCompatReport.VM -count disconnect-PS C:> Set-VMProcessorPS C:> get-vmnetworkadapter -VM $VMCompatReport....
AGENDACOMPARING TECHNOLOGIES
Zero       Protects   Protects against   Protects       Automatic     Workgroup                  Downtime   against    sit...
AGENDAQ&A
NIC 2013 - VM Mobility
NIC 2013 - VM Mobility
NIC 2013 - VM Mobility
NIC 2013 - VM Mobility
NIC 2013 - VM Mobility
Upcoming SlideShare
Loading in …5
×

NIC 2013 - VM Mobility

1,243 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,243
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
34
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • 2. Memory pages are transferred from the source node to the destination node.In the second stage of a live migration, the memory assigned to the migrating virtual machine is copied over the network to the destination server. This memory is referred to as the “working set” of the migrating virtual machine. A page of memory is 4 KB. For example, suppose that a virtual machine named “test virtual machine” configured with 1024 MB of RAM is migrating to another server running Hyper-V. The entire 1024 MB of RAM assigned to this virtual machine is the working set of “test virtual machine.” The utilized pages within the “test virtual machine” working set are copied to the destination server. In addition to copying the working set of “test virtual machine” to the destination server, Hyper-V monitors the pages in the working set for “test virtual machine” on the source server. As memory pages are modified by “test virtual machine,” they are tracked and marked as being modified. The list of modified pages is simply the list of memory pages “test virtual machine” has modified after the copy of its working set has begun. During this phase of the migration, the migrating virtual machine continues to run. Hyper-V iterates the memory copy process several times, with each iteration requiring a smaller number of modified pages to be copied. After the working set is copied to the destination server, the next stage of the live migration begins. 3. Modified pages are transferred.The third stage of a live migration is a memory copy process that duplicates the remaining modified memory pages for “test virtual machine” to the destination server. The source server transfers the CPU and device state of the virtual machine to the destination server. During this stage, the network bandwidth available between the source and destination servers is critical to the speed of the live migration. Using a 1 Gigabit Ethernet or faster is important. The faster the source server transfers the modified pages from the migrating virtual machines working set, the more quickly the live migration is completed. The number of pages transferred in this stage is determined by how actively the virtual machine accesses and modifies the memory pages. The more modified pages there are, the longer it takes to transfer all pages to the destination server. After the modified memory pages are copied completely to the destination server, the destination server has an up-to-date working set for “test virtual machine.” The working set for “test virtual machine” is present on the destination server in the exact state it was in when “test virtual machine” began the migration process. Note You can cancel the live migration process at any point before this stage of the migration. 4. The storage handle is moved from the source server to the destination server.During the fourth stage of a live migration, control of the storage associated with “test virtual machine,” such as any virtual hard disk files or physical storage attached through a virtual Fibre Channel adapter, is transferred to the destination server. (Virtual Fibre Channel is also a new Hyper-V feature in Windows Server 2012.)5. The virtual machine is brought online on the destination server.In the fifth stage of a live migration, the destination server now has the up-to-date working set for “test virtual machine,” as well as access to any storage used by “test virtual machine.” At this point “test virtual machine” is resumed.6. Network cleanup occurs.
  • NIC 2013 - VM Mobility

    1. 1. VM Mobility with Hyper-VKristian NeseCTOLumagate
    2. 2. Mobility Core to Private Cloud• Virtualization is the basis of a Microsoft private cloud• Virtual machine mobility is key an efficient and responsive private cloud deployment
    3. 3. AgendaLive Migration
    4. 4. Live Migration without Infrastructure• You can even live migrate virtual machines between two Hyper-V servers with no shared infrastructure • Need to be in the same domain• Entire virtual machine moved (VHDs + running state) with no downtime
    5. 5. DEMOLIVE MIGRATION
    6. 6. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS Negotiation Virtual Machine Virtual Hard Disks
    7. 7. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Machine Virtual Hard Disks
    8. 8. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Machine Virtual Hard Storage Migration Disks
    9. 9. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Machine Virtual Hard Virtual Hard Storage Mirror Disks Disks
    10. 10. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Live Migration Machine Virtual Hard Virtual Hard Storage Mirror Disks Disks
    11. 11. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Live Migration Machine Virtual Hard Virtual Hard Storage Mirror Disks Disks
    12. 12. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Machine Virtual Hard Virtual Hard Disks Disks
    13. 13. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS LM Connection Virtual Machine Virtual Hard Disks
    14. 14. Hyper-V Server 1 Hyper-V Server 2 VMMS VMMS Virtual Machine Virtual Hard Disks
    15. 15. PowerShell • Move-VM “VM10" “TOMWAITS" • -IncludeStorage –DestinationStoragePath • “C:VMS"
    16. 16. AGENDALIVE MIGRATION WITH SMB
    17. 17. Live Migration with SMB• Storage is not moved, just the running virtual machine • Like live migration in a cluster, without high availability• Requires SMB 3.0
    18. 18. Setting up SMB for Live Migration• There are a couple of steps involved in getting this right• Both users and computers need access to the share
    19. 19. Setting up the share – SharePermissions
    20. 20. Setting up the share – SharePermissions
    21. 21. Setting up the share – SharePermissions
    22. 22. Setting up the share – File Permissions
    23. 23. Setting up the share – File Permissions
    24. 24. Setting up the share
    25. 25. Setting up the share
    26. 26. PowerShell• MD X:VMS• ICACLS.EXE X:VMS --% /Grant PrivateAdministrator:(CI)(OI)F• ICACLS.EXE X:VMS --% /Grant PrivateTOMWAITS$:(CI)(OI)F• ICACLS.EXE X:VMS --% /Grant PrivateDAVIDBOWIE$:(CI)(OI)F• ICACLS.EXE X:VMS /Inheritance:R• New-SmbShare -Name VMS -Path X:VMS –FullAccess `• PrivateAdministrator, PRIVATEDAVIDBOWIE$, PRIVATETOMWAITS$
    27. 27. DEMOLIVE MIGRATION - SMB
    28. 28. PowerShell • Move-VM “VM20" “THEWHO"
    29. 29. AGENDALIVE MIGRATION AND CLUSTERS
    30. 30. Live Migration Improvements• Live Migration in Windows Server 2008 R2 is great • but how to make it better?
    31. 31. Live Migration Improvements• Live Migration in Windows Server 2008 R2 is great • but how to make it better? • Faster • Concurrent live migration • Deeper integration into clustering • Etc…
    32. 32. Live Migration between clusters• You can move a virtual machine between two clusters • Follow these steps: • Remove the virtual machine from the source cluster • Use Hyper-V Manager to live migrate the virtual machine to a node in the destination cluster • Join the virtual machine to the destination cluster• Virtual machine never needs to be turned off • However, it is not protected from hardware failure during the course of the migration.
    33. 33. DEMOLIVE MIGRATION BETWEEN CLUSTERS
    34. 34. AGENDALIVE MIGRATION SECURITY
    35. 35. Configuring Live Migration
    36. 36. Ensure Live Migration Networks areSecure• Physically Secure• IPSec / other encryption options
    37. 37. Managing security and authentication• This gets very complicated once more than two computers are involved • And sometimes even when there are only two computers involved
    38. 38. Understanding credential security
    39. 39. Understanding credential security
    40. 40. Understanding credential security
    41. 41. How this affects Hyper-V
    42. 42. How this affects Hyper-V
    43. 43. How this affects Hyper-V
    44. 44. How to make this work?• Two options: • Allow user credentials to be shared between the Hyper-V servers – just for the purposes of live migration • Enable “Constrained Delegation” in Active Directory • Make it look like we are actually logged into the Hyper-V server that starts the live migration • PowerShell Remoting • Remote Desktop
    45. 45. Enabling Constrained Delegation• On the domain controller, open Active Directory Users and Computers.• In the console tree, under DomainName, click Computers.• Right-click the computer running Hyper-V, and then click Properties.• On the Delegation tab, click Trust this computer for delegation to specified services only.• Click either Use any authentication protocol or Use Kerberos only.• Click Add, and then click Users and Computers.• Type the name of the other computer running Hyper-V, and then click OK.• From the list of available services, select Microsoft Virtual System Migration Service and CIFS and then click OK.
    46. 46. More Resources• Taylor Brown’s Blog: • http://blogs.msdn.com/b/taylorb/• Official Documentation: • http://technet.microsoft.com/en-us/library/jj134199
    47. 47. PowerShell Remoting with CredSSP• On the server: • Enable-WSManCredSSP Server• On the client • Enable-WSManCredSSP Client –DelegateComputer <FQDN of the server>• Establish the session: • New-PSSession <FQDN of the Server> -Authentication CredSSP -Credential <User> | Enter-PSSession• Or just run a command: • ICM <FQDN of the Server> {<command to run>} -Authentication CredSSP - Credential <User>
    48. 48. Remote Desktop• Hopefully I do not need to tell you how to use this 
    49. 49. AGENDALIVE STORAGE MIGRATION
    50. 50. Storage Migration• Move any part of a running virtual machine with no need to turn it off • VHDs • Config files • Snapshots • Etc…• Perform storage upgrades with no downtime• Respond to I/O bottlenecks with no downtime
    51. 51. Storage Migration Architecture VHD Source Device Destination Device
    52. 52. Storage Migration Architecture VHD VHD Source Device Destination Device
    53. 53. Storage Migration Architecture VHD VHD Source Device Destination Device
    54. 54. Storage Migration Architecture VHD VHD Source Device Destination Device
    55. 55. Storage Migration Architecture VHD Source Device Destination Device
    56. 56. DEMOLIVE STORAGE MIGRATION
    57. 57. PowerShell • Move-VMStorage "File Server 3" ` • -DestinationStoragePath ` • "K:Virtual MachinesFile Server 3"
    58. 58. Storage Migration – Performance• Data is moved with an un-buffered file copy operation • XCOPY /J• Causes a lot of I/O churn
    59. 59. Configuring Storage Migration
    60. 60. AGENDAIMPORTING VIRTUAL MACHINES
    61. 61. Improvements to VM Import• Basic building block of mobility• Improvements:1. Allow you to import a raw XML file2. Provide ability to “fix up” virtual machine during import
    62. 62. DEMOIMPORTING A VM
    63. 63. PowerShell -VhdSourcePath "C:UsersbenarmDesktopImport"PS C:> Import-VM "C:UsersbenarmDesktopImport76F5DA48-5181-4E75-83ED-FB2F65B56C8F.xml" -CopyImport-VM : Unable to import virtual machine due to configuration errors.Please use Compare-VM to repair the virtual machine.At line:1 char:1+ import-vm "C:UsersbenarmDesktopImport76F5DA48-5181-4E75-83ED-FB2F65B56C8F.x ...+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-VM],VirtualizationOperationFailedException + FullyQualifiedErrorId :Microsoft.HyperV.PowerShell.Commands.ImportVMCommand
    64. 64. PowerShell = Compare-vmPS C:> $VMCompatReport"C:UsersbenarmDesktopImport76F5DA48-5181-4E75-83ED-FB2F65B56C8F.xml" -Copy -VhdSourcePath "C:UsersbenarmDesktopImport"PS C:> $VMCompatReportVM : Microsoft.HyperV.PowerShell.VirtualMachineOperationType : ImportVirtualMachineDestination : BENARM-EPSILONPath : C:UsersbenarmDesktopImport76F5DA48-5181-4E75-83ED-FB2F65B56C8F.xmlSnapshotPath :VhdDestinationPath : C:UsersPublicDocumentsHyper-VVirtual Hard DisksVhdSourcePath : C:UsersbenarmDesktopImportIncompatibilities : {33012, 14420}
    65. 65. PowerShellPS C:> $VMCompatReport.Incompatibilities | ft messageMessage-------Could not find Ethernet switch Public.Cannot assign the specified number of processors for virtual machine Arandom virtual machine is out of range. The range is 1 through 12.(Virtual machine ID 76F5DA48-5181-4E75-83ED-FB2F65B56C8F)
    66. 66. PowerShell -VM $VMCompatReport.VM -count disconnect-PS C:> Set-VMProcessorPS C:> get-vmnetworkadapter -VM $VMCompatReport.VM | 2vmnetworkadapterPS C:> import-vm $VMCompatReportName State CPUUsage(%) MemoryAssigned(M)---- ----- ----------- -----------------A random virtual machine Off 0 0
    67. 67. AGENDACOMPARING TECHNOLOGIES
    68. 68. Zero Protects Protects against Protects Automatic Workgroup Downtime against site failure against data response to compatible hardware corruption failure failureLive Migration  L L L L LStorageMigration  L L L L Import / Export L L L L L Clustering K  K L  LHyper-V Replica L   K L Backup L  K  L 
    69. 69. AGENDAQ&A

    ×