Hyper v поколение 2 linux

Поддерживаемые виртуальные машины Linux и FreeBSD для Hyper-V на Windows

область применения: 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

Hyper-V поддерживает как эмулированные, так и устройства Hyper-V для виртуальных машин Linux и FreeBSD. При работе с имитируемыми устройствами не требуется устанавливать дополнительное программное обеспечение. Однако эмулированные устройства не обеспечивают высокую производительность и не могут использовать обширную инфраструктуру управления виртуальными машинами, предлагаемую технологией Hyper-V. Чтобы полностью использовать все преимущества, предоставляемые Hyper-V, лучше всего использовать устройства, относящиеся к Hyper-V, для Linux и FreeBSD. Коллекция драйверов, необходимых для запуска устройств, связанных с Hyper-V, известна как Linux Integration Services (LIS) или FreeBSD Integration Services (BIS).

LIS был добавлен в ядро Linux и обновлен для новых выпусков. Однако дистрибутивы Linux, основанные на старых ядрах, могут не иметь последних улучшений или исправлений. Корпорация Майкрософт предоставляет загружаемый пакет, содержащий устанавливаемые драйверы LIS для некоторых установок Linux на основе этих старых ядер. Поскольку поставщики распространения включают версии Linux Integration Services, лучше установить последнюю загружаемую версию LIS, если это применимо, для установки.

Для других дистрибутивов Linux изменения LIS регулярно интегрируются в ядро операционной системы и приложения, поэтому отдельное скачивание или установка не требуются.

Для старых выпусков FreeBSD (до 10,0) корпорация Майкрософт предоставляет порты, которые содержат устанавливаемые драйверы BIS и соответствующие управляющие программы для виртуальных машин FreeBSD. Для новых выпусков FreeBSD номер BIS встроен в операционную систему FreeBSD, и отдельное скачивание или установка не требуются, за исключением загрузки KVP портов, необходимой для FreeBSD 10,0.

Целью этого содержимого является предоставление информации, помогающей упростить развертывание Linux или FreeBSD в Hyper-V. Ниже приведены конкретные сведения.

Дистрибутивы Linux или выпуски FreeBSD, требующие загрузки и установки драйверов LIS или BIS.

Дистрибутивы Linux или выпуски FreeBSD, содержащие встроенные драйверы LIS или BIS.

Карты распределения компонентов, которые указывают на функции в основных дистрибутивах Linux или в выпусках FreeBSD.

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

Описание функции для каждого компонента LIS или BIS.

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

Источник

Второе поколение виртуальных машин в Windows Server 2012 R2

Сегодня я хотел бы подробнее остановиться на одной из новых возможностей Hyper-V в Windows Server 2012 R2, упомянутой мною в обзорном посте, а именно, обсудить второе поколение виртуальных машин (ВМ). Тема становится особенно актуальной с доступностью RTM Windows Server 2012 R2 для подписчиков TechNet и MSDN и скорым выпуском финальной версии System Center 2012 R2

Почему появилось второе поколение ВМ?

С выходом Windows Server 2012 R2 в Hyper-V появилось возможность создавать ВМ двух разных типов или двух разных поколений (Generation 1 и Generation 2). ВМ первого поколения представляют собой виртуальные машины, хорошо известные по предыдущим версиям Hyper-V. Все, что вы привыкли видеть в настройках ВМ, плюс ряд новых настроек, вы увидите в машинах первого поколения. Они никуда не делись, вы можете и дальше спокойно их использовать.

Но помимо этого вы можете теперь создавать ВМ второго поколения. Это поколение отражает изменения, которые произошли и продолжают происходить как в архитектуре ОС, так и в аппаратном обеспечении современных компьютеров. На рубеже Windows 2000, Windows XP, Windows Server 2003 операционные системы проектировались без учета технологий виртуализации, тогда еще только набиравших обороты. Чтобы нормально запустить такие ОС внутри виртуальной машины необходимо было создать для них иллюзию запуска на физическом компьютере. Как следствие, приходилось эмулировать различное оборудование, как то: BIOS, контроллер прерываний, IDE-контроллер, стандартные порты ввода-вывода и пр. Вы легко увидите перечень эмулируемых устройств, если загляните в Device Manager на ВМ первого поколения.

