AQEMU-QEMU: Virtualizing on Haiku as host

Good day,

With the tip provided by @muffin, Manjaro LXQt can run on the VM with network access, though pings seem not to work properly… :scream: :

Other than pings, the updates work… so good thing there. Now I just must figure out how to get QEMU to scale the guest window properly… mmmm…


Why not just edit /etc/resolv.conf to have just one line:


(or whatever your router IP address is)?

This should work everywhere, though you may want to disable network mangler. Sorry, I mean network manager.

It sounds like the qemu host is not answering DHCP requests like it should, hence the static ip and dns config.
on a partially related note: editing resolv.conf is pretty much deprecated on most linuxes, Not really good advice to disable system components and then edit config files only some specific software uses.

The resolve.conf will be automatically overwritten from system, if you choose one time dhcp.
This ping is not working properly, which was confusing me. I first tried to ping to check the connection but then I noticed that all was fine but the ping. :rofl:
For a use in qemu I advice Puppylinux as a guest. It boots directly into RAM, so you get the possibly fastest OS while having no KVM in Haiku. Alpine Linux is also very fast and provides a hardened kernel as a security feature.

If you want really small linux there is now prebuild toybox linux builds for use in qemu.
toybox is similar to busybox but BSD0 (like bsd license but no attibution required)

3.3mb was quite fun to play with for me, though not that practically usefull. (It’s only a cli basically, but really awesome that it exists)

That’s why you need to disable network manager, to stop it overwriting resolv.conf. The simple way is to disable it and use /etc/network/interfaces and /etc/resolv.conf instead. Of course there are a lot of strange linuxen out there now that may have decided to do it a different way, but it’s the conventional method.

Here is a screenshot from Fossapub (Puppylinux) with Palemoon browser and dark mode. While starting Palemoon you have to be patient, but then browsing the web is possible, even when it is slower than normally.
For reading some news it is okay so far.
I like it to switch between the virtual desktops in Haiku. On one screen Aqemu runs with Fossapub and Palemoon maximized to read news, on another screen Web+ or Mail and so on. Switching with Alt+Fx makes it really easy and comfortable. Even having the qemu guest in Fullscreen the Alt+Fx key works to switch to another desktop. Really good!


Again, this is a really bad idea, moat of the OS doesn’t use resolv.conf, it’s really just there for specific applications using libc functions directly. It breaks local resolution of hostnames, DNSSEC, dns precedence. etc.
You don’t need to use nm either, but then it’s better to pick a distro that doesn’t need it, or just a different OS, not one that expects that it is always enabled and will break if it isn’t. :)

The default networking in qemu has support for basic networking only, things like ping do not work in “user” mode networking, so don’t bother with static ip’s or config files, the only way to get a full blown networking where everything works is to use “nat” mode, the qemu doc has detailed info on how to do use “nat”, but only for linux as a host, that said, i don’t think haiku has any support for “nat” networking, but i could be wrong?, so just use the default “user” mode and pick an NIC that will with all your vm’s, type:

qemu-system-i386 -nic model=help

to get a list of supported NIC’s in qemu.

Qemu works basically fine in Haiku. For me there is no need to go deeper into the network settings with NAT.
It is enough to get a guest running and connecting with the network. I will install Haiku nightly images in qemu and other guests like Puppylinux just for playing around and browsing the web.
I have enough to do with learning more about Haiku. My next point on my agenda is to learn more about the Haiku filesystem. :smiley:

You are talking about retrieving DNS from a local router: DNSSEC is not a concern. Sure there are other ways to configure DNS, I’m just offering an easy solution that is compatible with most *nix and their applications, there’s no need to label it a “really bad idea”. It’s also still the standard for example in Debian, slackware, freebsd and openbsd to name a few examples off of the top of my head.

You are missing the point, for one the severall OS you mentioned are completely distinct, they do share some similarities but copying advice 1:1 will mostly not work.

resolv.conf simply /isnt/ compatible with most applications on desktop Linux and hasen’t been for years, disabling system components that are vital for the dns resolution to work properly and instead using a file that is basically only left for backwards compat for some specific applications is what I called a really bad idea.

My advice was about linux, it doesn’t apply to the BSDs anymore than advice for Haiku applies to MacOS.
Apart from common ideas desktop linux diverges heavily from mechanisms and tools *nix usually uses for this sort of stuff, ifconfig is mostly dead there for instance (and never was able to e.g join wifi networks like it can on FreeBSD), and most of the configuration and resolution goes over d-bus.

