VirtualBox

Opened 10 years ago

Closed 8 years ago

#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 (1)

x86info.txt (6.5 KB ) - added by sysdroid 10 years ago.

Download all attachments as: .zip

Change History (7)

by sysdroid, 10 years ago

Attachment: x86info.txt added

comment:1 by Frank Mehnert, 10 years ago

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 by sysdroid, 10 years ago

I do not have a user 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.

Version 0, edited 10 years ago by sysdroid (next)

comment:3 by Frank Mehnert, 10 years ago

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 by sysdroid, 10 years ago

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 by bird, 10 years ago

Summary: Virtualbox not identifying itself as hypervisorVirtualBox 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 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use