Эмуляция, с одной стороны, приводит к дополнительным накладным расходам, прежде всего, к лишним тактам процессора, с другой стороны, каждое эмулируемой устройство – дополнительный довольно сложный код, потенциально расширяющий поверхность для атак.

С течением времени ОС стали проектироваться с учетом того, что система может, или даже скорее всего будет работать в виртуальной среде. Такая ОС «знает», что запускается внутри ВМ и, как на этапе загрузки, так и в ходе своей работы, опирается на ресурсы, предоставляемые родительским разделом (хостовой ОС). Иными словами, ОС уже при старте общается с гипервизором через шину VMBus, а не рассчитывает обнаружить контроллер прерываний или чипсет определенного типа. Следовательно, для таких ОС можно отказаться от унаследованных эмулируемых устройств и повысить производительность ВМ. Действительно, в Deviсe Manager ВМ второго поколения картина будет иной.

Читайте также:  Как отключить значок уведомлений windows 10

В чем преимущества ВМ второго поколения?

Отказ от эмуляции устаревших устройств изменяет «начинку» ВМ второго поколения. В свойствах таких ВМ вы увидите примерно следующее:

Отсюда можно выделить следующие преимущества ВМ второго поколения:

  1. Безопасная загрузка (Secure Boot) ВМ. Вместо стандартного BIOS используется firmware на основе спецификации UEFI и как часть этой спецификации поддерживается безопасная загрузка ВМ, что предотвращает возможность поражения ОС при запуске. Secure Boot может быть отключена.
  2. Загрузка с виртуального SCSI-диска или SCSI-DVD. Виртуальный IDE-контроллер вообще отсутствует в машинах второго поколения.
  3. «Горячее» изменение размера загрузочного раздела. «Горячее» добавление, а также изменение размера (в том числе, уменьшение) виртуальных SCSI-дисков возможно и для ВМ первого поколения. Но поскольку именно ВМ второго поколения умеют грузиться со SCSI, то для них вы можете изменить размер в том числе загрузочного раздела «на лету».
  4. Загрузка по сети с использованием синтетического сетевого адаптера проходит быстрее, чем при использовании Legacy Network Adapter в ВМ первого поколения.

Таблица ниже подытоживает «аппаратные» изменения в ВМ второго поколения.

Legacy Devices Removed Replacement Devices Enhancements
IDE Controller Virtual SCSI Controller Boot from VHDx (64TB max size, online resize)
IDE CD-ROM Virtual SCSI CD-ROM Hot add/remove
Legacy BIOS UEFI firmware Secure Boot
Legacy NIC Synthetic NIC Network boot with IPv4 & IPv6
Floppy & DMA Controller No floppy support
UART (COM Ports) Optional UART for debugging Faster and more reliable
i8042 keyboard controller Software based input No emulation – reduced resources
PS/2 keyboard Software based keyboard No emulation – reduced resources
PS/2 mouse Software based mouse No emulation – reduced resources
S3 video Software based video No emulation – reduced resources
PCI Bus VMBus
Programmable Interrupt Controller (PIC) No longer required
Programmable Interrupt Timer (PIT) No longer required
Super I/O device No longer required

Возникает резонный вопрос, отличается ли скорость работы ВМ первого и второго поколений? Когда ОС загрузилась, какую-то разницу в скорости работы вы, скорее всего, не заметите. Интеграционные компоненты внутри гостевой ОС позволяют работать ВМ максимально эффективно. Но есть две ситуации, в которых разница может быть очень ощутимой – это установка гостевой ОС и загрузка ВМ. Именно на этих этапах эмуляция оборудования сказывается весьма существенно.

В качестве иллюстрации я провел следующий эксперимент: создал две ВМ, первого и второго поколения соответственно, обеим ВМ выделил одинаковое количество оперативной памяти и виртуальных процессоров и одновременно запустил установку Windows Server 2012 R2 внутри созданных ВМ с одного и того же ISO-образа. Вот так выглядела картина в начальной фазе установки (ВМ второго поколения внизу):


И вот такую разницу можно было наблюдать позже:


Таким образом, при развертывании ВМ, а также при старте ВМ, что, например, особенно важно в сценариях VDI, разница в производительности ВМ второго поколения может достигать 50% и более.

