Mostly-Successful VirtualBox Settings

I found that the March 26th Haiku Pre-Alpha worked on the first try in VirtualBox. On the Haiku development list, Niels Reedijk asked me to post details about my configuration. Maybe I just got lucky by stumbling on the right settings.

First you need to make a VirtualBox compatible disk image. To do that, download one of the raw Haiku images and unzip it.

I used the pre-Alpha r29739 build from March 26th.

Now convert is from the raw format to the VirtualBox VDI format:

$ VBoxManage convertfromraw -format VDI haiku-alpha.image haiku-alpha.vdi

A raw image is a physical copy of an entire disk drive, basically what you’d get if you used the dd command with “bs=512” and copied the entire disk device into a regular file.

I don’t know all the details, but basically a VDI also adds some metadata as well as some compression by not having to store sectors that are all zeroes. The VDI images will grow in size as these zero sectors get non-zero data written into them.

Next add your VDI file to the Virtual Media Manager, then create a new virtual machine and attach your VDI file to it.

Here are all of my settings - I didn’t see a network interface at all with the PCfast NIC, but with the Intel PRO/1000 MT Desktop the net came right up, configured by DHCP and all, so right away I was able to use the web browser, ssh and cvs.

I’m running Fedora 10 Linux on a Core Quad Xeon - x86_64. I’m not able to get sound working, but otherwise everything else is working really well.

Maybe my particular settings just happened to get lucky…

VirtualBox 2.1.4 - the official Sun version, not the Open Source version.

Base Memory: 268 MB
Video Memory: 32 MB
ACPI: Enabled
IO APIC: Enabled

I think the APIC may be important because it distributes interrupts evenly among multiple CPU cores, and is used on just about all modern PCs as far as I know.

VT-x/AMD-V: Enabled

The VT-x/AMD-V is probably important - that’s hardware support for virtualizing guest OSes that don’t have explicit support for virtualization. That is, if you have hardware virtualization, you should be able to run any PC operating system.

Only certain models of CPUs have the hardware virtualization support - just recent ones, and even then just higher-end models. I thought that all of Intel’s latest chips had VT-x but they don’t; you have to check the specs on Intel’s website, and similarly for AMD’s chips.

VirtualBox can run an OS without hardware virtualization; I’m not real clear what the difference is in the case of VirtualBox - maybe it just runs slower, or not as well.

Windows 2000 runs just fine on my Core Duo MacBook Pro - that’s the first-generation Core Duo, not the Core 2 Duo; it doesn’t have VT-x.

Xen, by contrast, can’t run an OS like Windows at all unless the CPU has hardware virtualization; without it, the guest OS kernel has to be extensively patched - or “paravirtualized” - to enable Xen support.

Nested Paging: Disabled
PAE/NX: Disabled
IDE Controller Type: PIIX4
3D Accelleration: Enabled

(GLTeapot gets hundreds of frames per second!)

Network: Intel Pro/1000 MT Desktop (NAT)

USB: Disabled

I can’t get sound to work at all though, and with certain VirtualBox Audio settings, I get a repeatible crash when I restart the media server.

I hope that helps.

Mike

Umm, VB supports VMDK now, so it doesn’t need to be converted, and the one from the Ubuntu repo’s works fine out of the box settings wise.

Pretty much the same settings I use, however I don’t see what possible use it is to enable 3d acceleration since the virtual graphics card only supports vesa/vga. In order to use 3d acceleration on the ‘supported’ operating systems you need to install the guest additions (which I assume contains some specially crafted virtual graphics card aswell as doing some patching in the system). However, some day we might have official guest addon support for Haiku!

Hello,

I use the VMware Images with no problem.



My Settings:

General:
Base Memory: 1024 MB
Video Memory: 128 MB
ACPI: Enabled
IO APCI: Enabled
VT-x/AMD-V: Enabled (Prozessor = AMD Phenom X4 9550)
Nested Paging: Enabled
PAE/NX: Enabled
3D Acceleration: Enabled (Yes there is no 3D Acceleration in Haiku, but it sounds good :slight_smile: )

Hard Disks:
Use the IDE- Controller, VirtualBox SATA (AHCI) does not work.

USB:
Does not work under VirtualBox.



And a good thing in in the VirtualBox is:
You can configure direct access to a physical harddrive (Look in the VirtualBox manual at point 9.10).
Now you can use the Haiku- Installer to install Haiku to a physical HDD from the VMware Image, and now you can boot Haiku from this hdd under your real Hardware

Example:
The Syntax to make under Windows a vmdk file named EXT100GB.vmdk located under C:\ which is needed to access the physical hdd under VirtualBox directly for the PhysicalDrive1 is:
VBoxManage internalcommands createrawvmdk -filename C:\EXT100GB.vmdk -rawdisk \.\PhysicalDrive1

[quote=Xbertl]And a good thing in in the VirtualBox is:
You can configure direct access to a physical harddrive (Look in the VirtualBox manual at point 9.10).
Now you can use the Haiku- Installer to install Haiku to a physical HDD from the VMware Image, and now you can boot Haiku from this hdd under your real Hardware[/quote]

FWIW, you can do the same thing with VMWare (and USB-passthru even does work there IIRC).