Let’s get this out of the way quickly. Yes, you can run Linux virtual machines on a Hyper-V cluster and you can Live Migrate them. I have SUSE Enterprise Linux 10 SP1 VM’s running on our cluster. I can live migrate them from one host to another and not lose a ping packet during the move.
There’s a configuration that you must to to ensure this stability. I first read about it online and it is in the Microsoft documentation for the Linux integration components.
You need to set the MAC (Ethernet) address of the virtual machine to be static. VMM makes that quite easy.
Above you can see the properties of a SLES VM on our Hyper-V cluster. You can see that I’ve put the VM into a VLAN so I can firewall it. I’ve also set the NIC to have a static MAC address. Unlike most controls for networking, this must be set while the VM is powered off. There’s a button on the right which allows you to generate a MAC address. This is created from a pool of MAC addresses.
VMM allows you to specify what that pool of MAC addresses is. It must be a range that does not exist on any hardware – there’s always the chance that you could otherwise accidentally set a MAC address for a VM that clashes with that of an actual Ethernet network card and cause all sorts of ARP issues.
Once you have that setting configured, boot up your VM, install the OS, install the IC’s and test. Here I have run a ping from within the VM to the default gateway while running a live migration from VMM:
64 bytes from 192.168.100.31: icmp_seq=15 ttl=64 time=0.469 ms
64 bytes from 192.168.100.31: icmp_seq=16 ttl=64 time=0.052 ms
— 192.168.100.31 ping statistics —
107 packets transmitted, 107 received, 0% packet loss, time 106053ms
rtt min/avg/max/mdev = 0.030/0.090/0.469/0.083 ms
Zero packets lost and no massive spikes in latency. Failing to set the MAC to be static can cause issues where the VM appears to go offline. There is an example of this on the MS support site (KB976724). In this scenario, SLES 10 SP2 live migrates, changes MAC address on the new host and then loses it’s IP configuration. This is because the Linux distro binds the IP configuration to the MAC address.
By the way, there’s usually no reason to configure this setting for Windows guests.
Aidan,
Do you know of a good method to migrate non local Linux servers to Hyper-V?
Thanks,
Eoin