Linux on Hyper-V

One of Hyper-V R2’s weaker support areas is for Linux. That doesn’t mean that you can’t get Linux guests to work on Hyper-V. However, there are some things you’ll need to be aware of.

Ubuntu 12.04 LTS on Hyper-V

Ubuntu 12.04 LTS on Hyper-V

“Official Linux Support” and What That Means

Hyper-V R2 only officially supports three Linux distributions as guests: Red Hat Enterprise, CentOS, and SUSE. It’s important to note that “officially supports” is not a synonym for “nothing else will work”. It just means that if you can’t make it work, Microsoft won’t have anyone at Product Support Services who will be able to help you. It also means that even if you can get it to work today, no one is going to be there for you if tomorrow’s kernel patch makes it stop working. Doomsday warnings aside, anything that runs on x86 or x64 technologies can be virtualized on Hyper-V, but if you can’t get integration components installed, they’ll usually be 100% emulated (read: slow). As of this writing, the latest version of Linux Integration Services is 3.2 and is available directly from Microsoft’s download page. This comes in an ISO format so you can attach it directly to the virtual machine and install from there. The .PDF file on the download page explains how to install the Integration Services. The directions are written specifically for RedHat, but should work similarly on most other distributions. If your Linux distribution doesn’t see the virtual CD-ROM drive, you can attempt to get them onto your system by manually adding them to a virtual floppy image and connecting that way.

The larger Linux kernel branches are starting to include Hyper-V drivers, so some newer distribution releases will just work right off the image with no further work on your part. Notable among these is Ubuntu Linux 12.04 LTS, which is a Debian-based distribution. To the best of my researching ability, I cannot find anywhere that confirms that the base Debian distribution is doing this, so your mileage will vary based on the distribution that you choose. I would highly recommend searching the Internet for your distribution, as there are plenty of very smart people out there who have gotten these things to work. Getting Ubuntu running on Hyper-V R2 is no more difficult than getting a new Server 2008 R2 installation to work. Just make a virtual machine with an empty IDE VHD, attach the Ubuntu ISO image, start it up, and follow the prompts.

What I have found is that getting 64-bit Debian/Ubuntu distributions to work on Hyper-V is much more difficult. I was able to partially get 64-bit to work by installing Ubuntu inside a VMWare Player session without a network card, only instead of installing the VMWare components, I connected the Hyper-V Linux Integration Services image instead. Once those were installed, I used SCVMM 2008 R2 to perform a V->V conversion of the image. Once that completed, I added a synthetic network card. Aside from the fact that this is far off the beaten path, it was only partially successful. The video performance was relatively bad and I experienced a few issues with the mouse. While certainly not show-stopping problems and perhaps unimportant if you install only the server edition without a GUI, it wasn’t a thorough enough success for me to claim it as a “solution”. Unless you absolutely must have 64-bit capability in your Linux VM, choose 32-bit.

 Troubleshooting and Performance

If you’re not using one of the officially supported distributions and you’re having trouble finding assistance, there are two quick things to check. Without integration components, your distribution might choke on multiple processors and the synthetic network adapter. Reduce the virtual CPU count to one and remove any synthetic network cards. Emulated network adapters should work fine, but it’s a safer approach to install without any network cards and try to add them after your installation is successful. If you can’t get integration components to work at all, then it’s highly probable that your mouse isn’t going to work either. There’s really no workaround available for that.

The emulated IDE driver isn’t quite as fast under Linux as it is under Windows. You still must keep your startup partition on an IDE drive just as with a Windows VM, but placing your Linux VM’s data on a virtual SCSI drive will yield a greater performance difference than it would on a Windows guest.

Third-Party Software Vendor Support

Something to keep in mind is that if your Linux guest is intended to run a commercial application such as a VoIP component, your vendor may choose to not support that application on a Hyper-V guest, even if you’re using a supported distribution. It’s obviously best if you find out if that’s an issue prior to deployment.


Hyper-V’s built-in method of enabling back up of Windows virtual machines while they’re powered on involves the tried-and-true Volume Shadow Copy Service (VSS) that Microsoft has employed since Windows 2000. VSS is triggered at the hypervisor level and it communicates through the integration components with VSS inside the virtual machine. If you’re interested, we provided an earlier series that covered this in some detail. Since VSS is a proprietary Microsoft technology, your Linux virtual machines won’t have it. As a general rule, Hyper-V backups will not be able to take a live backup of Linux guests. That’s because if VSS in the hypervisor is unable to communicate with VSS through integration components, its default behavior is to save the virtual machine, take a VSS snapshot, and then bring the virtual machine back online. Some backup applications, notably Altaro Hyper-V Backup(Disclaimer: this blog is run by Altaro), can override this behavior and back up a Linux guest without interruption. Even with this capability, nothing can escape the fact that Linux does not have VSS. These backups will be taken live, but the backed up image will be crash-consistent, not application-consistent. If you’re not sure what that means, please reference the VSS article linked earlier.

Dynamic Memory

Hyper-V does not support Dynamic Memory in Linux guests at all. You’ll need to take this into consideration when sizing. If you set dynamic memory on a Linux guest, Hyper-V will not complain. The VM will simply never use anything more than the minimum amount because it will be completely unaware that it can ask for more. However, Hyper-V will set aside at least some of any designated reserve memory even though it will never be used, so ensure you only set static memory for a Linux guest.

The Community Is There For You

One of the most powerful draws to the Linux world is its large and generally helpful community. As long as you’re using a distribution with a fairly large installed base, there are probably hundreds, maybe even thousands of experts available to help you. If an Internet search doesn’t yield results for your scenario or issue, don’t be afraid to ask the community for help. There’s a good chance someone else has had the same problem as you and might have fixed it.

Linux on Hyper-V Summary

Fortunately, the list of considerations for running Linux on Hyper-V really isn’t very long. It’s true that Linux on Hyper-V support isn’t quite as thorough as it is on some competing hypervisors, but, aside from third party vendors refusing support, there’s nothing about it that precludes it from any but the most exacting Linux deployments.


Altaro Hyper-V Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

Leave a comment or ask a question

Your email address will not be published. Required fields are marked *

Your email address will not be published.

Notify me of follow-up replies via email

Yes, I would like to receive new blog posts by email

What is the color of grass?

Please note: If you’re not already a member on the Dojo Forums you will create a new account and receive an activation email.