Supported Ubuntu virtual machines on Hyper-V

 

Applies To: Hyper-V Server 2012, Windows 8.1, Windows Server 2008 R2, Windows Server 2012 R2, Microsoft Hyper-V Server Technical Preview, Windows Server 2012, Hyper-V Server 2012 R2, Windows 10 Technical Preview, Windows Server Technical Preview, Windows 8

Beginning with Ubuntu 12.04, loading the “linux-virtual” package installs a kernel suitable for use as a guest virtual machine. This package always depends on the latest minimal generic kernel image and headers used for virtual machines. While its use is optional, the linux-virtual kernel will load fewer drivers than a more generic image.

To get full use of Hyper-V, load the appropriate linux-tools and linux-cloud-tools packages, which installs tools and daemons for use with virtual machines. When using the linux-virtual kernel, load linux-tools-virtual and linux-cloud-tools-virtual.

The following feature distribution map indicates the features in each version. The known issues and workarounds for each distribution are listed after the table.

Table legend

  • Built in – LIS are included as part of this Linux distribution. The Microsoft-provided LIS download package does not work for this distribution, so do not install it. The kernel module version numbers for the built in LIS (as shown by lsmod, for example) are different from the version number on the Microsoft-provided LIS download package. A mismatch does not indicate that the built in LIS is out of date.

  • - Feature available

  • (blank) - Feature not available

Feature

Windows Server operating system version

15.10

15.04

14.04

12.04

Availability

Built-in

Built-in

Built-in

Built-in

Core

2012 R2, 2012, 2008 R2

Networking

Jumbo frames

2012 R2, 2012, 2008 R2

VLAN tagging and trunking

2012 R2, 2012, 2008 R2

Live migration

2012 R2, 2012, 2008 R2

Static IP Injection

2012 R2, 2012

√ Note 1

√ Note 1

√ Note 1

√ Note 1

vRSS

2012 R2

TCP Segmentation and Checksum Offloads

2012 R2, 2012, 2008 R2

Storage

VHDX resize

2012 R2

Virtual Fibre Channel

2012 R2

√ Note 2

√ Note 2

√ Note 2

Live virtual machine backup

2012 R2

√ Note 3, 4, 6, 13

√ Note 3, 4, 6, 13

√ Note 3, 4, 5, 13

TRIM support

2012 R2

Memory

Configuration of MMIO gap

2012 R2

Dynamic Memory – Hot Add

2012 R2, 2012

√ Note 7, 8, 9

√ Note 7, 8, 9

√ Note 7, 8, 9

Dynamic Memory – Ballooning

2012 R2, 2012

√ Note 7, 8, 9

√ Note 7, 8, 9

√ Note 7, 8, 9

Video

Hyper-V specific video device

2012 R2, 2012, 2008 R2

Miscellaneous

Key/value pair

2012 R2, 2012, 2008 R2

√ Note 6, 10

√ Note 6, 10

√ Note 5, 10

√ Note 6, 10

Non-Maskable Interrupt

2012 R2

PAE Kernel Support

2012 R2, 2012, 2008 R2

File copy from host to guest

2012 R2

Generation 2 virtual machines

Boot using UEFI

2012 R2

√ Note 11, 12

√ Note 11, 12

√ Note 11, 12

Secure boot

2012 R2