Особенности использования ВМ второго поколения

Необходимо помнить несколько принципиальных моментов, относящихся к эксплуатации ВМ второго поколения.

В качестве гостевых ОС в ВМ второго поколения могут использоваться только:

  • Windows Server 2012
  • Windows Server 2012 R2
  • 64-битная версия Windows 8
  • 64-битная версия Windows 8.1

Это связано с тем, что именно эти версии ОС поддерживают спецификацию UEFI 2.3.1, в которой, в частности, реализована технология Secure Boot.

Вы можете создать ВМ второго поколения в консоли Hyper-V,

либо с помощью командлета PowerShell New-VM, указав ключ –Generation 2.

При этом надо иметь в виду, что поколение указывается только на этапе создания ВМ. В дальнейшем конвертировать ВМ из одного поколения в другое невозможно как раз в силу того, что в одном случае используется BIOS, в другом – UEFI.

Последний аспект, который хотелось бы отметить, связан с управлением. Управление хостами с Windows Server 2012 R2 возможно с помощью System Center 2012 R2 Virtual Machine Manager. В доступной сейчас preview-версии System Center 2012 R2 поддержка второго поколения ВМ отсутствует. Но в RTM-версии System Center 2012 R2 (а она уже не за горами) эта поддержка будет добавлена.

Итак, новое поколение ВМ в Windows Server 2012 R2 лишено устаревших эмулируемых устройств, поддерживает ряд новых возможностей и обеспечивает прирост производительности, особенно на этапах установки и загрузки гостевых ОС. Применение машин второго поколения сейчас сужает перечень поддерживаемых гостевых ОС, однако для остальных систем можно по-прежнему применять ВМ первого поколения, которые прекрасно сосуществуют с ВМ второго поколения на одном хосте виртуализации.

Дополнительную информацию о новых технологиях Windows Server 2012 R2 вы сможете найти на портале MVA в курсе “Jump Start: Все о Windows Server 2012 R2”.

Источник

Should I create a generation 1 or 2 virtual machine in Hyper-V?

Applies to: Windows Server 2022, Windows 10, Windows Server 2016, Microsoft Hyper-V Server 2016, Windows Server 2019, Microsoft Hyper-V Server 2019

If you plan to ever upload Windows virtual machines (VMs) from on-premises to Microsoft Azure, generation 1 and generation 2 VMs in the VHD file format and have a fixed sized disk are supported. See Generation 2 VMs on Azure to learn more about generation 2 capabilities supported on Azure. For more information on uploading a Windows VHD or VHDX, see Prepare a Windows VHD or VHDX to upload to Azure.

Читайте также:  Драйвера для toshiba satellite a660 драйвера windows

Your choice to create a generation 1 or generation 2 virtual machine depends on which guest operating system you want to install and the boot method you want to use to deploy the virtual machine. We recommend that you create a generation 2 virtual machine to take advantage of features like Secure Boot unless one of the following statements is true:

  • The VHD you want to boot from is not UEFI-compatible.
  • Generation 2 doesn’t support the operating system you want to run on the virtual machine.
  • Generation 2 doesn’t support the boot method you want to use.

For more information about what features are available with generation 2 virtual machines, see Hyper-V feature compatibility by generation and guest.

You can’t change a virtual machine’s generation after you’ve created it. So, we recommend that you review the considerations here, as well as choose the operating system, boot method, and features you want to use before you choose a generation.

Which guest operating systems are supported?

Generation 1 virtual machines support most guest operating systems. Generation 2 virtual machines support most 64-bit versions of Windows and more current versions of Linux and FreeBSD operating systems. Use the following sections to see which generation of virtual machine supports the guest operating system you want to install.

Windows guest operating system support

The following table shows which 64-bit versions of Windows you can use as a guest operating system for generation 1 and generation 2 virtual machines.

64-bit versions of Windows Generation 1 Generation 2
Windows Server 2019 вњ” вњ”
Windows Server 2016 вњ” вњ”
Windows Server 2012 R2 вњ” вњ”
Windows Server 2012 вњ” вњ”
Windows Server 2008 R2 вњ” вњ–
Windows Server 2008 вњ” вњ–
Windows 10 вњ” вњ”
Windows 8.1 вњ” вњ”
Windows 8 вњ” вњ”
Windows 7 вњ” вњ–

