How to get Haiku running in VirtualBox?

Forum thread started by rochk on Wed, 2007-01-31 13:07

yeah... i mean windows version of virtualbox. i found some japanese site decribing how to do it - but it referenced to mac os x virtualbox version. it used the tool named vditool to convert raw haiku image to virtualbox image. this tool is not available under windows. anyone knows how to run haiku in virtualbox running on windows? many thanks!

/rochk

Comments

I've the same problem but

I've the same problem but I'm running linux.
I tried to run the two toold suggested on the jap site, but they failed (I should still ask vbox devels about this).

but: what's the iso I need to properly run haiku?

Re: I've the same problem but

Hi,

I have tryed (without success) to run Haiku with VirtualBox (on an Ubuntu 7.04). Each time, I can see the Haiku logo and after maybe 2s I enter the kernel debugland.

Is there a way I can send you debuging informations from thoses attempts ? Has someone succeeded in making Haiku to boot in VirtualBox ?

Re: I've the same problem but

I know nothing about VirtualBox - but it should support some type of serial output to a text file.

You'll want to redirect COM1/Serial1 to a text file, and post that in a bug report once you have it.

Some things you can try to get Haiku to boot would maybe be disabling certain hardware - like the network or sound emulation... sometimes the ne2k driver in Haiku (etherpci) crashes - such as on Parallels.

Re: I've the same problem but

vditool IS available for win32 here: http://www.virtualbox.org/download/testcase/vditool.exe

Put the exe in the virtualbox directory (because it needs some dlls)
Anyway, i couldnt boot Haiku. It crashed.

Re: I've the same problem but

anyway - thanks for your info! some day it will boot for sure... :)

Re: I've the same problem but

I have posted a thread on VirtualBox forum in order to know how to listen on a virtual serial port. I will let you know.

Re: How to get Haiku running in VirtualBox?

As described in VBox documentation, I have set options to connect Haiku virtual machine on a Unix Socket «/tmp/haikuPipe». I used the socat utility to transfer output to a file

socat -x -d -d -d UNIX-LISTEN:/tmp/haikuPipe CREATE:~/Desktop/output

and launched Haiku. I did enter kernel debugging land without a byte sent to my socket :o(

Is there a way to dump something useful from the debugger ?

Re: How to get Haiku running in VirtualBox?

run bt which will return a backtrace (or sc works also)

You can also dump out the threads and teams by using threads and teams

Re: How to get Haiku running in VirtualBox?

Here it is :

PANIC: release_spinlock: attempt to release lock 0x800a6820 with interrupts enabled
 
Welcome to Kernel Debugging Land...
Running on CPU 0
kdebug> bt
stack trace for thread 0x1 "idle thread 1"
    kernel stack: 0x80101000 to 0x80104000
frame              caller     <image>:function  +  offset
80103e1c  (+  52)  8007b6e8   <kernel>:invoke_command  +  0x0074
80103e50  (+  48)  8007b806   <kernel>:kernel_debugger_loop  + 0x00de
80103e80  (+  32)  8007c286   <kernel>:kernel_debugger  +  0x00b2
80103ea0  (+ 192)  8007c1c9   <kernel>:panic  +  0x0029
80103f60  (+  48)  8002ff3f   <kernel>:release_spinlock  +  0x0067
80103f90  (+  64)  8002d2e9   <kernel>:scheduler_start  +  0x002d
80103fd0  (+  32)  80029211   <kernel>:_start  +  0x0409
kdebug>_

Re: How to get Haiku running in VirtualBox?

You will probably want to capture the ENTIRE log and create a Trac ticket explaining the problem.

http://dev.haiku-os.org

Then one of the developers will likely see it and try to identify what causes it.

Also remember to specify what revision of Haiku you're using.

Re: How to get Haiku running in VirtualBox?

There is a Trac ticket already opened for this issue:
http://dev.haiku-os.org/ticket/1230

Re: How to get Haiku running in VirtualBox?

i got r22861, the problem still there, anyone do something? and was vbox-1.5.2.

Re: How to get Haiku running in VirtualBox?

How did you manage to get output using socat?

Re: How to get Haiku running in VirtualBox?

To convert a Raw disk image to the VirtualBox VDI format:

VBoxManage convertdd <HAIKURAWIMAGE> <HAIKUIMAGEOUT>.vdi

Easy, and VBoxManage is included with VirtualBox 2+ ;)

