Haiku Under Emulation

Article contributed by kvdman on Thu, 2008-10-23 17:06

Computer emulation is a very handy tool, not only for users, but also for developers. Obviously running Haiku under native hardware is preferred (due to better performance), but this is not always an option. Manufacturers are often reluctant to release hardware specifications towards developers, and they are therefore often left to the difficult task of writing hardware drivers from scratch - it is a plague and barrier for smaller operating systems. Since Haiku can not possibly support all the hardware available, the release of Haiku disk images that are compatible with leading industry emulators is a logical choice. Also, users may not be confident in natively installing pre-alpha software onto their computers, leaving emulators as a 'safe' and attractive option to test out Haiku.

Emulators attach to your hardware and usually emulate more common hardware on top. Because the hardware is now the same, and is fixed and consistent, development under emulation can also be consistent - bugs can be easily replicated as well, eliminating suspect hardware. A couple of Haiku developers develop under emulators occasionally and realize their importance towards the development of Haiku. 

Haiku runs very well under several of the major emulators such as Vmware, Virtual Box, and Qemu (has also been shown to run under Parallels and Virtual PC). Most emulators are cross-platform, and can be downloaded from the following locations:

Of all the emulation options, Vmware, Virtual Box, and Qemu are well supported without the need for format conversion or tinkering (should work 'out of the box'). Haiku under Vmware is the fastest emulation option (on a subjective basis), and has driver support for networking, audio, and video. Virtual Box has Vmware disk compatibility yet the audio isn't yet supported.

Haiku under Vmware
Haiku under Vmware 
under Virtual Box
Haiku under Virtual Box
under Q (Qemu)
Haiku under Q (Qemu)

Where Can Haiku Disk Images be Downloaded?

Haiku's disk images are usually built on a daily basis, and can be downloaded here:

  • Raw (Qemu compatible)
  • Vmware (Virtual Box compatible)

Using the Disk Images

To use Haiku under Vmware, simply unzip the archive and execute the included *.vmx file. To use the disk image under Virtual Box, you will first have to create a virtual machine and add the Vmware disk image manually. For Qemu, rename the raw disk image to: haiku.img and manually configure a virtual machine using that disk image.

Tip: in order to get networking running under Haiku in Virtual Box, under your virtual machine's networking preferences, change the adapter type to 'Intel Pro/1000 MT (82540OEM), and change to 'NAT' under attached to.

Increasing Disk Image Space - Creating and Formatting Disks

The disk images provided come as 250 mb fixed disk images. The disk image's size can't be increased, but one can easily create a new disk with an increased capacity. Under the emulators GUI and virtual machine's settings, you should find an option to add another hard disk. Choose which type of disk you would like to create; there are two options:

  • Fixed disk: This means the disk's space will be pre-allocated; i.e if you choose to create a 10 gb fixed disk, the disk image will occupy 10 gb of data on your hard drive.
  • Expanding disk: If you choose to create a 10 gb disk image, the disk will appear as it's 10 gb under Haiku, but will only actually be as big as the space that's used within Haiku (it grows).

Once you've created the disk image to a size of your choice, add the secondary disk to your virtual machine and boot Haiku. The disk won't show up until you have formatted it. Navigate to Haiku's 'DriveSetup' application - the disk should be shown (See a 1gb disk added in the screenshot below).

Initializing the partition as BFS in DriveSetup.Initializing the partition as BFS in DriveSetup.

Select the disk, and then select 'Partition>Initialize>Be File System'. Select the default variables, and accept the alert messages. Return to the menu and select 'Partition>Mount - another Haiku disk should now be on your desktop (without the leaf logo). Now simply open a tracker window on the boot disk, and a tracker window on your newly created disk and copy the contents over (over-writing the home folder on the new disk).

One final step. Navigate to the 'Terminal' application. Type in 'df' to see the disk space size & usage on each disk. After selecting the correct disk (probably /Haiku1). type in 'makebootable Haiku1'. You can now shutdown the Haiku virtual machine, remove the primary disk image (the Haiku disk image you downloaded) in your virtual machine's preferences, and make sure that the new disk you created is your primary disk now.

Tip: In order to skip a couple steps, you can download pre-built bootable disk images here.

Transferring Files Between Your Host Computer and Haiku Virtual Machine:

