System requirements for Hyper-V on Windows Server 2016
Install-WindowsFeature
install VMware tools on Core Windows
setup64.exe /S /v "/qn REBOOT=y"
Configure VMs with PowerShell Direct
- PowerShell Direct offers a new way of running PowerShell commands inside a VM from the host operating system.
- There are no network or firewall requirements or configurations
- PowerShell Direct works regardless of Remote Management configuration
- Guest credentials are required and VM must be running on the host
- Some PowerShell tools not yet available in PowerShell Direct
Generation 2 Virtual Machine Overview
Upgrade virtual machine version in Hyper-V on Windows 10 or Windows Server 2016
Generation 2 Guest Support
- Windows Server 2016, 2012 R2 & 2012
- Windows 10 x64, Windows 8.1 x64 & Windows 8 x64
Linux Support in Hyper-V
Azman.msc - deprecated GUI tool
JEA - Just enough Administration
Delegation of rights to an AD group
Nested Virtualisation
- Host running Windows Server 2016 Windows 10 Anniversary Update
- VM running Windows Server 2016 Windows 10 Anniversary Update
- VM at configuration version 8.0 or greater
- Intel processor with VT-x and EPT
Determine Usage Scenarios for Gen1/Gen2 VMs
Generally, use Generation 2 VMs, except...
- VHD is not UEFI-compatible
- You plan to move your VM to Azure* (as of Jun'17 Azure supports only gen1 VMs)
- Your OS is not supported on Generation 2
- Your boot method is not supported on Generation 2
Enable Hyper-V remote ISO attachment
How to add a file share ISO to a Hyper-V VM
!!! Remember the machine needs to be rebooted for the change to take effect !!!
Integration Services & Resource Metering
Configuring Hyper-V Virtual Machine NUMA Topology
Smart Paging in Hyper-V Dynamic Memory
Export and Import virtual machines
Implement Enhanced Session Mode
- Enables redirection of locally-attached devices like those used in RDP sessions (USB Camera, etc.)
- Enabled by default on hosts running Windows 8/8.1/10
- Disabled by default on hosts running Windows Server 2012/2012 R2/2016
- Not available for Generation 1 VMs and VMs running non-Windows OSs
- Guest VM must run Windows 8.1/10 or Windows Server 2012 R2/2016 and have Remote Desktop Services enabled
Server - Hyper-V Settings > Enhanced Session Mode Policy
User - Enhanced Session Mode
Implement Discrete Device Assignment (DDA)
- Enables supported PCI Express devices to be directly connected to a VM
- Used to bypass virtualization and increase performance for VM activities
- DDA is Microsoft's first attempt at pass-through similar to Citrix and VMware
- Used most often to pass-through GPU and NVMe drives to VMs
- Add-VMAssignableDevice cmdlet
Discrete Device Assignment - Description and background
Implement Secure Boot
- Feature of UEFI that ensures each component loaded during boot is digitally signed and validated
- Not supported on BIOS or Gen 1 VMs
- Validation is done against trusted certificates present in UEFI firmware
- Windows OS bootloader is signed by Microsoft at C:\Windows\Boot\EFI (bootmgfw.efi)
- Confirm-SecureBootUEFI
Secure Boot on Virtual Machines
Implement Secure Boot for Linux
- Disable secure boot
- Sign bootloader with Microsoft certificate at https://sysdev.Microsoft.com
- Sign bootloader with locally-trusted certificate and certificate trust chain
FreeBSD ntegration Services
- Integration Services distribution for FreeBSD is different than for Linux
- Unlike Linux, there is only one FreeBSD
- Unlike Linux, no subsequent "distributions"
- The FreeBSD Foundation is responsible for the OS kernel and all drivers and libraries
- Microsoft delivers Integration Services directly to the FreeBSD community for acceptance and inclusion in latest release
Microsoft Loves Linux Deep Dive #5: FreeBSD on Hyper-V
For Linux VMs on Hyper-V
- disable secure boot
Supported Linux and FreeBSD virtual machines for Hyper-V on Windows
Linux Integration Services Version 4.1 for Hyper-V << most distributions come with that installed OOB
install Integration Services (aka VMware Tools) - check supported versions!
- mount integration services iso to VM
- mount /dev/cdrom /media
- cd /media
- ./upgrade.sh
- /sbin/modinfo hv_vmbus << tells you version of installed Integration Services
- /sbin/modinfo hv_vmbus | grep version
.
Install-WindowsFeature
install VMware tools on Core Windows
setup64.exe /S /v "/qn REBOOT=y"
Configure VMs with PowerShell Direct
- PowerShell Direct offers a new way of running PowerShell commands inside a VM from the host operating system.
- There are no network or firewall requirements or configurations
- PowerShell Direct works regardless of Remote Management configuration
- Guest credentials are required and VM must be running on the host
- Some PowerShell tools not yet available in PowerShell Direct
PowerShell Direct – Running PowerShell inside a virtual machine from the Hyper-V host
3 ways of using PowerShell direct
- Interactive session - Enter-PSSession-VMName VMName
- Single-use session - Invoke-Command-VMName VMName-ScriptBlock { Commands }
- Persistent session - $session = New-PSSession -VMName nanoserverl -Credential (Get-Credential)
3 ways of using PowerShell direct
- Interactive session - Enter-PSSession-VMName VMName
- Single-use session - Invoke-Command-VMName VMName-ScriptBlock { Commands }
- Persistent session - $session = New-PSSession -VMName nanoserverl -Credential (Get-Credential)
Generation 2 Virtual Machine Overview
Upgrade virtual machine version in Hyper-V on Windows 10 or Windows Server 2016
Generation 2 Guest Support
- Windows Server 2016, 2012 R2 & 2012
- Windows 10 x64, Windows 8.1 x64 & Windows 8 x64
Linux Support in Hyper-V
OS Version | Gen 1 | Gen 2 |
RHEL/CentOS 7.x series | x | x |
RHEL/CentOS 6.x series | x | |
RHEL/CentOS 5.x series | x | |
Debian 7.x series | x | |
Debian 8.x series | x | x |
FreeBSD 10 and 10.1 | x | |
FreeBSD 9.1 and 9.3 | x | |
FreeBSD 8.4 | x | |
Oracle Linux 7.x series | x | x |
Oracle Linux 6.x series | x | |
Oracle Linux UEK R3 QU3 | x | |
Oracle Linux UEK R3 QU2 | x | |
Oracle Linux UEK R3 QUI | x | |
SUSE Linux Enterprise Server 12 series | x | x |
SUSE Linux Enterprise Server 11 series | x | |
Open SUSE 12.3 | x | |
Ubuntu 14.04 and later versions | x | x |
Ubuntu 12.04 | x |
Azman.msc - deprecated GUI tool
JEA - Just enough Administration
Delegation of rights to an AD group
Supported Boot methods | Gen 1 | Gen 2 |
PXE boot by using a standard network adapter | x | |
PXE boot by using a legacy network adapter | x | |
Boot from a SCSI VHDX or virtual DVD ISO | x | |
Boot from IDE Controller VHD or virtual DVD ISO | x | |
Boot from virtual floppy VFD | x | |
PXE boot by using a standard network adapter | x | |
PXE boot by using a legacy network adapter | x | |
Boot from a SCSI VHDX or virtual DVD ISO | x | |
Boot from IDE Controller VHD or virtual DVD ISO | x | |
Boot from virtual floppy VFD | x |
Nested Virtualisation
- Host running Windows Server 2016 Windows 10 Anniversary Update
- VM running Windows Server 2016 Windows 10 Anniversary Update
- VM at configuration version 8.0 or greater
- Intel processor with VT-x and EPT
Determine Usage Scenarios for Gen1/Gen2 VMs
Generally, use Generation 2 VMs, except...
- VHD is not UEFI-compatible
- You plan to move your VM to Azure* (as of Jun'17 Azure supports only gen1 VMs)
- Your OS is not supported on Generation 2
- Your boot method is not supported on Generation 2
Enable Hyper-V remote ISO attachment
How to add a file share ISO to a Hyper-V VM
!!! Remember the machine needs to be rebooted for the change to take effect !!!
Integration Services & Resource Metering
Configuring Hyper-V Virtual Machine NUMA Topology
Smart Paging in Hyper-V Dynamic Memory
Export and Import virtual machines
Implement Enhanced Session Mode
- Enables redirection of locally-attached devices like those used in RDP sessions (USB Camera, etc.)
- Enabled by default on hosts running Windows 8/8.1/10
- Disabled by default on hosts running Windows Server 2012/2012 R2/2016
- Not available for Generation 1 VMs and VMs running non-Windows OSs
- Guest VM must run Windows 8.1/10 or Windows Server 2012 R2/2016 and have Remote Desktop Services enabled
Server - Hyper-V Settings > Enhanced Session Mode Policy
User - Enhanced Session Mode
Implement Discrete Device Assignment (DDA)
- Enables supported PCI Express devices to be directly connected to a VM
- Used to bypass virtualization and increase performance for VM activities
- DDA is Microsoft's first attempt at pass-through similar to Citrix and VMware
- Used most often to pass-through GPU and NVMe drives to VMs
- Add-VMAssignableDevice cmdlet
Discrete Device Assignment - Description and background
Implement Secure Boot
- Feature of UEFI that ensures each component loaded during boot is digitally signed and validated
- Not supported on BIOS or Gen 1 VMs
- Validation is done against trusted certificates present in UEFI firmware
- Windows OS bootloader is signed by Microsoft at C:\Windows\Boot\EFI (bootmgfw.efi)
- Confirm-SecureBootUEFI
Secure Boot on Virtual Machines
Implement Secure Boot for Linux
- Disable secure boot
- Sign bootloader with Microsoft certificate at https://sysdev.Microsoft.com
- Sign bootloader with locally-trusted certificate and certificate trust chain
FreeBSD ntegration Services
- Integration Services distribution for FreeBSD is different than for Linux
- Unlike Linux, there is only one FreeBSD
- Unlike Linux, no subsequent "distributions"
- The FreeBSD Foundation is responsible for the OS kernel and all drivers and libraries
- Microsoft delivers Integration Services directly to the FreeBSD community for acceptance and inclusion in latest release
Microsoft Loves Linux Deep Dive #5: FreeBSD on Hyper-V
For Linux VMs on Hyper-V
- disable secure boot
Supported Linux and FreeBSD virtual machines for Hyper-V on Windows
Linux Integration Services Version 4.1 for Hyper-V << most distributions come with that installed OOB
install Integration Services (aka VMware Tools) - check supported versions!
- mount integration services iso to VM
- mount /dev/cdrom /media
- cd /media
- ./upgrade.sh
- /sbin/modinfo hv_vmbus << tells you version of installed Integration Services
- /sbin/modinfo hv_vmbus | grep version
.