Use VBoxManage convertdd

vditool is no more. If you are trying to convert an image use VBoxManage.

VBoxManage convertdd ~/Downloads/haiku-alpha.image ~/haiku.vdi

Re: How to get Haiku running in VirtualBox?

Haiku doesn't (to my understanding) run at all under virtualbox since virtualbox requires a kernel-space component (linux/windows kernel). It is a fork of the qemu emulator. In linux you can easily run Haiku under qemu virtual machine as long as you disable the kernel space component (kqemu) if your distro loads the kqemu module at boot.

qemu -no-kqemu -hda haiku.image

should work. To get networking also: 'qemu -no-kqemu -hda haiku.image -net nic -net user'

qemu crashes the same way when trying to use the kernel space component.
It's a bit slower without kqemu but it works.

qemu has also the advantage that it can boot raw harddrive images and you don't need to convert the downloaded/compiled images to .vdi

Re: How to get Haiku running in VirtualBox?

Haiku has worked just fine in VirtualBox for quite some time for me. In fact, i have been compiling under Cygwin and using VirtualBox to test the images.

But the thing is: You need to enable VT-x/AMD-V emulation. Otherwise it wont boot.

Settings -> General -> Advanced -> tick Enable VT-x/AMD-V

Edit:

Oh, and if your PC doesn't support this you might just be out of luck :(. For now at least, anyway.

Re: How to get Haiku running in VirtualBox?

I just downloaded VirtualBox last night, Haiku was the first OS I tried and it works flawlessly. I did not even need to change any setting or anything like that. All I had to do was use 'VBoxManage convertdd' to change the raw image to '.vdi' image.

I'm running Mac OS X (Leopard) and VirtualBox 2.0.4.

The performance is pretty good too.

Re: How to get Haiku running in VirtualBox?

apprentice wrote:

Haiku doesn't (to my understanding) run at all under virtualbox since virtualbox requires a kernel-space component (linux/windows kernel).

Your understanding is flawed :)

The "kernel component" you are speaking of refers to the host OS, not the guest.

There have been issues with Haiku running in both VBox and kqemu in the past, but this was not because of something missing from Haiku - rather it was due to the design of Haiku causing unpredictable behavior when running in these VMs. I'm pretty certain the VBox issue is resolved (or has been worked around) - not sure about kqemu.

Re: How to get Haiku running in VirtualBox?

Maybe it works on mac or windows, but on linux-2.6.22 with VirtualBox 1.5.6_OSE and an older processor without hardware support for virtualization such as amd athon xp 2100+ it still crashes(This is the latest alpha image) and BTW, I was talking about the host os kernel component (hence linux/windows). The point is, if you cannot run Haiku under VirtualBox, run it under qemu without the kqemu.ko _linux_ kernel module and it works. To check once again I downloaded the latest VirtualBox from my Distro's repos, created a .vdi image from the latest alpha and it crashed. Last time I checked the bug ticket was still open in trac.
I even tried to boot into safe mode with everything disabled that Haiku can disable with no luck.

Last lines that VirtualBox gave from the crash:

