VirtualBox

Ticket #4032 (new enhancement)

Opened 9 years ago

Last modified 3 days ago

[feature-request] Nested Virtualization: VT-in-VT

Reported by: Technologov Owned by:
Priority: minor Component: VMM
Version: VirtualBox 2.2.2 Keywords:
Cc: Tao1, vbfun, DNS, Tristan, x5560, Tsso, bluezeak, peterdk, snowch, rdx, Bertrualex, EnesKorukcu, AfUnix, dario, anrichter, Jimbob, adam84luong, Coffee_fan, everflux, purpletoad, jonseymour, ciekawy, GA, ThatOneGuySean, Youness, subdian, veganaiZe, JohnStarich, Michal, todd.vierling, emiliano.bonassi, killmenot, ccarbone, azurtree, amclain, macedemo, GnomeUser, nicorac, schmunk, gael.abadin, paha, krasimir, pixie, Parfait, ikb42, yanp.bugz, hekier, maniankara, RayN, oam, domiel, sab3awy, Canada00, Ashishkel, leonexis, andjohn2000, denka_b, theBruno Guest type: Windows
Host type: other

Description (last modified by klaus) (diff)

Hi All,

Because more and more virtualization software requires VT (Intel VMX or AMD-V) to run, it makes sense to virtualize it somehow. (at least if host CPU supports hardware VT)

It will allow the following software to run in guests: -Xen (full virtualization mode) -KVM -Hyper-V -Windows Virtual PC -- this is basically a requirement for those who wanna run Windows 7 "XP mode". i.e. It allows for more complete user experience on Win7 guests.

Others can take advantage of it too: -VirtualBox itself :) -VMware Workstation -VMware ESX

-Technologov (yes, I will take advantage of it too :-), yay! )

[Edit by klaus 2018-05-06:]

This feature is being worked on for a while. Once the implementation is complete and tested it will be available to all users.

Change History

comment:1 Changed 9 years ago by Technologov

opened on 17.5.2009.

comment:2 Changed 9 years ago by sandervl73

  • Priority changed from major to minor

A lot of work for questionable usefulness. Definitely very low on our priority list.

comment:3 Changed 9 years ago by Technologov

This is partially related to wish #2988

-Technologov

comment:4 Changed 9 years ago by Technologov

KVM team has developed (untested) patches for both nested VMX and nested SVM. Maybe some ideas can be taken from those patches.

See: (General Info)

 http://avikivity.blogspot.com/2008/09/nested-svm-virtualization-for-kvm.html

and

 http://avikivity.blogspot.com/2009/09/nested-vmx-support-coming-to-kvm.html

-Technologov

comment:5 Changed 7 years ago by Technologov

update: VMware Workstation 8 claims to support this feature !

 https://www.vmware.com/support/ws80/doc/releasenotes_workstation_80.html

-Technologov

comment:6 Changed 6 years ago by Technologov

It seems that Linux 3.1 KVM finally achieved nested VMX.

This feature is yet another filler feature that is a "must-have":

 http://www.mjmwired.net/kernel/Documentation/virtual/kvm/nested-vmx.txt

Research paper:

 http://www.usenix.org/events/osdi10/tech/full_papers/Ben-Yehuda.pdf

-Technologov

comment:7 follow-up: ↓ 8 Changed 6 years ago by frank

What you denote as "must have" needs a lot of implementation time, is very difficult to implement and the benefit of nested virtualization is questionable.

comment:8 in reply to: ↑ 7 Changed 6 years ago by Johan Ryberg

Last edited 2 years ago by michael (previous) (diff)

comment:13 Changed 6 years ago by frank

  • Description modified (diff)

I know that other virtualization products support nested virtualization. Even with VirtualBox it is possible to execute VirtualBox without VT-x/AMD-V as a guest of VirtualBox with VT-x/AMD-V enabled. But apart from that, implementing full virtualization is too much effort for too little benefit.

comment:15 Changed 5 years ago by itarchitectlev

It seems that this ticket was evaluated a long time ago when the usefulness may have been disputed. In any case, there are real reasons people want to have nested hardware VT.

There is a lot of working happening in the cloud community and evaluating products in this arena often requires hardware VT - which implies two things:

1) You have real hardware available 2) You have nested hardware VT capable virtualization software (e.g. VMware)

