Hyper-V

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. You can help by expanding it.
Resources

Hyper-V is a hypervisor integrated in current versions of Microsoft Windows. This article covers the specifics of running Gentoo as a guest operating system inside a Hyper-V virtual machine.

Installation

Hyper-V support for Gentoo guests requires two important steps: kernel support and user-space graphic driver support.

Note
This configuration is only pertinent to a Gentoo installation (guest) running inside a virtual machine.

Kernel

Linux guest support

Below is a summary of the kernel features that need to be compiled into the kernel, or provided as kernel modules, to be able to correctly run Gentoo under Hyper-V. Feature names are subject to change, so be sure to search the kernel's menuconfig for features containing the string HYPERV.

KERNEL Enable basic Hyper-V guest support
Processor type and features  --->
   [*] Linux guest support  --->
      -*-   Enable paravirtualization code
      [*]     Paravirtualization layer for spinlocks
Power management and ACPI options  --->
   [*] ACPI (Advanced Configuration and Power Interface) Support  --->
Bus options (PCI etc.)  --->
   [*] PCI support
   [*] Message Signaled Interrupts (MSI and MSI-X)
   <*> Hyper-V PCI Frontend
[*] Networking support  --->
   Networking options  --->
      <*> Virtual Socket protocol
      <*> Hyper-V transport for Virtual Sockets
Device Drivers  --->
   Input device support  --->
      Hardware I/O ports  --->
         <*> Microsoft Synthetic Keyboard driver
   SCSI device support  --->
      SCSI Transports  --->
         <*> FiberChannel Transport Attributes
      [*] SCSI low-level drivers  ---> 
         <*> Microsoft Hyper-V virtual storage driver
   [*] Network device support  --->
      <*>   Microsoft Hyper-V virtual network driver
   Graphics support  --->
      Frame buffer Devices  --->
         <*> Microsoft Hyper-V Synthetic Video support
   HID support  --->
      -*- HID bus support
      Special HID drivers  --->
         <*> Microsoft Hyper-V mouse driver
   Microsoft Hyper-V guest support  --->
      <*> Microsoft Hyper-V client drivers
      <*> Microsoft Hyper-V Utilities driver
      <*> Microsoft Hyper-V Balloon driver

To have all necessary options appear, there is an initial dependency chain. "Linux guest support" and "ACPI" must be enabled first in order for "Microsoft Hyper-V client drivers" to appear. "Microsoft Hyper-V client drivers" is necessary for most, if not all, other Hyper-V options to be available.

Graphics

For X11 (graphical) support the CONFIG_DRM_FBDEV_EMULATION kernel option is required:

KERNEL Enable graphical support via fbdev
Device Drivers  --->
   Graphics support  --->
      <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
         [*]   Enable legacy fbdev support for your modesetting driver

Emerge

If X server graphical support is desired through fbdev, be sure to adjust make.conf:

FILE /etc/portage/make.conf
VIDEO_CARDS="fbdev"

Next (re)emerge xorg-drivers package:

root #emerge --ask --update --newuse --deep x11-base/xorg-drivers

Removal

Removing the Hyper-V support is as simple as disabling the related kernel options (reverse the steps in the Kernel section above).

See also

  • Virtualization — the concept and technique that permits running software in an environment separate from a computer operating system.
  • Xen — a native, or bare-metal, hypervisor that allows multiple distinct virtual machines (referred to as domains) to share a single physical machine.

External resources