Hyper v linux guest services

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:

Источник

Вики IT-KB

Пошаговые руководства, шпаргалки, полезные ссылки.

Инструменты пользователя

Инструменты сайта

Боковая панель

Службы интеграции Hyper-V на гостевой ОС CentOS Linux 7.5

Базовые компоненты интгерации Hyper-V уже есть в базовой поставке CentOS 7.5, поэтому отдельно устанавливать их из образа LIS (Linux Integration Services), распространяемого Microsoft, смысла особого нет.

Информацию о поддержке возможностей виртуальной машины Hyper-V с гостевой ОС CentOS/RHEL можно найти в документе Supported CentOS and Red Hat Enterprise Linux virtual machines on Hyper-V

Дополнительные гостевые службы Hyper-V

Установка пакетов, расширяющих возможности взаимодействия Hyper-V с гостевой ОС CentOS, в частности:

выполняется из базовых репозиториев CentOS:

После установки, желательно перезагрузить гостевую систему и убедиться в том, что службы стартовали в автоматическом режиме. Например для проверки службы поддержки VSS проверим статус работоспособности соответствующей службы hypervvssd:

Проверено на следующих конфигурациях:

Версия ОС
CentOS Linux release 7.5.1804 (Core)

Автор первичной редакции:
Алексей Максимов
Время публикации: 21.08.2018 10:35

Источник

Supported Linux and FreeBSD virtual machines for Hyper-V on Windows

Applies to: Windows Server 2022, Azure Stack HCI, version 20H2; Windows Server 2019, Windows Server 2016, Hyper-V Server 2016, Windows Server 2012 R2, Hyper-V Server 2012 R2, Windows Server 2012, Hyper-V Server 2012, Windows Server 2008 R2, Windows 10, Windows 8.1, Windows 8, Windows 7.1, Windows 7

Hyper-V supports both emulated and Hyper-V-specific devices for Linux and FreeBSD virtual machines. When running with emulated devices, no additional software is required to be installed. However emulated devices do not provide high performance and cannot leverage the rich virtual machine management infrastructure that the Hyper-V technology offers. In order to make full use of all benefits that Hyper-V provides, it is best to use Hyper-V-specific devices for Linux and FreeBSD. The collection of drivers that are required to run Hyper-V-specific devices are known as Linux Integration Services (LIS) or FreeBSD Integration Services (BIS).

LIS has been added to the Linux kernel and is updated for new releases. But Linux distributions based on older kernels may not have the latest enhancements or fixes. Microsoft provides a download containing installable LIS drivers for some Linux installations based on these older kernels. Because distribution vendors include versions of Linux Integration Services, it is best to install the latest downloadable version of LIS, if applicable, for your installation.

For other Linux distributions LIS changes are regularly integrated into the operating system kernel and applications so no separate download or installation is required.

For older FreeBSD releases (before 10.0), Microsoft provides ports that contain the installable BIS drivers and corresponding daemons for FreeBSD virtual machines. For newer FreeBSD releases, BIS is built in to the FreeBSD operating system, and no separate download or installation is required except for a KVP ports download that is needed for FreeBSD 10.0.

The goal of this content is to provide information that helps facilitate your Linux or FreeBSD deployment on Hyper-V. Specific details include:

Linux distributions or FreeBSD releases that require the download and installation of LIS or BIS drivers.

Linux distributions or FreeBSD releases that contain built-in LIS or BIS drivers.

Feature distribution maps that indicate the features in major Linux distributions or FreeBSD releases.

Known issues and workarounds for each distribution or release.

Feature description for each LIS or BIS feature.

Want to make a suggestion about features and functionality? Is there something we could do better? You can use the Windows Server User Voice site to suggest new features and capabilities for Linux and FreeBSD Virtual Machines on Hyper-V, and to see what other people are saying.

Источник

Рекомендации по запуску Linux в Hyper-V

область применения: Windows Server 2022, Azure Stack хЦи, версия 20H2; Windows сервер 2019, Windows Server 2016, Hyper-V Server 2016, Windows Server 2012 r2, Hyper-V Server 2012 R2, Windows Server 2012, Hyper-V Server 2012, Windows Server 2008 R2, Windows 10, Windows 8.1, Windows 8, Windows 7,1, Windows 7

Этот раздел содержит список рекомендаций по запуску виртуальной машины Linux в Hyper-V.

Настройка файловых систем Linux в динамических VHDX-файлах