Given that we are in a world of cheap memory coupled with multiple core fast CPUs, virtualization is a great boost to doing cloud infrastructure development work. The problem is that the virtualized hardware created under VBox is only one part of the picture - as you're creating virtual hardware to run infrastructure designed to virtualize. Nested Hardware VT is essential here as software emulation in this world is painfully slow.

I have just purchased a VMware product because VirtualBox doesn't support this fundamental feature that I require which will now render my use of VirtualBox redundant.

I have been a big advocate of VirtualBox, but future work now sees this being left behind.

Regards, Kev @itarchitectkev

comment:18 Changed 5 years ago by frank

I don't want to start a discussion here, a public bugtracker is not the right place for doing this. But please be aware that the VirtualBox development is primary driven by paying customer demands. Of course that does not mean that community demands are not being considered. We just have limited resources. Code contribution from the community may speed up the implementation of certain features.

comment:23 Changed 4 years ago by Smackey's Dad

Will nested VM work using "Intel Haswell CPU" which has VMCS feature allowing nested virtualization. If it does not it makes sense (in my opinion) to add support for nested VM with New CPU VMCS feature rather than writing the emulation layer.

comment:24 Changed 4 years ago by ramshankar

No. Haswell CPUs while it has features like VMCS shadowing that help make Nested Virtualization perform better and easier to program, we still have to implement code which makes use of it. At the moment, we still feel when we implement the nested virtualization feature, having a Haswell CPU as the minimum requirement is not reasonable as it's still too new, and will exclude quite a bit of the users even two years down the line.

This feature is most definitely on our radar for a while now, but again, it's a question of managing our development resources which are limited.

Last edited 4 years ago by ramshankar (previous) (diff)

comment:31 Changed 4 years ago by Miles Chen

Last edited 2 years ago by michael (previous) (diff)

comment:39 Changed 3 years ago by Bernd Vogt

Last edited 2 years ago by michael (previous) (diff)

comment:43 Changed 3 years ago by Mobile Geek

Last edited 2 years ago by michael (previous) (diff)

comment:55 Changed 3 years ago by Mandrel Bent

Last edited 2 years ago by michael (previous) (diff)

comment:56 Changed 3 years ago by Brian Cunnie

Last edited 2 years ago by michael (previous) (diff)

comment:59 Changed 3 years ago by Thomas Dreibholz

Last edited 2 years ago by michael (previous) (diff)

comment:69 Changed 2 years ago by Roberto V. A.

Last edited 2 years ago by michael (previous) (diff)

comment:93 Changed 2 years ago by Steel Thunder

Last edited 2 years ago by michael (previous) (diff)

comment:101 Changed 2 years ago by michael

  • Cc Tao1 added

comment:103 Changed 2 years ago by michael

  • Cc vbfun, DNS, Tristan, x5560, Tsso, bluezeak, peterdk, snowch, rdx, Bertrualex, EnesKorukcu, AfUnix, dario, anrichter, Jimbob, adam84luong, Coffee_fan, everflux, purpletoad, jonseymour, ciekawy, GA, ThatOneGuySean, Youness, subdian, veganaiZe, JohnStarich, Michal, todd.vierling, emiliano.bonassi, killmenot, ccarbone, azurtree, amclain, macedemo, GnomeUser, nicorac, schmunk, gael.abadin, paha, krasimir, pixie, Parfait, ikb42, yanp.bugz, hekier, maniankara, RayN, oam, domiel, sab3awy, Canada00, Ashishkel, leonexis, andjohn2000 added

comment:104 Changed 2 years ago by michael

  • Cc denka_b added

comment:105 Changed 2 years ago by michael

  • Cc theBruno added

I have removed most of the comments from this ticket, as they were more of a discussion nature and not very conductive to implementation. I added the nicknames of the commenters to the CC list so that they still get updates to the ticket. Unfortunately trac does not like nicknames with spaces in in CC, so I just removed the content of those comments.

As mentioned previously, we currently do not have the available resources to implement this feature. If people in the community are willing and able to help we would certainly be interested in code contributions, but in that case please communicate with us before you start writing code to avoid wasted effort. If anyone in the community would be willing to be hired to work on this several people have indicated that they would be interested in trying to organise funding. Alternatively perhaps someone can find a suitable freelance developer. The same thing applies here: please talk to us before starting writing.

comment:106 Changed 12 months ago by Pro Tipper

cc me too please?

comment:107 Changed 12 months ago by michael

Pro Tipper: unfortunately the CC field can't handle user names with spaces in them. I will just leave your comment and that will cause you to get update notifications.