I suspect that it’s already on nat networking, since muffins static ip starts with 10.* .Ideally the case where everything just works™ is to use ipv6 networking and give the VM it’s own distinct address, but that’s not quite working on haiku. I am a bit lost why icmp wouldn’t work, but tcp would, seems more like a bug to me honestly.

1 Like

In the case of /etc/resolv.conf syntax the example I gave will work on all of them. I’m not aware of any different syntax for /etc/resolv.conf?

That is untrue. You can show this either by trying it on almost any Linux box, or you can read the documentation or source code if you care to check the intended behaviour of the relevant services.

For example, I assume you’re talking about systemd based Linux systems, since the vast majority of Linux distributions use systemd these days. systemd uses the systemd-resolved service for DNS, and it fully supports using /etc/resolv.conf for DNS configuration. It simply checks whether /etc/resolv.conf is a symlink or a real file, and in the latter case it follows whatever configuration is specified there. It integrates with dbus and whatever else you want. To quote the manual:

"To improve compatibility, /etc/resolv.conf is read in order to discover configured system DNS servers, but only if it is not a symlink to /run/systemd/resolve/stub-resolv.conf , /usr/lib/systemd/resolv.conf or /run/systemd/resolve/resolv.conf"

If you’re interested to look further, here is the relevant part of the systemd-resolved source code.

I note that on the ubuntu 20.04 machine I am writing from, /etc/resolv.conf is not a symlink.

1 Like

AQEMU 0.9.2 has issues with qemu 3.x, that’s why VMs fail to start with Invalid parameter 'vlan' no matter what you do in network GUI section. There’s a 0.9.6 that fixed this, but as it’s a dev-release it is not on HaikuDepot.

For me this works everytime:

  • Enable network in the GUI, but don’t add any card
  • Put this on General > Advanced Options:

-net nic,macaddr=52:54:00:97:xx:xx,model=pcnet (MACaddr to taste, and I like PCnet cards :smile:)
-net user,hostname=vm_hostname

  • Guest OS now grabs DHCP consistently, no need for manual IP except…
  • Configure DNS manually as per @muffin 's tip
  • Done!


For those interested: SliTaz is another small, tight and REALLY fast Linux distro, that also boots to RAM by default (at least the live ISO).


Did some looking into bumping aqemu, so far the app has already been build, haven’t checked if it actually fixes things on our side :slight_smile:

EDIT well, having it build didn’t mean it’s working :wink: seems it’s not finding the i386 binary to be able to run on 32bit, was worth a try :wink:

1 Like

I had the exact same problem under linux, that means it’s an Aqemu bug, not a haiku specific one.


Added the work I did so far (based on previous recipe) at:
It’s a WIP and won’t create a PR for it atm, needs finetuning in the patchset at least (credits where credits are due …) :slight_smile:

1 Like

Good day,

Mac OS X PPC 10.2:


Need to install the QEMU PPC 32 package from HaikuDepot, then can create the VM setting the architecture to Power PC 32 bit, setting RAM and HD, and single core, of course, only one CPU.
I have 2 ISOs, so first boot with the iso 1 which is the install CD, then change the Media CD iso file to iso file 2, which is the “additional” software. So after booting with ISO1 and installing, shutdown the VM, replace ISO 1 with ISO2 in the VM Media settings for CD, boot the VM and install the additional software.
Have to go through all the PITA of address, phone… setup.

adding the following Custom QEMU arguments:

-M mac99,via=pmu
-device usb-kbd
-device usb-mouse
-net nic,macaddr=52:54:00:97:12:23,model=pcnet
-net user,hostname=vm_hostname
-cpu g4

With the network setup provided by victroniko, no network available.
With my original setup, no network available

Actually, Network preferences can’t be modified so far. It’s a tad slow though.



Good day,


This is Firefox running on Haiku… not quite :wink:

Actually it’s a Kiosk linux distro, PorteusKiosk, that only runs Firefox (or Chrome), which in turns, should behave faster than a linux distro with firefox installed?
Of course, it’s not fast, pages don’t load fast, youtube does not load fast, videos don’t play fast…
At least can use Firefox on Haiku like this (needs more testing and VM improvement). A Kiosk mode linux distro might be useful just to run Firefox/Chrome?

The setup for this VM:

-net nic,macaddr=52:54:00:97:12:22,model=e1000
-net user,hostname=porteuskiosk
-smp 4

And in the network setup of PorteusKiosk, have to set the network manually as per @muffin’s tip in order for PorteusKiosk to gain network access.

Might be a better kiosk distro out there… I’ll keep searching.



Web+ can run youtube videos without problems, we have to wait for the Beta 3 for this…

1 Like