Anyone experiencing very poor performance with VirtualBox 7.x?

Started looking back into Haiku with VirtualBox. It was very fast to install and run. Now, with VIrtualBox 7.x, it’s unbearably slow to boot up and super laggy to install. Not worth going any further.

What happened? Is there some VirtualBox setting which fixes this? Because it’s happening on all of the nightly 64 bit images I’ve tried as well as the Beta 3.

1 Like

Do you happen to run VirtualBox in hidpi system by any chance?

Sounds similar to a post on reddit

none of the devs really use virtualbox, nevertheless you can report a ticket. : )

I tried Haiku in VirtualBox 6.1 earlier this year, I was also not happy with its performance. Haven’t tried it on VirtualBox 7 though.

VMware Player gives me better results. (but no sound unfortunately)

1 Like

i have performance issue with virtual box regardless of OS, 3 yrs ago it seemed less resource intensive.

will try VMware again

Either I’m just too used to slow machines, or my Phenom II X4 (and previously my Athlon II X2) has no real issues running Haiku on VirtualBox (6.1.14, 6.1.40, and now 7.0.2).

I’m using real HDD/Partitions as storage… the rest of my VBox settings are pretty straight forward:

4 Cores, 2048 MB of RAM, 32 VRAM, VT-x/AMD-v, Nested Pagination, PAE/NX, KVM paravirtualization (that’s due to using the same VM to access a Linux install on that HDD).

VMSVGA graphics (as recomended by VBox), installed vmware_addons on Haiku to make use of that graphics driver.

ICH97 for audio, Intel PRO/1000MT Desktop for LAN (bridged).

My only complain, performance wise, is with large filesystem operations (deleting/stating big repo trees),but that also happens when running on bare metal, and only under Haiku, so, not a VBox issue.

Edit: just to clarify… I use VBox 7.02 on Win 10 LTSC 2021 (Hyper-V or WSL not even installed) most of the times with no real performance issues. Not much different from my old Linux install with 6.x there.

Any chance you are using WSL2 on Windows? If so the Windows Hyper-V totally kills even VirtualBox 6.x. I haven’t tried VirtualBox 7.x yet but VBox 6 runs Haiku perfectly great on Linux.

It seems in Windows you can only use one type of virtualisation. So indeed if you activate Hyper-V you will get virtualbox to use it’s slower emulation mode instead of virtualization. This should be visible in virtualbox settings then.

1 Like

I can second this on macOS after upgrading to VirtualBox 7. The window rendering and window movement both jump and lag behind,; I’ve never had this problem in Haiku or VirtualBox, so I wonder why it’s doing this. I’ll try to think of a solution because I’d like to review beta4 when it comes out…

Switch to “hdaudio” in the VMware configuration file, or install the OpenSound drivers.

4 Likes

thanks for the hint, now sound also works in VMware Player

In replying to my last VBox post (and the host is macOS on Intel), I’ve tried turning paravirtualization off completely, turning nested paging on and off, changing the disk configuration, giving the VM more graphics memory, and the tearing and lagging window bug is still there. To test this out yourself, open the Leaf menu and open the About box or any basic app. Haiku will slowly draw the window when opening it and draw it when closing it, and dragging isn’t smooth either.

I’ll see if another VM works better and post again but yeah, VirtualBox 7 does not seem to like Haiku so far; 6 worked fine.

Did you try running the VM with one CPU?

Enabling Low Resolution Mode helped me before with VirtualBox 6 on macOS.

sudo nano /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Info.plist

change

<key>NSHighResolutionCapable</key>          <true/>

to

<key>NSHighResolutionCapable</key>          <false/>
2 Likes

VBox 7.0 on a Windows 7 laptop (2011 year) runs Haiku 32 bit very good.

A shot in the dark here but… as mentioned, Haiku on VBox works really OK even on my Phenom II X4 on Win10… EXCEPT… when using the “Power Saver” power-plan. In that case, booting up the VM IS slow, and the GUI redraws gets slower.

But switching to “Balanced” makes it snappy again.

I switch between them as needed to save some watts. :slight_smile:

Maybe this could be what’s causing (or worsening) the slowdowns for other people?

So I tried the advice from @Lrrr and played with the number of cores, it didn’t make any difference. I tried the advice from @Diver and set the NSHighResolutionCapable XML key inside /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Info.plist to false.

terminal-plist

Then I went back to try to start the Haiku VM. That gave me a signal 9 error when I tried to start Haiku, which was really strange…

So I then tried to start other VMs and found the error didn’t just happen to only the Haiku VM, but affected all machines, which all ended in this:

virtualbox-error

Far as I could tell on looking at the details, the reason is that somehow editing that file tripped something with the VirtualBox app far as I can tell with an ‘invalid signature’ in the app now (freaking security on macOS 12.6) :angry: Putting the ‘corrupt’ VirtualBox.app in the trash and reinstalling 7.0.4 fixed the problem. But now Haiku is the way it was again…

So I decided to switch to UTM, which appears to be the future of virtualization on macOS anyways, and set up a test build of R1/beta4 inside it:

And it works! It booted to 1920x1080 mode in EFI mode, but man, the graphics were a lot smoother than VirtualBox! No more lags or tears in app windows!

And if I have it boot in a safe graphics mode, I get a nice windowed view of Haiku

So the end of this adventure is switch to another open source app, UTM, it works a lot better with Haiku!

2 Likes

I wonder if reverting changes to plist file could fix VirtualBox without reinstalling. Was there anything else in the logs apart from invalid signature message?

UPD: So apparently you’re not allowed to edit files inside singed packages. This worked for me because I had System Integrity Protection disabled.

1 Like

It might be the future or rather a solid alternative to VirtualBox or VMWare if supported.
I’m just trying to find the latest version of UTM which works in OSX 10.15.7 (Catalina) and found this on GitHub “Frontend designed from scratch for macOS 11 and iOS 11+ using the latest and greatest APIs”

Stuck between a rock and a hard place.

1 Like