Speeding up Linux VMs with Hyper-V's Linux Integration Services
Upgrading Linux Integration Services
Since the ISO file ships with the necessary scripts to upgrade LIS on an existing installation, you don't have much to do. Just run the script relevant to your distribution, as follows:
- Mount the ISO file inside the Linux virtual machine.
2. As the root user, change to the directory relevant to your Linux distribution; for example,
# cd /media/CDROM/RHEL6012 # cd /media/CDROM/RHEL63
for RHEL/CentOS 6.0, 6.1, 6.2 (first line) or RHEL/CentOS 6.3 (second line).
Run the following shell script to upgrade the Hyper-V-specific drivers:
./Upgrade.sh
- Finally, reboot the Linux virtual machine.
After reboot, use the lsmod
or modinfo
command to check the status of the LIS modules. (See "Uninstalling LIS" for information on how to remove LIS from within the Linux virtual machine.)
Uninstalling LIS
You can uninstall LIS from within the Linux virtual machine using the following set of commands. To begin, execute these commands from the base shell:
rpm -qa | grep microsoft
Once executed, the command returns the version of the LIS installed:
kmod-microsoft-hyper-v-3.4-1.20120727 microsoft-hyper-v-3.4.20120727
Next, execute the command,
rpm -e microsoft-hyper-v-<version string> kmod-microsoft-hyper-v-<version string>
which in this example would be:
rpm -e microsoft-hyper-v-3.4.20120727 kmod-microsoft-hyper-v-3.4-1.20120727
Conclusion
In this article, I described how to use LIS in Linux virtual machines running on Hyper-V Server. You learned how components provided by LIS improve the overall performance of Linux virtual machines, how to activate LIS on Linux distributions that ship with Hyper-V-integrated components, and how to install the new version of LIS on Linux. For a summary of known issues with running Linux in a virtual machine on Hyper-V, see the box titled "Known Issues and Limitations."
Known Issues and Limitations
Before you switch over all your Linux systems to run in Microsoft hosts, be aware that some issues and limitations still exist for running Linux guest operating systems on Hyper-V Server:
- The ISO file is not mounted automatically. You must mount LIS ISO files using the
mount
command. - Formatting a VHDX file with an ext3 filesystem might fail. To work around this issue, either use an ext4 filesystem or create a VHDX file with a smaller block size, such as 1MB. Using the ext4 filesystem is recommended for production deployments of Linux on Hyper-V.
- Windows Server 2012 includes support for 4KB sector size disks. However, the use of 4KB drives is limited to Linux kernels that support them. Red Hat Enterprise Linux (RHEL) did not include support for 4KB drives until version 6.0.
- Virtual machines running Ubuntu 12.04 might not work correctly if they are configured with a legacy network adapter. A workaround is to configure Ubuntu 12.04 virtual machines with only Hyper-V-specific (or "synthetic") network adapters. Ubuntu 12.04 includes the Linux Integration Services drivers, but you must activate them as described in this article.
- To ensure that all disks connected to the virtual machine are visible, all disks connected to a SCSI controller must start with location
- If a disk was hot-removed from the system, the connected disks will not be rescanned until a new disk is added.
- If you have virtual machines configured to use more than seven virtual processors, you should add
numa=off
to the GRUBboot.cfg
file to work around a known issue in the Linux kernel. Similarly, If you have virtual machines configured to use more than 30GB RAM, you should addnuma=off
to the GRUBboot.cfg
. - If Linux Integration Services is removed from a virtual machine configured to use more than one virtual processor, you should disable the
irqbalance
service to allow successful shutdown of the virtual machine. - Verifying the digital signature of the RPM packages under Red Hat Enterprise Linux (by executing the
rpm -K
command) returns a KEYS ARE NOT OK message. - You might see event log entries stating that a storage device or network driver is a different version from the server. You can safely ignore these messages.
- SCVMM 2008 Service can crash with VMs running Linux Integration Components v3.1 for Hyper-V. The solution is to disable the KVP daemon on the Linux virtual machine, which will prevent the SCVMM service crash.
LIS Included
The following Linux distributions ship with LIS support. If you have one of these distros, you will still need to activate LIS before you can use it.
- CentOS 5.9
- CentOS 6.4
- Red Hat Enterprise Linux 5.9
- Red Hat Enterprise Linux 6.4
- SUSE Linux Enterprise Server 11 with SP2 and SP3
- Open SUSE 12.1
- Ubuntu 12.04 and 12.10
- Ubuntu 13.04 and 13.10
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.