0:00:09.586 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:09.590 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:09.592 Guest Log: BIOS: ata0-0: PCHS=260/16/63 translation=none LCHS=260/16/63
00:00:09.593 PIIX3 ATA: Ctl#1: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:09.596 PIIX3 ATA: Ctl#1: finished processing RESET
00:00:09.601 Guest Log: BIOS: Boot from Floppy 0 failed
00:00:09.604 Guest Log: BIOS: CDROM boot failure code : 0003
00:00:09.604 Guest Log: BIOS: Boot from CD-ROM failed
00:00:09.614 Guest Log: BIOS: Booting from Hard Disk...
00:00:09.699 PIT: mode=2 count=0xffff (65535) - 18.20 Hz (ch=0)
00:00:11.116 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=b1def000 w=1024 h=768 bpp=32 cbLine=0x1000
00:00:16.696 PIT: mode=0 count=0xdfb (3579) - 333.38 Hz (ch=0)
00:00:16.696 PIT: mode=0 count=0xa7d (2685) - 444.38 Hz (ch=0)
00:00:16.796 PIT: mode=0 count=0xdfb (3579) - 333.38 Hz (ch=0)
00:00:16.797 PIT: mode=0 count=0xdfb (3579) - 333.38 Hz (ch=0)
00:00:16.871 PIT: mode=0 count=0xdfb (3579) - 333.38 Hz (ch=0)
00:00:16.873 PIT: mode=0 count=0xdfb (3579) - 333.38 Hz (ch=0)
00:00:16.874 PIT: mode=0 count=0xdfb (3579) - 333.38 Hz (ch=0)
00:00:16.874
00:00:16.874 !!Assertion Failed!!
00:00:16.874 Expression: (efl & X86_EFL_IF) || fPatchCode || rawRC == VINF_PATM_PENDING_IRQ_AFTER_IRET || VBOX_FAILURE(rawRC)
00:00:16.874 Location : /home/neverstopdreaming/rpm/BUILD/VirtualBox-1.5.6_OSE/src/VBox/VMM/PATM/VMMAll/PATMAll.cpp(133) void PATMRawLeave(VM*, CPUMCTXCORE*, int)
00:00:16.875 Inconsistent state at 8005b87d rc=VINF_EM_RAW_EXCEPTION_PRIVILEGED

Acknowledged, It can work for someone, but on this hardware/OS VirtualBox with haiku is a no-op. Only VM's that can boot haiku _reliably_ are vmware and qemu (and they are almost quaranteed to work).

Re: How to get Haiku running in VirtualBox?

apprentice wrote:

with VirtualBox 1.5.6_OSE and an older processor without hardware support for virtualization such as amd athon xp 2100+ it still crashes(This is the latest alpha image) and BTW, I was talking about the host os kernel component (hence linux/windows).

Yeah, the lack of virtualization may in fact be the problem in this case.

AFAIK, Haiku never did run properly with VBox from the start unless you enabled the hardware virtualization features. I had never personally tried it (and have yet to do so), but a similar issue was reported with kqemu as well (again, I never personally tried it).

The first time this was reported was here: http://www.virtualbox.org/ticket/56 (note, it's marked as "wontfix")

Since there have been many other people reporting success with Haiku in VirtualBox, I had assumed that something got fixed, but perhaps the original problem is still there.

Re: How to get Haiku running in VirtualBox?

Quote:

on linux-2.6.22 with VirtualBox 1.5.6_OSE and an older processor without hardware support for virtualization such as amd athon xp 2100+ it still crashes

I just tried a similar thing on openSUSE with VirtualBox from the distro's repo, it crashed as well. The problem seems to be with the older version of VirtualBox. After I uninstalled the disto's old version and installed the latest version from virtualbox.org it worked just fine.

I think a lot of distro's have out of date versions. Just download the evaluation version or get the latest OSE version and build from source.

The latest version is 2.0.6, but I'm using 2.0.4 on my Mac and on Linux.

Re: How to get Haiku running in VirtualBox?

Hi Guys,

a tutorial how to run HAIKU in VirtualBox you can find here in german language:

http://www.besly.de/menu/search/archiv/misc/haiku_testen.html#win_vbox

And a weekly updated HAIKU image and a config file for VirtualBox you can find here:

http://www.myhaiku.de/

cheers
chaotic

Re: How to get Haiku running in VirtualBox?

I'm currently running haiku latest build r28846 in VBox and it works great. I am using latest VBox version 2.1.0, with Vt-x enabled (when disabled, Haiku VM stops after splash screen). I'm on Mac OS X Leopard and I didn't even have to convert the image vdi, since VBox supports VMWare images natively. All seems fine after minutes of testing.

