A) Introduction
Join the channel Telegram of the AnonyViet 👉 Link 👈 |
Live Migration in Hyper-V is a function used to migrate a virtual machine from one physical Hyper-V host to another. In order to reduce the hardware burden (CPU, RAM, HDD) on the running Hyper-V host, migrate virtual machines to other physical Hyper-V. Serve in the case of server maintenance, server upgrade, increase availability and flexibility.
In Windows Server 2012 R2 there are the following types of Live migrations:
- Live Miration with RDMA-enable Network Adapters (New)
- Live Migration with Multi-Channel Network Adapters (New)
- Live Migration between 2 Hyper-V Host: move a virtual machine to another physical Hyper-V machine to run.
- Storage Migration: only convert the storage of the virtual machine from one Hyper-V host to another Hyper-V host or to the SAN system (including: Current Configuration, Snapshot, Smat Paging), while the virtual machine still runs directly on the Hyper-V host. old.
- Live Migration with iSCSI SAN: all virtual machine storage is stored on iSCSI SAN, and we just move virtual machines from one physical Hyper-V machine to another physical Hyper-V machine to run.
- Live migration with SMB 3.0 (Non-cluster and Non-CSV): Using the SMB 3.0 protocol (a network sharing protocol) to make a public folder and store the Storage of the virtual machine, this mechanism is to move the running virtual machine to another physical Hyper-V and the storage of the virtual machine is still located. on the shared folder.
- Live Migration with CSV/SAN: support virtual machine migration in SAN environments.
- Improved Live Migration: It is possible to move one or more running virtual machines at the same time. Live migration is faster thanks to Compression (memory), Remote Direct Access Memory, Multichannel Network Adapter. Substantial support in a Private Cloud environment
- Faster Live Migration: Because before the conversion, Hyper-V performs memory compression (Compression) so it significantly reduces CPU resources for processing and Network load. At least 10GB off if you use Compression or more than 10GB if you use RDMA and Multichannel Network Adapter
- Live Migration with RDMA-enabled Network Adapters: when you do a live migration. RDMA allows direct relocation of the data in Memory running on Hyper-V Source to the Hyper-V Destination host, and at the same time redirects the memory processing of the virtual machine on Hyper-V Source to Hyper-V Destination. At this time, the virtual machine on the Hyper-V Source side will use the CPU and Cache right at its machine for processing, and the memory will be accessed directly on the Hyper-V Destination side thanks to the network connection.
- Live Migration with Multi-Channel Network Adapters : Allows the use of multiple Network Adapter Cards to perform Live Migration. Very useful and greatly reduces Live Migration time if you are moving a large virtual machine.
There are 3 migration mechanisms:
- TCP/IP: keep the content from source to destination intact on the transmission line.
- Compression: compress the content and then transmit it on the transmission line
- SMB: supports SMB Direct combined with RDMA (Remote Direct Memory Access) and SMB Multichannel features.
B) Lab Live Migration Without Shared Storage
Live migration without shared storage allows the complete migration (including : Virtual Machine, Storage) of a running virtual machine from one physical Hyper-V host to another physical Hyper-V host in a domain environment without deployment. a Shared storage system (SAN, iSCSI SAN, or SMB 3.0). Downtime is very low.
- Still using Kerberos protocol for Live Migration (2 services: Cifs and Microsoft Virtual System Migration Service)
- If there is an error or problem during the live migration, the virtual machine will still be maintained and working properly.
- Supports migration in cluster and non-cluster environments.
- Support conversion with PowerShell.
Working principle:
- Virtual machines still work (read/write) normally on physical Hyper-V machines (users still use them normally).
- While the read / write process is still going normally, the system starts copying the VHD to the destination server you declared.
- After the copy process is completed, now the data on both sides has been mapped (mirror) and is completely the same. At this point, the system continues to replicate the changes that the user is using. (from the time of copy until now, for example, the user has saved a file or configured something on the virtual machine).
- After the source and destination have been fully synchronized, this is when the Live migration is set up.
- After the Live Migration takes place successfully, the Hyper-V Source server will redirect the user to use the virtual machine in the Hyper-V Destination Server.
The deployment model is as follows:
There are 2 physical machines running the Hyper-V feature in the domain: Huypd.com. In which Hyper-V1 machine creates a virtual machine VM1.
1) Configure 2 Hyper-V physical machines running Live Migration with Kerberos protocol.
- Enter AD machine –> ADUC (Active Directory User and Computer) –> Select Computer –> Select Hyper-V1 virtual machine –> Properties –> Delegation.
- Add Computer of Hyper-V Destination machine (Hyper-V2) and select 2 services “Cifs and Microsoft Virtual System Migration”.
- Do the same for the Hyper-V2 machine.
2) Enable Live Migration for 2 Hyper-V machines -> Select “Enable incoming and outgoing live migrations”
- Simultaneous live migrations are number of virtual machines that can be converted at the same time. Select Use any available network for live migration.
3) Move the virtual machine from Hyper-V1 to Hyper-V2 -> Right-click the virtual machine and select move
- Select “Move the virtual machine”, to move a virtual machine from one Hyper-V to another
- Declare the destination server (Hyper-V2)
- Choose a location to save the virtual machine on the Destination server (including: Configuration file, Snapshot, Smart paging).
- This step is to select Network in Virtual Switches for the virtual machines to run when they move to the Hyper-V Destination machine
- Result: The virtual machine from Hyper-V1 has been moved to the Hyper-V2 machine
- Can move virtual machines while they are running live