The following table shows which 32-bit versions of Windows you can use as a guest operating system for generation 1 and generation 2 virtual machines.

32-bit versions of Windows Generation 1 Generation 2
Windows 10 вњ” вњ–
Windows 8.1 вњ” вњ–
Windows 8 вњ” вњ–
Windows 7 вњ” вњ–

CentOS and Red Hat Enterprise Linux guest operating system support

The following table shows which versions of Red Hat Enterprise Linux (RHEL) and CentOS you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Operating system versions Generation 1 Generation 2
RHEL/CentOS 7.x series вњ” вњ”
RHEL/CentOS 6.x series вњ” вњ”
Note: Only supported on Windows Server 2016 and above.
RHEL/CentOS 5.x series вњ” вњ–

Debian guest operating system support

The following table shows which versions of Debian you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Operating system versions Generation 1 Generation 2
Debian 7.x series вњ” вњ–
Debian 8.x series вњ” вњ”

FreeBSD guest operating system support

The following table shows which versions of FreeBSD you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Operating system versions Generation 1 Generation 2
FreeBSD 10 and 10.1 вњ” вњ–
FreeBSD 9.1 and 9.3 вњ” вњ–
FreeBSD 8.4 вњ” вњ–

Oracle Linux guest operating system support

The following table shows which versions of Red Hat Compatible Kernel Series you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Red Hat Compatible Kernel Series versions Generation 1 Generation 2
Oracle Linux 7.x series вњ” вњ”
Oracle Linux 6.x series вњ” вњ–

The following table shows which versions of Unbreakable Enterprise Kernel you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Unbreakable Enterprise Kernel (UEK) versions Generation 1 Generation 2
Oracle Linux UEK R3 QU3 вњ” вњ–
Oracle Linux UEK R3 QU2 вњ” вњ–
Oracle Linux UEK R3 QU1 вњ” вњ–

SUSE guest operating system support

The following table shows which versions of SUSE you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Operating system versions Generation 1 Generation 2
SUSE Linux Enterprise Server 12 series вњ” вњ”
SUSE Linux Enterprise Server 11 series вњ” вњ–
Open SUSE 12.3 вњ” вњ–

Ubuntu guest operating system support

The following table shows which versions of Ubuntu you can use as a guest operating system for generation 1 and generation 2 virtual machines.

Operating system versions Generation 1 Generation 2
Ubuntu 14.04 and later versions вњ” вњ”
Ubuntu 12.04 вњ” вњ–

How can I boot the virtual machine?

The following table shows which boot methods are supported by generation 1 and generation 2 virtual machines.

Boot method Generation 1 Generation 2
PXE boot by using a standard network adapter вњ– вњ”
PXE boot by using a legacy network adapter вњ” вњ–
Boot from a SCSI virtual hard disk (.VHDX) or virtual DVD (.ISO) вњ– вњ”
Boot from IDE Controller virtual hard disk (.VHD) or virtual DVD (.ISO) вњ” вњ–
Boot from floppy (.VFD) вњ” вњ–

What are the advantages of using generation 2 virtual machines?

Here are some of the advantages you get when you use a generation 2 virtual machine:

Secure Boot This is a feature that verifies the boot loader is signed by a trusted authority in the UEFI database to help prevent unauthorized firmware, operating systems, or UEFI drivers from running at boot time. Secure Boot is enabled by default for generation 2 virtual machines. If you need to run a guest operating system that’s not supported by Secure Boot, you can disable it after the virtual machine’s created. For more information, see Secure Boot.

To Secure Boot generation 2 Linux virtual machines, you need to choose the UEFI CA Secure Boot template when you create the virtual machine.

Larger boot volume The maximum boot volume for generation 2 virtual machines is 64 TB. This is the maximum disk size supported by a .VHDX. For generation 1 virtual machines, the maximum boot volume is 2TB for a .VHDX and 2040GB for a .VHD. For more information, see Hyper-V Virtual Hard Disk Format Overview.

You may also see a slight improvement in virtual machine boot and installation times with generation 2 virtual machines.

What’s the difference in device support?

The following table compares the devices available between generation 1 and generation 2 virtual machines.