Note

  1. Static IP injection may not work if Network Manager has been configured for a given Hyper-V-specific network adapter on the virtual machine. To ensure smooth functioning of static IP injection please ensure that Network Manager is turned off completely or has been turned off for a specific network adapter through its ifcfg-ethX file.

  2. While using virtual fiber channel devices, ensure that logical unit number 0 (LUN 0) has been populated. If LUN 0 has not been populated, a Linux virtual machine might not be able to mount fiber channel devices natively.

  3. If there are open file handles during a live virtual machine backup operation, then in some corner cases, the backed-up VHDs might have to undergo a file system consistency check (fsck) on restore.

  4. Live backup operations can fail silently if the virtual machine has an attached iSCSI device or direct-attached storage (also known as a pass-through disk).

  5. On 12.04 and 14.04, the following daemons must be installed manually for Ubuntu distributions:

    • VSS Snapshot daemon – This daemon is required to create live Linux virtual machine backups.

    • KVP daemon – This daemon allows setting and querying intrinsic and extrinsic key value pairs.

    • fcopy daemon – This daemon implements a file copying service between the host and guest.

    On long term support (LTS) releases, we recommend that you use the latest Hardware Enablement (HWE) kernel and that it's the virtual flavor kernel. To install the virtual flavor kernel on 14.04, run the following commands.

    # apt-get update # apt-get install --install-recommends linux-virtual-lts-vivid

    To install the virtual flavor kernel on 12.04, run the following commands.

    # apt-get update # apt-get install --install-recommends linux-generic-lts-trusty

    To install the daemons on 14.04, run the following commands as root (or sudo).

    # apt-get install --install-recommends linux-tools-virtual-lts-vivid linux-cloud-tools-virtual-lts-vivid

    To install the kvp daemon on 12.04, run the following commands as root (or sudo).

    # apt-get install --install-recommends hv-kvp-daemon-init linux-tools-lts-trusty linux-cloud-tools-generic-lts-trusty
  6. On 15.04 and 15.10, the following daemons must be installed manually for Ubuntu distributions:

    • VSS Snapshot daemon – This daemon is required to create live Linux virtual machine backups.

    • KVP daemon – This daemon allows setting and querying intrinsic and extrinsic key value pairs.

    • fcopy daemon – This daemon implements a file copying service between the host and guest.

    To install these daemons when using the linux-virtual package, run the following commands as root (or sudo).

    # apt-get update # apt-get install linux-tools-virtual linux-cloud-tools-virtual

    If not using linux-virtual, run the following commands as root (or sudo).

    # apt-get update # apt-get install linux-tools linux-cloud-tools
  7. Dynamic memory support is only available on 64-bit virtual machines.

  8. Dynamic Memory operations can fail if the guest operating system is running too low on memory. The following are some best practices:

    • Startup memory and minimal memory should be equal to or greater than the amount of memory that the distribution vendor recommends.

    • Applications that tend to consume the entire available memory on a system are limited to consuming up to 80 percent of available RAM.

  9. If you are using Dynamic Memory on Windows Server 2012 operating systems, specify Startup memory, Minimum memory, and Maximum memory parameters in multiples of 128 megabytes (MB). Failure to do so can lead to Hot-Add failures, and you might not see any memory increase on a guest operating system.

  10. In Windows Server 2012 R2, the key/value pair infrastructure might not function correctly without a Linux software update. Contact your distribution vendor to obtain the software update in case you see problems with this feature.

  11. Generation 2 virtual machines have secure boot enabled by default and Generation 2 Linux virtual machines will not boot unless the secure boot option is disabled. You can disable secure boot in the Firmware section of the settings for the virtual machine in Hyper-V Manager or you can disable it using Powershell:

    Set-VMFirmware –VMName "VMname" -EnableSecureBoot Off
  12. Before attempting to copy the VHD of an existing Generation 2 VHD virtual machine to create new Generation 2 virtual machines, follow these steps:

    1. Log in to the existing Generation 2 virtual machine.

    2. Change directory to the boot EFI directory:cd /boot/efi/EFI

    3. Copy the ubuntu directory in to a new directory named boot:sudo cp –r ubuntu/ boot

    4. Change directory to the newly created boot directory:cd boot

    5. Rename the shimx64.efi file:sudo mv shimx64.efi bootx64.efi

  13. Live virtual machine backup will not work with ext2 file systems. The default layout created by the Ubuntu installer includes ext2 file systems, so you must customize the layout to not create this file system type.

See Also