Not only that, Genymotion requires VT-x apparently.
Run Hyper-V and VirtualBox concurrently
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: Run Hyper-V and VirtualBox concurrently
I'm glad I'm not alone.
Not only that, Genymotion requires VT-x apparently.
Not only that, Genymotion requires VT-x apparently.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
-
Ramshankar
- Oracle Corporation
- Posts: 793
- Joined: 7. Jan 2008, 16:17
Re: Run Hyper-V and VirtualBox concurrently
It is not recommend to run hypervisors simultaneously but it -can- work if both the hypervisors co-operate. Basically, VT-x is an exclusively acquired resource and each of the hypervisors needs to relinquish VT-x from the CPU once it is done executing guest code using VT-x. VirtualBox has had this support for years and enabled by default on Windows.loukingjr wrote:I am lost.![]()
I have been told for something like 6 years you can't run Hyper-V and VirtualBox concurrently. And this is from the VirtualBox manual…I guess I need to start over.Warning: Do not run other hypervisors (open-source or commercial virtualization products) together with VirtualBox! While several hypervisors can normally be installed in parallel, do not attempt to run several virtual machines from competing hypervisors at the same time.
You can force this behaviour by executing (after powering off all VMs):
Code: Select all
VBoxManage setproperty hwexclusive offYou can verify whether or not your VirtualBox is set to share hardware virtualization resources or grab them exclusively by checking the VBox.log for a VM, search for the line:
Code: Select all
VT-x/AMD-V init method: GLOBALOracle Corp.
-
Ramshankar
- Oracle Corporation
- Posts: 793
- Joined: 7. Jan 2008, 16:17
Re: Run Hyper-V and VirtualBox concurrently
Because somebody mentioned that raw mode might be removed with 5.0 which is simply not true, hence I needed to correct it without making a blanking statement.BillG wrote:I am just as confused as Lou. Hyper-V locks on to hardware virtualization at boot time, even before the OS loads, and always has. The only way to prevent it is to modify the loader using BCDEDIT. I have no idea how raw-mode got into the discussion ( and have no wish to find out, because I would never use it). I also have no ides why OS X hosts got a mention when discussing Hyper-V and Windows hosts.
Oracle Corp.
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: Run Hyper-V and VirtualBox concurrently
Ramshankar, first thank you for the detailed explanation. My confusion is because the user has Microsoft's Hyper-V enabled which I have been told and has been posted about numerous times never relinquishes VT-x therefore VirtualBox would never have access to it no matter what VirtualBox's settings are. It wasn't a question of VirtualBox cooperating but Hyper-V's exclusive use. As far as I know Hyper-V is considered a Type 1 hypervisor and takes control of VT-x, as BillG mentioned before Windows loads.
The OP stated this…
So my confusion is, if Hyper-V does take over exclusive control of VT-x and VirtualBox would never see it, how can the user be using both concurrently? The confusion is really about Hyper-V and does it really take over exclusive control of VT-x. Running apps that require Hyper-V be enabled and running an app that requires VirtualBox and VT-x simultaneously seems to be mutually exclusive.
The OP stated this…
To my understanding Genymotion requires VT-x to run. It throws up an error message saying it can't run without VT-x.Unless I was fooling myself in a big way, I was running Hyper-V and VirtualBox 4.x.x concurrently on my Windows 8.1 machine (Intel i5 CPU) without any problems. I need this because I run Genymotion Android emulators which require VirtualBox and Windows Phone emulators which require Hyper-V.
So my confusion is, if Hyper-V does take over exclusive control of VT-x and VirtualBox would never see it, how can the user be using both concurrently? The confusion is really about Hyper-V and does it really take over exclusive control of VT-x. Running apps that require Hyper-V be enabled and running an app that requires VirtualBox and VT-x simultaneously seems to be mutually exclusive.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
Re: Run Hyper-V and VirtualBox concurrently
I have been wondering about something for while, actually I even tried it though I did not mention it because I thought it might be irrelevant. If experts here do not mind, let me ask how relevant this is. According to viewtopic.php?f=6&t=58820, a computer without hardware virtualization can run VirtualBox. I tried to set HardwareVirtEx enabled="false" with VB5.0. but it did not work. When I installed VirtualBox4.3.30 and VirtualBox and Hyper-V started to work concurrently, I immediately thought it confirmed what Lou stated:
Does the above understanding have any relevance now?However, VirtualBox pre-5.0 may have been able to run 32bit guests only, with no hardware virtualization which means it would be very slow.
Last edited by Hong on 21. Jul 2015, 15:05, edited 1 time in total.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Run Hyper-V and VirtualBox concurrently
I'm as confused as everyone else on this thread, but only because there's maybe too many assumptions.
I would like to see definitive proof that VirtualBox and Hyper-V were running at the time same using VT-x, and full configuration dump for both. We haven't seen a single log so far...
I would like to see definitive proof that VirtualBox and Hyper-V were running at the time same using VT-x, and full configuration dump for both. We haven't seen a single log so far...
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: Run Hyper-V and VirtualBox concurrently
Hyper-V is a type 1 (native or bare-metal) hypervisor. VirtualBox is a type 2 (hosted) hypervisor.
When Hyper-V is enabled, Windows itself effectively runs as a VM, in the parent partition of the hypervisor.
It is impossible for VirtualBox to use VT-x inside a Hyper-V partition (including parent partition).
As a quick test, I enabled Hyper-V in a Windows 10 Pro computer and installed VirtualBox 4.3.30. As expected, in VirtualBox only 32-bit guests can be created and the Acceleration tab is disabled, indicating that VirtualBox has no access to VT-x.
Could it be possible that the OP is just using Genymotion with 32-bit guests only?
When Hyper-V is enabled, Windows itself effectively runs as a VM, in the parent partition of the hypervisor.
It is impossible for VirtualBox to use VT-x inside a Hyper-V partition (including parent partition).
As a quick test, I enabled Hyper-V in a Windows 10 Pro computer and installed VirtualBox 4.3.30. As expected, in VirtualBox only 32-bit guests can be created and the Acceleration tab is disabled, indicating that VirtualBox has no access to VT-x.
Could it be possible that the OP is just using Genymotion with 32-bit guests only?
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Run Hyper-V and VirtualBox concurrently
At this state, it's all speculation what the OP is doing. My personal experience is the same as your Leogorol, hence why I'm asking for logs and configuration dumps to see if I am wrong 
I won't believe until I've seen it happening and can reproduce it locally.
I won't believe until I've seen it happening and can reproduce it locally.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: Run Hyper-V and VirtualBox concurrently
Genymotion according to several posts requires VT-x to run. As I mentioned it will throw up an error if not available.Legorol wrote: Could it be possible that the OP is just using Genymotion with 32-bit guests only?
some examples
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Run Hyper-V and VirtualBox concurrently
Sure, the default config of Genymotion requires VT-x (most likely setting the VT-x flag in forced mode), preventing the VM to failback to non VT-x if not there.
But that doesn't mean the VM config wasn't altered to make it happen.
But that doesn't mean the VM config wasn't altered to make it happen.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Run Hyper-V and VirtualBox concurrently
Force mode reference: use IMachine::setHWVirtExProperty() with HWVirtExPropertyType_Force.noteirak wrote:Sure, the default config of Genymotion requires VT-x (most likely setting the VT-x flag in forced mode), preventing the VM to failback to non VT-x if not there.
So you have three modes:
- Disable HW Virt - HWVirtExPropertyType_Enabled to False
- Enable HW Virt but disable and continue if not available HWVirtExPropertyType_Enabled to True, HWVirtExPropertyType_Force to False.
- Enable HW Virt but fail VM if not availlable - HWVirtExPropertyType_Enabled and HWVirtExPropertyType_Force to True
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: Run Hyper-V and VirtualBox concurrently
The point was he says he's also running Hyper-V which means no VT-x to force.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Run Hyper-V and VirtualBox concurrently
Again, it depends on the configuration and the guest OS template selected. And we have neither from the OP.loukingjr wrote:The point was he says he's also running Hyper-V which means no VT-x to force.
I think we should stop speculating and wait for the OP to provide logs and configuration dumps.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: Run Hyper-V and VirtualBox concurrently
Well, FWIW, I use OSX 95% of the time so no Hyper-V. I have no personal interest in Genymotion but I did download the current version for OSX and it seems it doesn't like VB 5.0. So I will just watch this thread and see what everyone says. 
@noteirak, there is no guest OS or guest OS template. Genymotion is an Android emulator that uses VirtualBox to run.
I'll be watching.
@noteirak, there is no guest OS or guest OS template. Genymotion is an Android emulator that uses VirtualBox to run.
I'll be watching.
Last edited by loukingjr on 21. Jul 2015, 14:58, edited 1 time in total.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Run Hyper-V and VirtualBox concurrently
And because of that the VM config suddendly and magically doesn't have an OS type setting?loukingjr wrote:@noteirak, there is no guest OS or guest OS template. Genymotion is an Android emulator that runs in VirtualBox.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!