Virtualizing Haiku on a slow machine

WARNING: Virtualizing Haiku on old Intel CPUs is really slow (a lot slower than on their AMD equivalents), as it was reported on Reddit (Source). This post is written mainly for slow AMD CPUs, not for slow Intel ones. Sorry!
Thanks to victroniko for reporting this


VirtualBox should be more than enough for any of your virtualizing needs on a relatively slow machine. At least it worked on mine (see My PC specs below).
I did a little 3-step followup-guide for the main, official one.

  1. Follow the Virtualizing Haiku in VirtualBox guide
  2. When in already installed Haiku, open the “VirtualMemory” in “Deskbar → Preferences”
  3. Uncheck the “Automatic swap management” option and do a swapfile sized like your VM’s RAM or even double it

The steps 2 and 3 should prevent your Haiku from freezing when doing some bigger actions than staring at your desktop. At least it prevented that in my case, which you can check below and compare to yours.

Original post

Hello.

I wanted to begin my C++ development path on Haiku, starting with writing easy patches to the apps and some external programs for it (gladly there’s a tutorial for this). But there’s an issue: my PC is slow. And virtualization of graphic interfaces is commonly a hard operation for CPU/GPU.

I tested my PC with virtualizing minimal Debian on QEMU, and it seems to work pretty fine. However, it only had console, no xorg or anything.

Is there any recommended way of doing Haiku VM on relatively slow machine? Or, if there’s no official way, can you give some recommendations and advice? Maybe some QEMU settings you run Haiku on? Maybe I even shouldn’t use QEMU and there’s something more lightweight? Thanks in advance.


My PC specs:

  • Xubuntu running on 250gb SSD
  • 4gb RAM (+8gb SWAP)
  • CPU is AMD Athlon II X4 640 (4) @ 3.00
  • GPU is Micro-Star MSI N210 Geforce (NVIDIA GeForce 210)
  • other specs will be added if needed

My Haiku VM config:

  • Base Memory is 1536mb
  • Video Memory is 48mb
  • VDI max size is 4gb (more than enough)
  • SWAP is 1gb (just random choice)
  • everything else is default or described in the official guide, see above

I was using an Athlon II X2 @ 2.9 GHz till a few months back, now I have a Phenom II X4 @ 2.8 GHz.

I use Haiku everyday on that machine, either on bare-metal or (the same Haiku installs) via VirtualBox from Windows or Xubuntu (giving the VMs 4 cores and 2 GB or RAM).

Maybe I’m just used to slow machines, but for me… it’s more than usable (with the exception of doing I/O on thousands of small files… the slow HDD certainly doesn’t helps :smiley: ).

Other people here regularly say QEMU/KVM runs even better, so you should not have much problems running Haiku on your machine.

Hopefully someone else will share here what configs/command-line args the use with QEMU, But don’t be afraid to just give it a try, it might be just ran better than you expect :smiley:

1 Like

Seems like our CPUs are somewhat similar! Nice to hear that it works fine even with VirtualBox. Thank you, I’ll try it out (VirtualBox or QEMU) today and reply in this thread if it works or not :slight_smile:

1 Like

QEMU didn’t work for me at all (libvirtd didn’t load, not by systemctl and not even manually), but VirtualBox did. Not without additional configuration, of course.

So, my final (I hope) advice for any strangers stumbling upon this topic is:

  1. Follow the Virtualizing Haiku in VirtualBox guide
  2. When in already installed Haiku, open the “VirtualMemory” in “Deskbar → Preferences”
  3. Uncheck the “Automatic swap management” option and do a swapfile sized like your VM’s RAM or even double.

The options 2 and 3 should prevent your Haiku from freezing when doing some actions bigger than just staring at your desktop. I think these steps should be included in the guide as Additionals (or at least Troubleshooting)

I ran into a related quirk virtualizing Haiku in my former Windows 10 system (Xeon E5440 with VT-x support), VBox ran slow as molasses. Digging through the net I found it plays nice only with 5th-gen Intel CPUs onwards, and sure enough, every “older” system I tried had the same behavior.

Whereas on AMD, anything since K10 (even the lowly Semprons!) virtualized like a champ in W10+VBox :woozy_face: with near native speeds.

(Source)

I’ll leave this here for anyone interested.

Makes perfect sense considering that both me and BiPolar use AMD processors. Will add this to the main post, thanks for info! :slight_smile:

*WARNING: Virtualizing Haiku on Intel CPUs is really slow, as it was reported on Reddit (Source ), this post is written mainly for slow AMD CPUs, not Intel ones. Sorry!

Umm, I think this edit is a bit strong? It’s only on 4th-gen Intel silicon and older, newer ones don’t have that problem.

But I agree on old AMD CPUs behaving way better as host, than Intel equivalents of the era.

Well, it seems to depend on which VM software is used, also. Same as there was some problem with recent version of virtualbox where the older version would work ok.

Have people tried with hyper-v and vmware on those Intel cpus ?

I haven’t noticed slowdowns on my 3rd gen i7 using VMWare Workstation under Manjaro Linux. Both the host and guest OS were 64-bit.

Again, I’m talking about OLD CPUs, SLOW machines. SLOW Intel processors. 3rd gen i7 is for sure isn’t SLOW.

I’ll update the main post about this

UPD: done. @victroniko can you check it if the warning is OK now?