Некоторые файловые системы Linux могут потреблять значительный объем свободного места на диске, даже если файловая система в основном пуста. Чтобы уменьшить объем используемого дискового пространства в динамических VHDX-файлах, учитывайте следующие рекомендации.

  • При создании VHDX используйте 1 МБ Блокксизебитес (из 32 МБ по умолчанию) в PowerShell, например:

    Формат ext4 является предпочтительным для ext3, так как ext4 больше пространства, чем ext3 при использовании с динамическими VHDX-файлами.

    При создании файловой системы укажите число групп 4096, например:

    Время ожидания меню GRUB на виртуальных машинах поколения 2

    Из-за того, что устаревшее оборудование удаляется из эмуляции на виртуальных машинах поколения 2, для отображения меню GRUB слишком быстро вычисляется таймер обратного отсчета, и сразу же загружается запись по умолчанию. Пока GRUB не будет использоваться для использования таймера, поддерживаемого EFI, измените /Бут/груб/груб.конф,/т.п./default/grub или эквивалентным параметром «Timeout = 100000» вместо значения по умолчанию «timeout = 5».

    Загрузка PxE на виртуальных машинах поколения 2

    Так как в виртуальных машинах поколения 2 отсутствует таймер «СМОЛой», сетевые подключения к PxE-серверу TFTP можно преждевременно завершить и предотвратить считывание конфигурации GRUB и загрузку ядра с сервера.

    В дистрибутивах Linux, отличных от RHEL 6. x, можно выполнить аналогичные действия, чтобы настроить GRUB v 0.97 для загрузки ядер Linux с PxE-сервера.

    Кроме того, при вводе с помощью клавиатуры и мыши RHEL/CentOS 6,6 не будет работать с предварительно установленным ядром, что не позволит указать параметры установки в меню. Чтобы разрешить выбор параметров установки, должна быть настроена последовательная консоль.

    В файле ефидефаулт на PxE-сервере добавьте следующий параметр ядра «console = ttyS1» .

    На виртуальной машине в Hyper-V настройте COM-порт с помощью этого командлета PowerShell:

    Указание файла Kickstart для предварительно установленного ядра также позволит избежать необходимости ввода с клавиатуры и мыши во время установки.

    Использование статических MAC-адресов с отказоустойчивой кластеризацией

    Виртуальные машины Linux, которые будут развернуты с помощью отказоустойчивой кластеризации, должны быть настроены со статическим MAC-адресом для каждого виртуального сетевого адаптера. В некоторых версиях Linux сетевая конфигурация может быть потеряна после отработки отказа, поскольку виртуальному сетевому адаптеру назначается новый MAC-адрес. Чтобы избежать потери конфигурации сети, убедитесь, что у каждого виртуального сетевого адаптера есть статический MAC-адрес. Вы можете настроить MAC-адрес, изменив параметры виртуальной машины в диспетчере Hyper-V или диспетчер отказоустойчивости кластеров.

    Использование сетевых адаптеров, относящихся к Hyper-V, а не устаревших сетевых адаптеров

    Настройте и используйте виртуальный адаптер Ethernet, который является сетевой картой Hyper-V с повышенной производительностью. Если к виртуальной машине подключены как устаревшие, так и сетевые адаптеры, относящиеся к Hyper-V, сетевые имена в выходных данных команды ifconfig-a могут показывать случайные значения, такие как _tmp12000801310. Чтобы избежать этой проблемы, удалите все устаревшие сетевые адаптеры при использовании сетевых адаптеров, связанных с Hyper-V, в виртуальной машине Linux.

    Для повышения производительности дискового ввода-вывода используйте планировщик заданий (NOOP/None)

    Ядро Linux предлагает два набора планировщиков дискового ввода-вывода для переупорядочивания запросов. Один набор предназначен для более старой подсистемы «BLK», а один — для новой подсистемы «BLK-MQ». В любом случае с современными твердотельными дисками рекомендуется использовать планировщик, который передает решения о планировании в базовый гипервизор Hyper-V. Для ядер Linux, использующих подсистему «BLK», это планировщик «NOOP». Для ядер Linux, использующих подсистему «BLK-MQ», это планировщик «None».

    Для конкретного диска доступные планировщики могут отображаться в этой папке файловой системы:/СИС/класс/блокк/ /куеуе/счедулер с выбранным планировщиком в квадратных скобках. Планировщик можно изменить, записав в это расположение файловой системы. Чтобы сохранить изменения между перезагрузками, необходимо добавить это изменение в скрипт инициализации. Дополнительные сведения см. в документации по дистрибутив Linux.

    Версии ядра Linux ниже 2.6.37 не поддерживают NUMA в Hyper-V с виртуальными машинами большего размера. Эта проблема влияет в основном на дистрибутивы более ранних версий, в которых используется исходное ядро Red Hat 2.6.32, и была исправлена в Red Hat Enterprise Linux (RHEL) 6.6 (kernel-2.6.32-504). В системах под управлением модифицированных ядер старше версии 2.6.37 или ядер RHEL старше 2.6.32-504 в командной строке ядра необходимо задать параметр загрузки numa=off в файле grub.conf. Дополнительные сведения см. в статье базы знаний Red Hat 436883.

    Зарезервируйте больше памяти для кдумп

    Если ядро записи дампа завершается с тревогой при загрузке, зарезервируйте больше памяти для ядра. Например, измените параметр crashkernel = 384M-: 128M на crashkernel = 384M-: 256M в файле конфигурации Ubuntu GRUB.

    Сжатие VHDX-файлов или расширения VHD и VHDX может привести к ошибочным таблицам разделов GPT

    Hyper-V позволяет сжимать файлы виртуального диска (VHDX) без учета разделов, томов или структур данных файловой системы, которые могут существовать на диске. Если VHDX-файл сжимается до конца раздела, то данные могут быть потеряны, при этом Секция может быть повреждена, а при чтении секции могут возвращаться недопустимые данные.

    После изменения размера VHD или VHDX администраторы должны использовать служебную программу, например fdisk, или частично обновить структуру разделов, томов и файловой системы, чтобы отразить изменение размера диска. Сжатие или увеличение размера VHD или VHDX с таблицей разделов GUID (GPT) вызовет предупреждение, если для проверки макета раздела используется средство управления секциями, и администратору будет выведено предупреждение об исправлении первого и дополнительного заголовков GPT. Этот ручной этап можно выполнить без потери данных.

    Источник

    Читайте также:  Underneath the courtroom windows four tall narrow
Оцените статью