CentOS 6.6 Updates and Fixes for Hyper-V Guests

CentOS 6.6 was recently released. As expected, there are a few fixes and updates for Hyper-V guests.

The changes I can remember off the top of my head for Hyper-V guests are:

  • Updated KVP and VSS user-space daemons
  • CentOS 6.6 is now fully supports virtual NUMA topology presented by the host. In the past, if you have a guest that had processors and memory that spanned across more than 1 NUMA node, the guest would crash due to a bug in the kernel.
  • The hv_balloon driver should now not cause a constant 1.00 load average due to the way how the driver reported the memory pressure back to the host.

Unfortunately, the documentation says that there is experimental support for CentOS 6.6 running as a Generation 2 guest. The installer runs fine, but since there is no hyperv-keyboard driver included in the initramfs image of the installer. You will need to install CentOS 6.6 via automated means by using a kickstart file. Unfortunately, when you first boot into the system, you will notice the guest crashes with a kernel panic. This makes Generation 2 support with CentOS 6.6 somewhat pointless at this time.

Adding a New Linux Distribution on System Center VMM 2012 R2’s list of Operating Systems

For hosters who use Windows Azure Pack along with System Center VMM 2012 R2, they might find that sometimes they need to support a XYZ Linux distribution for their customers. However they’ll quickly find they can’t get that distribution to display correctly on the Azure Portal as the only option to choose is “Other Linux”. Here’s a SQL query that anybody can use to inject a custom Operating System into VMM’s database:

USE [VirtualManagerDB]
GO

INSERT INTO [dbo].[tbl_IL_OS]
([OSId]
,[Name]
,[Description]
,[Architecture]
,[OSFlags]
,[VMWareGuestId]
,[OSType])
VALUES
('EBAB54C0-A9FA-4A3F-A21C-94775B96A6E5' /* Generate UUID */
,'Debian GNU/Linux 6 (64-bit)' /* Limited to 64 Chars */
,'Debian GNU/Linux 6 (64-bit)' /* Longer description of Linux Distro */
,'amd64' /* Use x86 for i386, amd64 for x86_64 */
,'28' /* This remains constant */
,'otherLinux64Guest' /* This is meant for VMware, go lookup the VMX spec files for this value */
,'1') /* Leave this at one, that's what the other OSes looked like */
GO

If you installed VMM 2012 R2 with a different SQL database name, adjust the USE statement accordingly.

Hyper-V Generation 2 Support for Linux Guests

Recently Microsoft announced Generation 2 Virtual Machines which really is an UEFI guest without the emulated PCI bus. Initially the only supported Operating Systems were:

  • Windows 8 (Integration Services Update Required)
  • Windows 8.1
  • Windows Server 2012 (Integration Services Update Required)
  • Windows Server 2012 R2

Well, now you can add pretty much any Linux distribution to the list right now. Thanks to the hard work being done by the Linux Integration Services team, they’ve got the mainline Linux kernel working right on Hyper-V under a Generation 2 platform. However the only distribution that will install correctly inside a Generation 2 Virtual Machine is OpenSuSE 13.1.

However if you want your Linux distribution to run inside a Generation 2 VM right now, you’ll have to install it manually via debootstrap or something similar. One thing to keep min mind is if your kernel is older than 3.11, you’ll need to either backport specific changes or upgrade to a newer mainline version of the kernel before you can even proceed to install your favorite distribution inside a generation 2 virtual machine.

Integration components wise, most of the modules will load just fine except hyperv_fb, the framebuffer device driver for Hyper-V guests. Unfortunately hyperv_fb is broken under a generation 2 VM hence why you’ll need to have EFI framebuffer support compiled in your kernel or you won’t get any video at all! The same goes for GRUB, it’ll also need efi_uga and efi_gop modules built in your bootx64.efi GRUB image. And oh, did I forget to mention that you’ll also have to disable Secure Boot as Hyper-V doesn’t support any way to loading public certificates into the Secure Boot database?

So if you want to take the plunge on having a Linux Generation 2 VM, be my guest. Start reading those git commit logs and start cherry picking! Remember, your mileage may vary. 😉

A few words about native VHD boot on 4K/512e Hard Drives…

I’ve gone cruising on the Interwebs for “Windows 8 Haters” just for laughs recently and I’ve found this portion of a comment left on some random site’s blog quite amusing:

2) It was so slow it hurt. And i have a quad core i5 @2.6 with 4 gb ram.

Uhm… Okay… I’ll fire off a few questions I’ve got in my back of my mind:

  • Are you using a brand new hard drive with that?
  • Did it also have an AF logo slapped on it?
  • Did you also try to do what the masses would have done, test Windows 8 out on a VHD?

If you answered yes to all of the questions above, then you’d seriously need to re-think what you’re doing. For the average “tech-savvy” user, I’d go easy on them, I mean who would really spend their time reading the TechNet Library for kicks. 😉

Pro tip for “speeding up” Windows 8 – Use the VHDX format to native boot into Windows 8 if you have a 512e disk. Doing so could greatly reduce the negative effects that RMW does on a hard drive. If you don’t know what RMW stands for and what the effects are, just think of it this way: If you have to make the disk read 2 physical sectors to address one NTFS block that spans across the 2 sectors, do you really think that it’s going to take longer to read that one sector? Heck yeah.

On the flip side, users who decide to hold out with Windows 7 or Server 2008 R2 are unfortunately out of luck. They can not native boot with a VHDX file at all. But they can boot the VHDX file under Hyper-V that’s for sure 😉