22

My host computer is running Windows 10, and my guest is Ubuntu in VirtualBox. I am trying to run a 3rd VM on the Ubuntu, but VirtualBox says:

Failed to open a session for the virtual machine Windows XP. VT-x is not available. (VERR_VMX_NO_VMX).

It also returned an error code of 0x80004005

I have virtualization enabled, of course. It's not even an option to turn off in my BIOS (MSI z170a). My machine is very high end, so I know it can run it, I've ruled out everything I can.

SidedTech
  • 190
  • 4
  • 15
  • 4
    FWIW, KVM can do nested. – Jonas Schäfer Mar 06 '17 at 10:43
  • 1
    From what I remember, a 32-bit inner VM should work, since that doesn't require hardware virtualization (VT-x). Assuming you're interested in 32-bit Windows XP, that should work for you. – CodesInChaos Mar 06 '17 at 13:27
  • 4
    Why nest the Virtualboxes, anyway? – Xen2050 Mar 06 '17 at 17:04
  • 4
    @Xen2050 because, VMception. – David Refoua Mar 06 '17 at 18:25
  • @DRSDavidSoft That was my first though too... SidedTech could've [searched for VMception](https://duckduckgo.com/?t=lm&q=VMception&ia=web), would've found [Can you run a machine emulator (Bochs) inside a virtual machine?](https://superuser.com/questions/312433/can-you-run-a-machine-emulator-bochs-inside-a-virtual-machine) which indirectly answers his Q. I would've guessed something like *"I had to move my linux install into a VM [for some good reason], but I still want to run my VM's I keep in linux & don't know if just copying config files to win will work & don't want to try"* – Xen2050 Mar 07 '17 at 06:36

1 Answers1

44

What you're trying to do is nested virtualization. Its not supported in virtualbox and in no way is a priority for them.

You'll need to run the XP VM in the host instead.

In THEORY you could run plain old QEMU in the VM (it emulates the whole processor and pretty much the whole system) to do this but the performance will be really really bad.

Journeyman Geek
  • 127,463
  • 52
  • 260
  • 430
  • The performance of doing that will probably be reminiscent of early PC virtualization solutions (non-hardware-assisted). Think sluggish MS-DOS on modern hardware... – user Mar 06 '17 at 10:33
  • 4
    @MichaelKjörling Why the comparison? Early PC virtualization was hardware-assisted, just not in the same way as today. VMWare used to run ring 0 code in ring 1 with traps on some instructions and other tricks like rewriting kernel code. As far as I remember, VMWare's method was actually a couple % **faster** than VT-x , when VT-x first came out, according to benchmarks at the time, so not slow at all. Incidentally, running a nested old version of VMWare, or maybe VBox with VT-x disabled on a 32-bit guest might actually work, and work relatively well. Even if I'd only do it out of curiosity. – nitro2k01 Mar 06 '17 at 11:26
  • @nitro2k01When Micheal waid "early" virtualization solutions he meant really early like mid-90s early. Back in those days there was a thing called Virtual PC (later bought by Microsoft) that ran not only on a Mac but on a PowerPC cpu emulating x86. Your VMWare is not early, it is definitely very modern – slebetman Mar 06 '17 at 13:22
  • @slebetman Virtual PC first released in 1997. VMWare first released in 1999, which is also about when I first tried it. The benchmark comparisons to VT-x were of course done much later, but I mentioned it just to show that VMWare's original virtualization method wasn't necessarily slow. The original Virtual PC, despite the name, is not really a virtual machine, but an emulator. – nitro2k01 Mar 06 '17 at 14:38
  • @nitro2k01: AH yes. I remember that. VMWare fusion which also emulated x86 on PowerPC machines. Thank you for reminding me about that. So VMWare, by evidence you yourself provided. Originally really was like how Michael mentioned (notwithstanding the fact that he didn't mention VMWare specifically) – slebetman Mar 06 '17 at 14:51
  • @nitro2k01: Nevermind. Apparently I forgot my history. Fusion was only for Intel Mac. – slebetman Mar 06 '17 at 14:53
  • Early, pre-VT-x VMWare was indeed quite usable. CPU emulations running on a PowerPC Macintosh could be more hardware assisted than you think - that architecture was tailored to emulation, given that it came with a complete 68k emulation system built into the platform... – rackandboneman Mar 06 '17 at 16:05
  • That's weird. I'm on a Windows 7 host, running a Ubuntu guest-host, running a Windows 7 guest, all using VirtualBox. (It doesn't _have_ to make sense; it's a PoC). I have no answer why it doesn't work for the OP, but it should be possible _in general_. – SQB Mar 07 '17 at 11:44
  • I wonder if bitness matters somehow, or you have a specific set of settings that works. If my answer is wrong, feel free to post a setup that works. I'm always happy to be proven wrong and to learn something new in the process. – Journeyman Geek Mar 07 '17 at 14:06