Current CC list is: Tao1, vbfun, DNS, Tristan, x5560, Tsso, bluezeak, peterdk, snowch, rdx, Bertrualex, EnesKorukcu, AfUnix, dario, anrichter, Jimbob, adam84luong, Coffee_fan, everflux, purpletoad, jonseymour, ciekawy, GA, ThatOneGuySean, Youness, subdian, veganaiZe, JohnStarich, Michal, todd.vierling, emiliano.bonassi, killmenot, ccarbone, azurtree, amclain, macedemo, GnomeUser, nicorac, schmunk, gael.abadin, paha, krasimir, pixie, Parfait, ikb42, yanp.bugz, hekier, maniankara, RayN, oam, domiel, sab3awy, Canada00, Ashishkel, leonexis, andjohn2000, denka_b, theBruno

comment:108 Changed 11 months ago by Gerry R

cc me please

comment:109 Changed 10 months ago by Parkeren Schiphol

Would really benefit from this for all my employees  https://parkos.nl/parkeren-schiphol we are all running w7 in xp mode due to a software compatibility issue. This should be a basic feature.

Last edited 10 months ago by Parkeren Schiphol (previous) (diff)

comment:110 Changed 6 months ago by argenstijn

Could you increase priority! Nowadays this feature will come in handy.

comment:111 Changed 5 months ago by einar

cc me please

comment:112 Changed 4 months ago by jwatilo

Just want to add my voice -- we NEED nested virtualization. With the latest technologies this is becoming a MUST.

comment:113 follow-up: ↓ 114 Changed 4 months ago by socratis

  1. You don't "need" or "must have" nested virtualization, the vast majority of the world is doing great without it. You "would like" is more like it... ;)
  2. Take a look at the timeline.
  3. As Yoda once said:

    Patience you must have my young Padawan...

comment:114 in reply to: ↑ 113 Changed 4 months ago by mironex

Replying to socratis:

  1. You don't "need" or "must have" nested virtualization, the vast majority of the world is doing great without it. You "would like" is more like it... ;)
  2. Take a look at the timeline.
  3. As Yoda once said:

    Patience you must have my young Padawan...

Dear Socratis, Padwan is right. It's no longer a caprice. But an obvious need. Many tools, for example, for containerization are launched in a virtualbox.

That means that we really need to run a virtualbox in a virtualbox.

Maybe is possible to change the priorities. If you, Socratis, are so influential, you can change something.

If you do not have such an influence, well we must practice a Greek stoic patience or just use maybe e.g. KVM, VMWare.

Well, 9 years is a long time

Error: On virtual box is not able to start minikube

Starting local Kubernetes v1.9.0 cluster...
Starting VM...
E0214 22:14:50.003571    7064 start.go:159] Error starting host: Error creating host: Error executing step: Running precreate checks.
: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory.

 Retrying.
E0214 22:14:50.004044    7064 start.go:165] Error starting host:  Error creating host: Error executing step: Running precreate checks.
: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

comment:115 Changed 4 months ago by mironex

cc me too please?

comment:116 Changed 4 months ago by socratis

@mironex
You didn't take a look at the timeline, did you?

comment:117 Changed 4 months ago by n00ris

cc me please

comment:118 Changed 4 months ago by n00ris

I opened the timeline, what in special shloud we see at the timeline?

I used my browser search to find "nested" in the page and I found

Changeset in vbox [71004] by vboxsync

VMM/HMSVMR0: Nested Hw.virt: Fix intercepting VMMCALL while executing the …

from 2018-02-14

Does this mean this feature is Work In Progress, but not yet in the latest release? Is there a beta available, or is it in a state that we could test if I build virtualbox directly from svn?

comment:119 Changed 4 months ago by maeni70

I don't understand the timeline either. And i agree that this feature is important! E.g. Android Emulator needs VT-X. I wanted to use VirtualBox VM for mobile development, but as I learned just right know, it is limited for this purpose.

comment:120 Changed 4 months ago by maeni70

cc me too please. thanks

comment:121 Changed 4 months ago by socratis

The timeline simply tells you that fixes/patches are coming in all the time. It means that they're working on this feature. Hard. No, it's not ready, no, you didn't see any announcements. And keep in mind that yes, it may becoming an important feature, but a couple of years ago you didn't even have virtualization at all, so jumping from nothing to nested, that's quite a leap.

