Supported Ubuntu virtual machines on Hyper-V
Applies to: Windows Server 2022, Azure Stack HCI, version 20H2; Windows Server 2019, Hyper-V Server 2019, Windows Server 2016, Hyper-V Server 2016, Windows Server 2012 R2, Hyper-V Server 2012 R2, Windows 10, Windows 8.1
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 doesn’t work for this distribution, so don’t 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 doesn’t indicate that the built in LIS is out of date.
вњ” — Feature available
(blank) — Feature not available
Feature | Windows Server operating system version | 20.04 LTS | 18.04 LTS | 16.04 LTS | 14.04 LTS |
---|---|---|---|---|---|
Availability | Built-in | Built-in | Built-in | Built-in | |
Core | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Windows Server 2016 Accurate Time | 2019, 2016 | вњ” | вњ” | вњ” | |
Networking | |||||
Jumbo frames | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
VLAN tagging and trunking | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Live migration | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Static IP Injection | 2019, 2016, 2012 R2 | вњ” Note 1 | вњ” Note 1 | вњ” Note 1 | вњ” Note 1 |
vRSS | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
TCP Segmentation and Checksum Offloads | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
SR-IOV | 2019, 2016 | вњ” | вњ” | вњ” | |
Storage | |||||
VHDX resize | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Virtual Fibre Channel | 2019, 2016, 2012 R2 | вњ” Note 2 | вњ” Note 2 | вњ” Note 2 | вњ” Note 2 |
Live virtual machine backup | 2019, 2016, 2012 R2 | вњ” Note 3, 4, 5 | вњ” Note 3, 4, 5 | вњ” Note 3, 4, 5 | вњ” Note 3, 4, 5 |
TRIM support | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
SCSI WWN | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Memory | |||||
PAE Kernel Support | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Configuration of MMIO gap | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Dynamic Memory — Hot-Add | 2019, 2016, 2012 R2 | вњ” Note 6, 7, 8 | вњ” Note 6, 7, 8 | вњ” Note 6, 7, 8 | вњ” Note 6, 7, 8 |
Dynamic Memory — Ballooning | 2019, 2016, 2012 R2 | вњ” Note 6, 7, 8 | вњ” Note 6, 7, 8 | вњ” Note 6, 7, 8 | вњ” Note 6, 7, 8 |
Runtime Memory Resize | 2019, 2016 | вњ” | вњ” | вњ” | вњ” |
Video | |||||
Hyper-V specific video device | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Miscellaneous | |||||
Key/value pair | 2019, 2016, 2012 R2 | вњ” Note 5, 9 | вњ” Note 5, 9 | вњ” Note 5, 9 | вњ” Note 5, 9 |
Non-Maskable Interrupt | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
File copy from host to guest | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
lsvmbus command | 2019, 2016, 2012 R2 | вњ” | вњ” | вњ” | вњ” |
Hyper-V Sockets | 2019, 2016 | вњ” | вњ” | вњ” | вњ” |
PCI Passthrough/DDA | 2019, 2016 | вњ” | вњ” | вњ” | вњ” |
Generation 2 virtual machines | |||||
Boot using UEFI | 2019, 2016, 2012 R2 | вњ” Note 10, 11 | вњ” Note 10, 11 | вњ” Note 10, 11 | вњ” Note 10, 11 |
Secure boot | 2019, 2016 | вњ” | вњ” | вњ” | вњ” |
Notes
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.
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.
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.
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).
On long term support (LTS) releases use latest virtual Hardware Enablement (HWE) kernel for up to date Linux Integration Services.
To install the Azure-tuned kernel on 16.04, 18.04 and 20.04, run the following commands as root (or sudo):
Dynamic memory support is only available on 64-bit virtual machines.
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.
If you are using Dynamic Memory on Windows Server 2019, Windows Server 2016 or Windows Server 2012/2012 R2 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.
In Windows Server 2019, Windows Server 2016 or 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.
On Windows Server 2012 R2, Generation 2 virtual machines have secure boot enabled by default and some 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:
Before attempting to copy the VHD of an existing Generation 2 VHD virtual machine to create new Generation 2 virtual machines, follow these steps:
Log in to the existing Generation 2 virtual machine.
Change directory to the boot EFI directory:
Copy the ubuntu directory in to a new directory named boot:
Change directory to the newly created boot directory:
Источник
Hyper-V Linux Integration Services (LIS) for Ubuntu 18.04
In the previous tutorial titled How to create a Linux Guest Virtual Machine on Windows Hyper-V we installed either Zorin OS Core, Zorin OS Lite (Ubuntu 18.04) or Ubuntu 18.04 Desktop. In this tutorial we will install the Microsoft Integration Services (LIS). This is the equivalent of using VMWare Tools if you were using VMWare as your virtualisation solution.
Edit the modules
So, the first thing that needs to be done is to edit the modules file located in /etc/initramfs-tools. We will do this by using nano. To open the modules file copy the following into terminal.
You will see the following displayed.
Use the arrow keys to move the cursor down to the last line in the file and then add the following lines.
As illustrated below.
Now save the updated modules file with ctrl + X and the Y for yes and Return. Now run the following command to install the virtual tools.
To re-initialise the modules run the following.
Finally, reboot the virtual machine with.
Once the guest virtual machine has rebooted, the LIS drivers and service should be registered in the system. To verify that they have indeed been registered run the following in terminal.
Now look for the following:
If all these modules are present, then activation of the Linux Integration Services has been successful.
Источник