- Поддерживаемые виртуальные машины Ubuntu в Hyper-V
- Условные обозначения таблицы
- Примечания
- Supported Linux and FreeBSD virtual machines for Hyper-V on Windows
- Best Practices for running Linux on Hyper-V
- Tuning Linux File Systems on Dynamic VHDX Files
- Grub Menu Timeout on Generation 2 Virtual Machines
- PxE Boot on Generation 2 Virtual Machines
- Use static MAC addresses with failover clustering
- Use Hyper-V-specific network adapters, not the legacy network adapter
- Use I/O scheduler noop/none for better disk I/O performance
- Reserve more memory for kdump
- Shrinking VHDX or expanding VHD and VHDX files can result in erroneous GPT partition tables
Поддерживаемые виртуальные машины Ubuntu в Hyper-V
область применения: Windows Server 2022, Azure Stack хЦи, версия 20H2; Windows сервер 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
Следующая схема распределения признаков показывает функции в каждой версии. Известные проблемы и способы их решения для каждого распространения перечислены после таблицы.
Условные обозначения таблицы
Встроенные в систему LIS включены в состав этого дистрибутива Linux. Пакет скачивания LIS, предоставленный корпорацией Майкрософт, не подходит для этого распространения, поэтому не устанавливайте его. Номера версий модулей ядра для встроенных LIS (например, как показано в лсмод) отличаются от номера версии в пакете скачанных пакетов LIS, предоставленных корпорацией Майкрософт. Несоответствие не означает, что встроенное в LIS Обновление устарело.
(пусто) — функция недоступна
Компонент | Windows Версия операционной системы сервера | 20.04 LTS | 18.04 LTS | 16.04 LTS | 14.04 LTS |
---|---|---|---|---|---|
Доступность | Встроено | Встроено | Встроено | Встроено | |
Основные сведения | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Windows Server 2016 Точное время | 2019, 2016 | ✔ | ✔ | ✔ | |
Сеть | |||||
Кадры крупного размера | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Добавление тегов и магистрали виртуальной ЛС | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Динамическая миграция | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Статическая Вставка IP-адресов | 2019, 2016, 2012 R2 | ✔ Примечание 1 | ✔ Примечание 1 | ✔ Примечание 1 | ✔ Примечание 1 |
vRSS | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Сегментация TCP и разгрузка контрольной суммы | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
SR-IOV; | 2019, 2016 | ✔ | ✔ | ✔ | |
Хранение | |||||
Изменение размера VHDX | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Виртуальное подключение Fibre Channel | 2019, 2016, 2012 R2 | ✔ Примечание 2 | ✔ Примечание 2 | ✔ Примечание 2 | ✔ Примечание 2 |
Динамическая Архивация виртуальных машин | 2019, 2016, 2012 R2 | ✔ Примечание 3, 4, 5 | ✔ Примечание 3, 4, 5 | ✔ Примечание 3, 4, 5 | ✔ Примечание 3, 4, 5 |
Поддержка TRIM | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
WWN ДЛЯ SCSI | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Память | |||||
Поддержка ядра PAE | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Настройка зазора MMIO | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Динамическая память Hot-Add | 2019, 2016, 2012 R2 | ✔ Примечание 6, 7, 8 | ✔ Примечание 6, 7, 8 | ✔ Примечание 6, 7, 8 | ✔ Примечание 6, 7, 8 |
Всплывающие подсказки динамическая память | 2019, 2016, 2012 R2 | ✔ Примечание 6, 7, 8 | ✔ Примечание 6, 7, 8 | ✔ Примечание 6, 7, 8 | ✔ Примечание 6, 7, 8 |
Изменение размера памяти среды выполнения | 2019, 2016 | ✔ | ✔ | ✔ | ✔ |
Видео | |||||
Устройство, относящееся к Hyper-V | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Разное | |||||
Пара «ключ — значение» | 2019, 2016, 2012 R2 | ✔ Примечание 5, 9 | ✔ Примечание 5, 9 | ✔ Примечание 5, 9 | ✔ Примечание 5, 9 |
Немаскируемое прерывание | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Копирование файлов с узла на гость | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Команда лсвмбус | 2019, 2016, 2012 R2 | ✔ | ✔ | ✔ | ✔ |
Сокеты Hyper-V | 2019, 2016 | ✔ | ✔ | ✔ | ✔ |
Транзитный/ДДА PCI | 2019, 2016 | ✔ | ✔ | ✔ | ✔ |
Виртуальные машины 2-го поколения | |||||
Загрузка с помощью UEFI | 2019, 2016, 2012 R2 | ✔ Примечание 10, 11 | ✔ Примечание 10, 11 | ✔ Примечание 10, 11 | ✔ Примечание 10, 11 |
Безопасная загрузка | 2019, 2016 | ✔ | ✔ | ✔ | ✔ |
Примечания
Статическая Вставка IP-адресов может не работать, если Диспетчер сети настроен для конкретного сетевого адаптера Hyper-V на виртуальной машине. Чтобы обеспечить гладкую работу статического внедрения IP-адресов, убедитесь, что диспетчер сети полностью отключен или отключен для определенного сетевого адаптера через его файл ifcfg-ЕСКС .
При использовании виртуальных устройств оптоволоконного канала убедитесь, что логический номер устройства 0 (LUN 0) заполнен. Если LUN 0 не заполнен, виртуальная машина Linux может не иметь возможности подключать устройства оптоволоконного канала в собственном режиме.
Если во время динамической операции резервного копирования виртуальных машин имеются открытые дескрипторы файлов, то в некоторых уголках резервных виртуальных жестких дисков может потребоваться проверка согласованности файловой системы () при fsck восстановлении.
Операции динамической архивации могут автоматически завершаться сбоем, если виртуальная машина имеет подключенное устройство iSCSI или прямое подключенное хранилище (также называемое транзитным диском).
В выпусках долгосрочной поддержки (LTS) используйте последнюю версию ядра для обновления виртуальных аппаратных средств (HWE) для Integration Services Linux.
Чтобы установить ядро, настроенное для Azure, на 16,04, 18,04 и 20,04, выполните следующие команды в качестве корневого (или sudo):
Поддержка динамической памяти доступна только на 64-разрядных виртуальных машинах.
Динамическая память операции могут завершиться ошибкой, если в операционной системе на виртуальной машине слишком мало памяти. Ниже приведены некоторые рекомендации.
Объем памяти при запуске и минимальный объем памяти должны быть больше или равны объему памяти, рекомендуемому для поставщика распространения.
Приложения, которые обычно потребляют всю доступную память в системе, могут потреблять до 80 процентов доступной памяти.
при использовании динамическая память в операционных системах Windows Server 2019, Windows Server 2016 или Windows Server 2012/2012 R2 укажите объем памяти при запуске, минимальный объем памяти и параметры максимального объема памяти , кратные 128 мегабайтам (мб). Несоблюдение этого действия может привести к Hot-Addм сбоям, и в операционной системе на виртуальной машине может не отобразиться увеличение объема памяти.
в Windows Server 2019, Windows Server 2016 или Windows Server 2012 R2 инфраструктура пар «ключ — значение» может работать неправильно без обновления программного обеспечения Linux. Обратитесь к поставщику распространения, чтобы получить обновление программного обеспечения на случай возникновения проблем с этой функцией.
на виртуальных машинах версии 2 Windows Server 2012 R2 по умолчанию включена безопасная загрузка, и некоторые виртуальные машины Linux не будут загружаться, если только не будет отключен параметр безопасной загрузки. Вы можете отключить безопасную загрузку в разделе встроенное по в параметрах виртуальной машины в диспетчере Hyper-V или отключить ее с помощью PowerShell:
Прежде чем пытаться скопировать виртуальный жесткий диск существующей виртуальной машины виртуального жесткого диска поколения 2 для создания новых виртуальных машин поколения 2, выполните следующие действия.
Войдите в существующую виртуальную машину версии 2.
Перейдите в каталог boot EFI.
Скопируйте каталог Ubuntu в новый каталог с именем Boot:
Перейдите в каталог только что созданный каталог загрузки:
Источник
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.
Источник
Best Practices for running Linux on Hyper-V
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
This topic contains a list of recommendations for running Linux virtual machine on Hyper-V.
Tuning Linux File Systems on Dynamic VHDX Files
Some Linux file systems may consume significant amounts of real disk space even when the file system is mostly empty. To reduce the amount of real disk space usage of dynamic VHDX files, consider the following recommendations:
- When creating the VHDX, use 1MB BlockSizeBytes (from the default 32MB) in PowerShell, for example:
The ext4 format is preferred to ext3 because ext4 is more space efficient than ext3 when used with dynamic VHDX files.
When creating the filesystem specify the number of groups to be 4096, for example:
Grub Menu Timeout on Generation 2 Virtual Machines
Because of legacy hardware being removed from emulation in Generation 2 virtual machines, the grub menu countdown timer counts down too quickly for the grub menu to be displayed, immediately loading the default entry. Until grub is fixed to use the EFI-supported timer, modify /boot/grub/grub.conf, /etc/default/grub, or equivalent to have «timeout=100000» instead of the default «timeout=5».
PxE Boot on Generation 2 Virtual Machines
Because the PIT timer is not present in Generation 2 Virtual Machines, network connections to the PxE TFTP server can be prematurely terminated and prevent the bootloader from reading Grub configuration and loading a kernel from the server.
On Linux distributions other than RHEL 6.x, similar steps can be followed to configure grub v0.97 to load Linux kernels from a PxE server.
Additionally, on RHEL/CentOS 6.6 keyboard and mouse input will not work with the pre-install kernel which prevents specifying installation options in the menu. A serial console must be configured to allow choosing installation options.
In the efidefault file on the PxE server, add the following kernel parameter «console=ttyS1»
On the VM in Hyper-V, set up a COM port using this PowerShell cmdlet:
Specifying a kickstart file to the pre-install kernel would also avoid the need for keyboard and mouse input during installation.
Use static MAC addresses with failover clustering
Linux virtual machines that will be deployed using failover clustering should be configured with a static media access control (MAC) address for each virtual network adapter. In some versions of Linux, the networking configuration may be lost after failover because a new MAC address is assigned to the virtual network adapter. To avoid losing the network configuration, ensure that each virtual network adapter has a static MAC address. You can configure the MAC address by editing the settings of the virtual machine in Hyper-V Manager or Failover Cluster Manager.
Use Hyper-V-specific network adapters, not the legacy network adapter
Configure and use the virtual Ethernet adapter, which is a Hyper-V-specific network card with enhanced performance. If both legacy and Hyper-V-specific network adapters are attached to a virtual machine, the network names in the output of ifconfig -a might show random values such as _tmp12000801310. To avoid this issue, remove all legacy network adapters when using Hyper-V-specific network adapters in a Linux virtual machine.
Use I/O scheduler noop/none for better disk I/O performance
The Linux kernel offers two sets of disk I/O schedulers to reorder requests. One set is for the older вЂblk’ subsystem and one set is for the newer вЂblk-mq’ subsystem. In either case, with today’s solid state disks it is recommended to use a scheduler that passes the scheduling decisions to the underlying Hyper-V hypervisor. For Linux kernels using the вЂblk’ subsystem, this is the “noop” scheduler. For Linux kernels using the вЂblk-mq’ subsystem, this is the “none” scheduler.
For a particular disk, the available schedulers can be seen at this file system location: /sys/class/block/ /queue/scheduler, with the currently selected scheduler in square brackets. You can change the scheduler by writing to this file system location. The change must be added to an initialization script in order to persist across reboots. Consult your Linux distro documentation for details.
Linux kernel versions earlier than 2.6.37 don’t support NUMA on Hyper-V with larger VM sizes. This issue primarily impacts older distributions using the upstream Red Hat 2.6.32 kernel, and was fixed in Red Hat Enterprise Linux (RHEL) 6.6 (kernel-2.6.32-504). Systems running custom kernels older than 2.6.37, or RHEL-based kernels older than 2.6.32-504 must set the boot parameter numa=off on the kernel command line in grub.conf. For more information, see Red Hat KB 436883.
Reserve more memory for kdump
In case the dump capture kernel ends up with a panic on boot, reserve more memory for the kernel. For example, change the parameter crashkernel=384M-:128M to crashkernel=384M-:256M in the Ubuntu grub configuration file.
Shrinking VHDX or expanding VHD and VHDX files can result in erroneous GPT partition tables
Hyper-V allows shrinking virtual disk (VHDX) files without regard for any partition, volume, or file system data structures that may exist on the disk. If the VHDX is shrunk to where the end of the VHDX comes before the end of a partition, data can be lost, that partition can become corrupted, or invalid data can be returned when the partition is read.
After resizing a VHD or VHDX, administrators should use a utility like fdisk or parted to update the partition, volume, and file system structures to reflect the change in the size of the disk. Shrinking or expanding the size of a VHD or VHDX that has a GUID Partition Table (GPT) will cause a warning when a partition management tool is used to check the partition layout, and the administrator will be warned to fix the first and secondary GPT headers. This manual step is safe to perform without data loss.
Источник