It will become available. Just (like everything else in life), don't ask for promises or specific dates. The source code is available, if you can't contribute, at least you can monitor it to see if they're working on it. And they are...

comment:122 Changed 3 months ago by paleozogt

+1 cc me also

comment:123 Changed 2 months ago by jotenko

I'm also waiting desperately for this. CC me too, please.

Last edited 2 months ago by jotenko (previous) (diff)

comment:124 Changed 2 months ago by vbkamfung

As docker is becoming common, this request should be changed from 'want to' to 'must have'.

comment:125 Changed 2 months ago by michael

Based on the number of code contributions we have seen, or the number of people expressing interest in contributing (I think none at all, but I may have missed one or two) this feature cannot be in very high demand. Be that as it may, it is being worked on.

comment:126 Changed 7 weeks ago by Darren Mackay

Just want to add my support for this.

This past week - I now have 3 clients (2x UK and 1 x NL) who are deploying Windows Containers as standard - 1 of these clients has 3000 users (also a large Oracle JDE house). the requirement to run windows as a VM is mandatory - due to lockdown by the customer requirements - and thus containers within the locked down windows image (also includes VPM clients / etc).

Note - Running virtualbox on Mac as a consultant.

comment:127 Changed 6 weeks ago by brexit

I occasionally need to run KVM and in order to do that I must stop VBox VMs, disable VBox, enable KVM, reboot, and revert 1-2 days later. And of course migrate VBox VMs to KVM, if I need any of them on KVM.

Test/dev, containers, compatibility requirement (for KVM-specific ISVs), etc - there are many reasons why it is desirable.

comment:128 Changed 6 weeks ago by socratis

@brexit

Your first requirement is not about nested virtualization, it's about concurrent virtualization. And unfortunately, KVM (just like Hyper-V) doesn't want to play nice.

The trick with VT-x is that it has to be shared, since it's "only one" available slot for its use. VMware and VirtualBox do not use VT-x at the same time but rather take turns. Simply put, programs that use VT-x should do this: VT-x lock, execute, VT-x unlock. This way other processes can use VT-x in turns.

On the other hand, KVM and Hyper-V permanently take over VT-x and don't let anyone else use it. If a program uses VT-x from the moment it is loaded and doesn't let go till the moment it dies, you have a problem. So, please complain to the KVM and Hyper-V people about that.

comment:129 follow-up: ↓ 131 Changed 6 weeks ago by Stef2

Raising the count for VT-in-VT feature. Main use case is also docker.

comment:130 Changed 6 weeks ago by klaus

  • Description modified (diff)

comment:131 in reply to: ↑ 129 Changed 6 weeks ago by klaus

Replying to Stef2:

Raising the count for VT-in-VT feature. Main use case is also docker.

Can anyone explain why VT-in-VT is so important for users of Docker? Docker relies on containers, which is a technology not requiring virtualization.

Of course one can run Docker inside a VirtualBox VM today, so what am I missing?

comment:132 follow-up: ↓ 133 Changed 5 weeks ago by zappacor

+1, needing this ASAP. @Klaus: any ETA for it yet?

comment:133 in reply to: ↑ 132 Changed 5 weeks ago by socratis

Replying to zappacor:

+1, needing this ASAP.

Can you for the life of me explain to me why this is an ASAP request? What in the seven kingdoms are you trying to do that requires this ... yesterday? What's your usage scenario that requires VT-x in a VM?

@Klaus: any ETA for it yet?

I can give you one, and maybe Klaus will prove me wrong: No ETA. There is *never* an ETA. For *anything*/*everything*.

(it's not just the VirtualBox team, it's any developer with a sense of self-respect)

comment:134 Changed 5 weeks ago by hamerins

+1 cc me also

comment:135 Changed 3 weeks ago by JurgenO

+1 please.

Out of respect for all of us here.

Many of us here have benefited from the "FREE" and very useful technologies for our work.

Which many have had contributed their time and effort to make this happened.

And more, we have yet to spent any effort for this great software, we only make use of this for FREE.

Appreciation and respect should come to mind even before making any request.

As much as I also need to have this feature for my Android-SDK development usage, I can only make this to be heard as a humble request and NOT a DEMAND.

Definitely no ETA, just hope.

Cheers!

comment:136 Changed 3 days ago by Mixim

Dear developers of VirtualBox, this requested feature will be very usefull for all software developer, which use .NET Core and Docker with it. This ticket is 9 year old, may be you can implement it now?

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use