Ticket #12731 (closed defect: obsolete)
VirtualBox not identifying itself as hypervisor
Reported by: | sysdroid | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 4.3.6 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Windows |
Description
Following an investigation done by Red Hat, it was discovered that VirtualBox 4.3.6 r91406 running on Windows 7 32-bit is not setting bit 31 in CPUID correctly. Due to that, the guest incorrectly identifies it's running in a physical machine.
Attachments
Change History
comment:1 Changed 7 years ago by frank
I'm not sure if this is really a bug. Why do you think it is mandatory for a hypervisor to set this bit, do you have a use case?
comment:2 Changed 7 years ago by sysdroid
I do not have an use case (end user here). My understanding is that Red Hat Enterprise Linux uses this to identify if it's running in a hypervisor or not.
comment:3 Changed 7 years ago by frank
I see your point but actually sometimes makes sense that the guest does not know if it is really running on a hypervisor or on bare metal.
comment:4 Changed 7 years ago by sysdroid
Yes, I agree. Reading Intel's instruction set manual, it's evident bit 31 is reserved and not officially determined to be an indicative of hypervisor presence or not.
This article summarizes the situation: http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/detecting-x86-virtual-machines.html
Here are "instructions" from Microsoft and Vmware: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458
http://msdn.microsoft.com/en-us/library/windows/hardware/ff538624(v=vs.85).aspx
I noticed Linux seems to have specific detection routines for many hypervisors. Perhaps they should think about including VirtulBox (if they can find a characteristic that would make Vbox detectable): http://lxr.free-electrons.com/source/arch/x86/include/asm/hypervisor.h#L31
comment:5 Changed 7 years ago by bird
- Summary changed from Virtualbox not identifying itself as hypervisor to VirtualBox not identifying itself as hypervisor
We normally do not set this bit, this is intentional on our part (partially for historical reasons, though, so it may change in later releases). Only when selecting a mac os x guest type will the bit be set by default (because we cannot run more recent guests without it).
There probably should've been a setting for this flag in 4.3, but it didn't make it in time, so there is only the low level VBoxManage setextradata [vmname|global] VBoxInternal/CPUM/EnableHVP 1 setting available at present.
comment:6 Changed 5 years ago by aeichner
- Status changed from new to closed
- Resolution set to obsolete
Please reopen if still relevant with a recent VirtualBox release.