Bug 1385264 - Nested virtualization in KVM - Virtualization support is disabled in the firmware.
Summary: Nested virtualization in KVM - Virtualization support is disabled in the firm...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-15 19:48 UTC by hlmasterchief93
Modified: 2026-01-12 00:10 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-10-17 10:28:12 UTC
Embargoed:


Attachments (Terms of Use)
virt-host-validate in Fedora 24 live guest (3.22 KB, text/plain)
2016-10-15 19:48 UTC, hlmasterchief93
no flags Details

Description hlmasterchief93 2016-10-15 19:48:45 UTC
Created attachment 1210827 [details]
virt-host-validate in Fedora 24 live guest

Description of problem:

Trying to enable Hyper-V in Windows 10 / Server 2016 guest resulted in error: "Virtualization support is disabled in the firmware."

systeminfo report:
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

systeminfo report with <feature policy='disable' name='hypervisor'/>:
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: No
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

C:\>wmic cpu get VirtualizationFirmwareEnabled
VirtualizationFirmwareEnabled
FALSE

PS C:\> (Get-CimInstance Win32_Processor).VirtualizationFirmwareEnabled
False

virt-host-validate in Fedora 24 live guest:
All check PASS except IOMMU, details in attachment


Version-Release number of selected component (if applicable):
Fedora 24
kernel-4.7.6-200.fc24.x86_64
qemu-system-x86-2:2.6.2-1.fc24.x86_64
qemu-kvm-2:2.6.2-1.fc24.x86_64
libvirt-1.3.3.2-1.fc24.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Install Windows 10 / Server 2016 guest
2. Try to enable Hyper-V
3. Hyper-V cannot be installed with error message

Actual results:
Nested virtualization worked

Expected results:
KVM in KVM seem work but Hyper-V does not

Additional info:
Hyper-V in Hyper-V guide
https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/user_guide/nesting

Comment 1 hlmasterchief93 2016-10-15 19:56:56 UTC
PowerShell check
PS C:\> (Get-CimInstance Win32_Processor).SecondLevelAddressTranslationExtensions
True
PS C:\> (Get-CimInstance Win32_Processor).VirtualizationFirmwareEnabled
False
PS C:\> (Get-CimInstance Win32_Processor).VMMonitorModeExtensions
True
PS C:\> (Get-CimInstance Win32_OperatingSystem).DataExecutionPrevention_Available
True


WMIC check
C:\>wmic cpu get SecondLevelAddressTranslationExtensions
SecondLevelAddressTranslationExtensions
TRUE
C:\>wmic cpu get VirtualizationFirmwareEnabled
VirtualizationFirmwareEnabled
FALSE
C:\>wmic cpu get VMMonitorModeExtensions
VMMonitorModeExtensions
TRUE
C:\>wmic os get DataExecutionPrevention_Available
DataExecutionPrevention_Available
TRUE

Comment 2 Pavel Hrdina 2016-10-17 09:06:11 UTC
Hi, please provide domain XML of the windows guest, I've tested it and it works so I guess that your XML doesn't enable the correct cpu feature for windows guest.

Comment 3 hlmasterchief93 2016-10-17 09:14:14 UTC
I have try to use the fedora-virt-preview and kernel-vanilla-stable repo and now it work with these packages (just add the repo and upgrade, no need to change the guest xml)

kernel-4.8.1-1.vanilla.knurd.1.fc24.x86_64
libvirt-2.2.0-1.fc24.x86_64
qemu-kvm-2:2.7.0-3.fc24.x86_64
qemu-system-x86-2:2.7.0-3.fc24.x86_64

Comment 4 hlmasterchief93 2016-10-23 03:05:15 UTC
It seem to soon to tell.
So the qemu 2.7 packages enable Windows 10 / Server to install Hyper-V, newer kernel or libvirt is not needed.

But Hyper-V still not working correctly. When add this tag <feature policy='disable' name='hypervisor'/>, Hyper-V cannot start VM with error: "Virtual Machine could not be started because the hypervisor is not running"

Without this tag, there is this error "Failed to start the virtual machine because one of the Hyper-V components is not running." and in Device Manager, this component "Microsoft Hyper-V Virtual Machine Bus Provider" report "Windows cannot initialise the device driver for this hardware. (Code 37)"

Comment 5 BugMasta 2017-03-09 21:05:50 UTC Comment hidden (spam)
Comment 6 BugMasta 2017-03-09 21:13:24 UTC Comment hidden (spam)
Comment 7 hlmasterchief93 2017-03-09 21:20:01 UTC
It seem we need qemu 2.7 and kernel 4.10 to make Hyper-V on QEMU/KVM work. You may want to check this, I have not test this yet
https://ladipro.wordpress.com/2017/02/24/running-hyperv-in-kvm-guest/

Comment 8 BugMasta 2017-03-09 22:05:38 UTC Comment hidden (spam)
Comment 9 BugMasta 2017-03-09 22:07:46 UTC Comment hidden (spam)
Comment 10 BugMasta 2017-03-09 22:44:53 UTC Comment hidden (spam)
Comment 11 BugMasta 2017-03-09 23:00:03 UTC Comment hidden (spam)
Comment 12 hlmasterchief93 2017-03-10 07:16:28 UTC
I just have sometime to test with kernel 4.10 and it seems working. I have not try to install OS yet, just try to boot VM, work with both gen. I am using kernel from Kernel vanilla repositories.

I only need <cpu mode='host-passthrough'>, not <feature policy='require' name='vmx'/>. I think host-passthrough already pass the vmx flag.

fc24
kernel-4.10.1-1.vanilla.knurd.1.fc24.x86_64    @kernel-vanilla-stable
qemu-kvm-2:2.7.0-8.fc24.x86_64                 @fedora-virt-preview
libvirt-2.2.0-2.fc24.x86_64                    @fedora-virt-preview

Comment 13 BugMasta 2017-03-11 14:30:13 UTC Comment hidden (spam)

Note You need to log in before you can comment on or make changes to this bug.