There are several ways you can transfer files between the host and guest machines on your computer. Since there is no 'Vmware tools installer' for Haiku, file-sharing between the host and guest isn't built-in, and there's no clipboard sharing. Here are a couple of ways you could share files.

  • Transfer files using a disk image: create a disk image with the files you'd like to transfer from your PC to Haiku. In Windows use a utility like Burn At Once, in OS X you could use the the hard drisk utility to make an ISO i.e create a folder called 'test' on your desktop, put the files you want into that folder and execute the command: 'hdiutil makehybrid -o /Users/myusername/Desktop/test.iso /Users/myusername/Desktop/test   -iso -joliet' (replacing myusername with your username).  Attach the resultant ISO images in place of your optical disk in your virtual machine preferences. 
  • Transfer files over the internet: upload files to an online server you have, and then download them internally through Haiku. Note, Haiku doesn't yet have a web browser included, however, you can use wget.
  •  Transfer files between the host and machine: First you'll need to setup and FTP server on your host machine. OS X users can easily do this under their sharing preferences tab. As suggested, you can use wget to download files from your host machine. You could use wput to upload files to your host machine, alternatively, you could use a grahphical client like NetPenguin.

How to install BeOS under VMWare

Article contributed by admin on Mon, 2006-08-14 15:06

As I still love the BeOS and I can't install it on new hardware, I tried to install it under VMware. I found many people who said it was working but no one's written an article about how to do it! It seems trivial to do it, but in fact it isn't. Or, at least, it is not so trivial for the average user...

So I've done it. I installed the BeOS, it runs — not perfectly, and it's slow, but it runs! And I will explain you here each step I followed.

I. What you'll need

  • First you'll need a copy of VMware (I used VMware Workstation 5.5)
  • A software to mount an ISO to a virtual CDROM (I used Alcohol 120%), or you can use a real CD
  • BeOS (I used BeOS DevEd 2.2, it's an ISO file and I didn't want to burn it)
  • Another OS distro that can run in VMware (I used the free Mandriva Linux distro). I'll explain why later...

II. Creating the VM

First, install or run VMware, then create your VM as a normal VM, set everything you want or need. Create a virtual disk. I created a fixed size disk for performance reasons and also because I thought it could create problems leaving it dynamic, so I didn't try with a dynamic disk.

III. The first problem

The main and first problem I encountered is that the DriveSetup utility from BeOS is not able to partition correctly the virtual disk I created. So here is why I used another OS: to create the main partition on the disk.

I installed Mandriva on a virtual disk and I connected another virtual disk to it. Then I used my Mandriva installation to create a FAT32 partition and format it. Now I don't think I forced to create a VM to do it, so I guess I could use a LiveCD from any Linux distro, but I'd like to give Mandriva a try and also test/compare its performances in a virtual machine compared to BeOS. (And if you ask me, I can tell you that BeOS is really slow!)

Once I got my new virtual disk formatted, I created a new VM using that disk. I booted the BeOS DevEd and installed it without any problems. The problems came later...

IV. Now it's working...almost...

Writing this little explanation, I'm seeing that I haven't done anything extraordinary, and this can be done in few hours. So why did I need to spend my weekend to do it?

Well, in fact, I encountered a lot more problems.

First I tried with a ZETA distro which wasn't working correctly. I had a bug with the input server that I needed to restart every ten seconds because it locked my mouse cursor in the upper-left corner! It installed, but it crashed a lot of times. Whenever I tried to launch the networking panel it sent me to KDL!

So I moved to DevEd, which is a lot more stable. But I still have problems:

  • Sometimes, I still have the mouse cursor problem (but less often)
  • There is no driver for the network card (an AMD PCnet-PCI II compatible)
  • Each time I boot, I have to specify in the boot menu to use a standard VGA resolution, otherwise the app_server won't start
  • The sound card works but the sound is choppy. But I have not checked if there is a new driver for the Creative Labs Sound Blaster AudioPCI. I guess it's not a problem from VMware because it works well with Mandriva. (Argh, it hurts to say that!)

V. Conclusion

It works. There is still room for improvement, but it works. It was not really hard to do it, but there is a big lack of hardware support.

I saw that the X server has a driver for the VMware graphics card. I think we could do the same, and improving hardware support for emulators like VMware could be a great thing to attract developers. I managed to install BeOS this way because I don't have my old P3 machine to play with. I only own a new PC and any new PC cannot have BeOS installed on it because of its lack of drivers. [Editor's note: Maybe not always...but my brand new low-end eMachines box runs BeOS Max...]

But be warned, installing the BeOS this way is a great thing if you do not have compatible hardware and still want to use it. But it's not for demonstrating to your friends, because it's SLOW, it's way too slow!

Syndicate content