Nested virtualization on windows host

Discussions related to using VirtualBox on Windows hosts.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Nested virtualization on windows host

Post by fth0 »

fb wrote:Without kvm-enable it's ~850k exits, with kvm-enable it's ~550k exits. Funnily its considerably faster with more exits
Interesting! :)

One could spend days or weeks with further experiments to investigate the background reason, but I'm not sure if it's worth the effort, if you have a working solution. One example for an experiment to start with: You could run the VirtualBox VM twice, with the QEMU VM spending some considerable effort, once with and once without KVM, doing the same actions at approximately the same time for approximately the same duration, and compare the VM statistics in the VBox.log files, to see which components show considerable differences. But that would possibly be only the beginning of a really deep dive ...
fb wrote:Do you know about Intel HAXM (https://github.com/intel/haxm)?
I read about it, and other users trying HAXM inside VirtualBox VMs had similar problems like with KVM, when using VirtualBox 6.1.18 and older. The KVM problem has been solved within VirtualBox 6.1.20 and newer, and there have not been any reports yet regarding HAXM (except yours ;)).
fb wrote:haxm_warning: Host CPU does not support APM
Googling for only "Host CPU does not support APM" will lead you to the HAXM source code, and the comments therein will lead you to the Intel SDM part 3B chapter 18.2 Architectural Performance Monitoring. I'd assume that VirtualBox does not provide the APM functionality to the VM. But it seems to be only a warning ...
fb
Posts: 9
Joined: 9. Jun 2021, 19:49

Re: Nested virtualization on windows host

Post by fb »

Thanks for your efforts!
fth0 wrote:
fb wrote:Without kvm-enable it's ~850k exits, with kvm-enable it's ~550k exits. Funnily its considerably faster with more exits
Interesting! :)

One could spend days or weeks with further experiments to investigate the background reason, but I'm not sure if it's worth the effort, if you have a working solution. One example for an experiment to start with: You could run the VirtualBox VM twice, with the QEMU VM spending some considerable effort, once with and once without KVM, doing the same actions at approximately the same time for approximately the same duration, and compare the VM statistics in the VBox.log files, to see which components show considerable differences. But that would possibly be only the beginning of a really deep dive ...
That sounds like too much time would be needed, indeed. If the ~2 seconds delay per debug step annoy me too much I can always switch to a native installation of debian and use qemu on that. Even though setting up my development environment again may take some time and nerves. I could also try to migrate the .vdi file to a native installation. I read that it's potentially possible.
fth0 wrote:
fb wrote:Do you know about Intel HAXM (https://github.com/intel/haxm)?
I read about it, and other users trying HAXM inside VirtualBox VMs had similar problems like with KVM, when using VirtualBox 6.1.18 and older. The KVM problem has been solved within VirtualBox 6.1.20 and newer, and there have not been any reports yet regarding HAXM (except yours ;)).
I think I will open an issue on github for my haxm problem. It works with other linux users and the reason it does not work for me could be the nesting.
fth0 wrote:
fb wrote:haxm_warning: Host CPU does not support APM
Googling for only "Host CPU does not support APM" will lead you to the HAXM source code, and the comments therein will lead you to the Intel SDM part 3B chapter 18.2 Architectural Performance Monitoring. I'd assume that VirtualBox does not provide the APM functionality to the VM. But it seems to be only a warning ...
Thanks, I did not look into the code I got with googling "Host CPU does not support APM". Does not seem likely to be the reason for haxm not working on my system.
Post Reply