Generation 1 Device Generation 2 Replacement Generation 2 Enhancements
IDE controller Virtual SCSI controller Boot from .vhdx (64 TB maximum size, and online resize capability)
IDE CD-ROM Virtual SCSI CD-ROM Support for up to 64 SCSI DVD devices per SCSI controller.
Legacy BIOS UEFI firmware Secure Boot
Legacy network adapter Synthetic network adapter Network boot with IPv4 and IPv6
Floppy controller and DMA controller No floppy controller support N/A
Universal asynchronous receiver/transmitter (UART) for COM ports Optional UART for debugging Faster and more reliable
i8042 keyboard controller Software-based input Uses fewer resources because there is no emulation. Also reduces the attack surface from the guest operating system.
PS/2 keyboard Software-based keyboard Uses fewer resources because there is no emulation. Also reduces the attack surface from the guest operating system.
PS/2 mouse Software-based mouse Uses fewer resources because there is no emulation. Also reduces the attack surface from the guest operating system.
S3 video Software-based video Uses fewer resources because there is no emulation. Also reduces the attack surface from the guest operating system.
PCI bus No longer required N/A
Programmable interrupt controller (PIC) No longer required N/A
Programmable interval timer (PIT) No longer required N/A
Super I/O device No longer required N/A

More about generation 2 virtual machines

Here are some additional tips about using generation 2 virtual machines.

Attach or add a DVD drive

  • You can’t attach a physical CD or DVD drive to a generation 2 virtual machine. The virtual DVD drive in generation 2 virtual machines only supports ISO image files. To create an ISO image file of a Windows environment, you can use the Oscdimg command line tool. For more information, see Oscdimg Command-Line Options.
  • When you create a new virtual machine with the New-VM Windows PowerShell cmdlet, the generation 2 virtual machine doesn’t have a DVD drive. You can add a DVD drive while the virtual machine is running.

Use UEFI firmware

  • Secure Boot or UEFI firmware isn’t required on the physical Hyper-V host. Hyper-V provides virtual firmware to virtual machines that is independent of what’s on the Hyper-V host.
  • UEFI firmware in a generation 2 virtual machine doesn’t support setup mode for Secure Boot.
  • We don’t support running a UEFI shell or other UEFI applications in a generation 2 virtual machine. Using a non-Microsoft UEFI shell or UEFI applications is technically possible if they are compiled directly from the sources. If these applications are not appropriately digitally signed, you must disable Secure Boot for the virtual machine.

Work with VHDX files

  • You can resize a VHDX file that contains the boot volume for a generation 2 virtual machine while the virtual machine is running.
  • We don’t support or recommend that you create a VHDX file that is bootable to both generation 1 and generation 2 virtual machines.
  • The virtual machine generation is a property of the virtual machine, not a property of the virtual hard disk. So you can’t tell if a VHDX file was created by a generation 1 or a generation 2 virtual machine.
  • A VHDX file created with a generation 2 virtual machine can be attached to the IDE controller or the SCSI controller of a generation 1 virtual machine. However, if this is a bootable VHDX file, the generation 1 virtual machine won’t boot.

Use IPv6 instead of IPv4

By default, generation 2 virtual machines use IPv4. To use IPv6 instead, run the Set-VMFirmware Windows PowerShell cmdlet. For example, the following command sets the preferred protocol to IPv6 for a virtual machine named TestVM:

Add a COM port for kernel debugging

COM ports aren’t available in generation 2 virtual machines until you add them. You can do this with Windows PowerShell or Windows Management Instrumentation (WMI). These steps show you how to do it with Windows PowerShell.

To add a COM port:

Disable Secure Boot. Kernel debugging isn’t compatible with Secure Boot. Make sure the virtual machine is in an Off state, then use the Set-VMFirmware cmdlet. For example, the following command disables Secure Boot on virtual machine TestVM:

Add a COM port. Use the Set-VMComPort cmdlet to do this. For example, the following command configures the first COM port on virtual machine, TestVM, to connect to the named pipe, TestPipe, on the local computer:

Configured COM ports aren’t listed in the settings of a virtual machine in Hyper-V Manager.

Источник

Читайте также:  Как переместить корзину с рабочего стола windows 10
Оцените статью