edit: For Macbook Pro airport internet, in Network settings, choose Intel PRO 1000 MT Desktop, using Host Interface option and select en1: Airport.

Re: How to get Haiku running in VirtualBox?

If only VirtualBox supported raw hdd images it would be perfect. I tested the 2.x series and haiku ran just fine. I just wish there would be a way to avoid going to console and use vditool to convert raw images to .vdi like a graphical converter or just support for raw images..

Re: How to get Haiku running in VirtualBox?

apprentice wrote:

If only VirtualBox supported raw hdd images it would be perfect. I tested the 2.x series and haiku ran just fine. I just wish there would be a way to avoid going to console and use vditool to convert raw images to .vdi like a graphical converter or just support for raw images..

In that case, why not use the VMware images? I use the .vmdk VMware images in Virtual Box all the time. You just have to download them, its that simple.

Re: How to get Haiku running in VirtualBox?

I tried the VMWare images on VirtualBox 3.0.10 on an OS X host with no VT-X enabled. No go. But I was able to install it off CD iso via VirtualBox just fine.

Cheers!

Re: How to get Haiku running in VirtualBox?

I had no problem loading the VMDK in Virtualbox 3.1.6 on Windows XP. Just add it in the Virtual Disk Manager, create a new VM with "Other/Unknown" as the operating system and set its hard disk to the VMDK.

Re: How to get Haiku running in VirtualBox?

The most recent Windows build of VirtualBox supports the alpha of Haiku with the following caveats:

1. The Guest Additions (naturally) don't work.
2. The AMD PCnet adapter setting won't work, either; however, the Intel PRO1000MT Desktop adapter option works just fine.

I am, in fact, posting this from Haiku alpha 1 installed in the current (3.1.6) Windows build of VirtualBox. (Though installed on Windows 7 Ultimate x64, x32 versions of VirtualBox, including those for Linux, should also work.)

Re: How to get Haiku running in VirtualBox?

skoe wrote:

Haiku has worked just fine in VirtualBox for quite some time for me. In fact, i have been compiling under Cygwin and using VirtualBox to test the images.

But the thing is: You need to enable VT-x/AMD-V emulation. Otherwise it wont boot.

Settings -> General -> Advanced -> tick Enable VT-x/AMD-V

Edit:

Oh, and if your PC doesn't support this you might just be out of luck :(. For now at least, anyway.

Don't tell my Celeron DC E1200 (no VT-x support whatever) that.

I've got Haiku alpha 1 running just fine in the current (3.1.6) Windows version of VB (installed from ISO); in fact, I'm posting this from it.

While there are Celeron DCs that *do* support VT-x (the E3x00 series), my E1200 predates them.

While that is no longer an issue (with either Haiku or even XP Mode in Windows Virtual PC, as Microsoft has killed the VT-x/AMD-V requirement there also), there are other reasons to seriously consider the E3x00 series if you are running E1x00 now.

Re: How to get Haiku running in VirtualBox?

Hi, I am using VirtualBox 3.2.4 r62467 under Windows Vista 32bits, and Haiku R1 Alpha2 ISO.

I configured a VM with 64MB of RAM, 1 processor, no HD, CD/DVD-ROM, 6MB of VRAM, default sound and network card, and no serial ports neither USB ports.
It boots the system from the ISO image, asking me for my language, keyboard layout, and if I want to install it or just test the live CD version.

Because I didn't set up any hard disk, I just wanted to test it, after I pressed "Desktop (Live-CD)", there was some CD activity, and nothing else it showing blue background and the mouse. Finally, the mouse hangs.

Nothing special in the logs of the VirtualBox.

Is there any other with the same problem?

Re: How to get Haiku running in VirtualBox?

Give it more RAM. Just because haiku technically can run in 64MB RAM doesn't mean it will like it. 128MB should be enough. I personally run it in a VBox image with 1024MB RAM.

If that doesn't work, try using VT-X if your processor has it.