- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
Virtualize a Physical Haiku Partition With Virtualbox
In some situations, for example when we are using linux, can be extremely annoying to reboot into Haiku every time we need something (for example when we have a ppp connection).
I've written this article and i decided to post it here, in the hope that will help users and developers to have the life a bit simple.
There's a fast method to boot a physical Haiku partition using VirtualBox, it require only a few commands.
My commands refers to linux, anyway the operation is possibile under Windows (and presumably all supported platforms), changing the disk path. Remember also that you don't have to set permissions under Windows.
- Open Terminal and log in as root (or use sudo before every command) using "su"
- Type fdisk -l and choose the target device (for example /dev/sda)
Add to your own user the needed permissions :
usermod -a -G disk,vboxusers username
Then create the vdmk file using this command :
VBoxManage internalcommands createrawvmdk -filename file.vdmk -rawdisk /dev/sda
Where file.vdmk is the file that will be used to set up the virtual machine and /dev/sda your device, it can be an hard disk, usb drive and any other mass storage device.
If our command worked as well, we'll have a new file for example "file.vdmk".
Now you should set the file permissions, type into terminal :
chmod 777 file.vdmk
At the end open VirtualBox, create a new virtual machine and set the file as master storage.
If you have a bootloader, you will choose the operating system as when you boot the device, in the case you need a bootloader you can use an Haiku's livecd adding it in VirtualBox and pressing shift or space to boot from another partition before the bootscreen.
This method is also useful when you have a BFS disk with a lot of files and you want to transfer it to your physical partition.
Note : the created file can be used as well with VMWare.
It's available an italian version of the tutorial at this link.
Enjoy!
- Barrett's blog
- Login or register to post comments

Comments
Re: Virtualize a Physical Haiku Partition With Virtualbox
This can be done from windows as well
http://www.sysprobs.com/access-physical-disk-virtualbox-desktop-virtuali...
I mapped my physical drive into Vbox to install Gentoo on my Fujitsu p1200 laptop (took about 2 days as it is going through 2 layers of visualization Transmeta and Vbox)
Were I to do that again I might try colinux instead of Vbox lol :-)
Re: Virtualize a Physical Haiku Partition With Virtualbox
This works, but the performance hit is staggering. Not for regular use, perhaps, unless you are running an 8-core watercooled monster.
Re: Virtualize a Physical Haiku Partition With Virtualbox
I've not tried yet and i'm not sure, but i think using a gcc4 build with the virtualbox guest additions the performances can be increased.
Re: Virtualize a Physical Haiku Partition With Virtualbox
There shouldn't be very little performance hit on newer processors ... as in anything Intel or AMD for the past 3-4 years. I doubt the direct disk acess causes any hit... as it works fine with qemu as well ...
qemu -hda /dev/sda ... works just fine
Re: Virtualize a Physical Haiku Partition With Virtualbox
"There shouldn't be very little performance hit on newer processors ... as in anything Intel or AMD for the past 3-4 years."
core2Duo, 2Ghz. 1 GB Ram available. Runs like a snail through treacle.
installoptionalpackages takes half an hour to complete. That's not installing anything, just clearing the cache and fetching new data. And no, wgetting the new information is very quick. It's the constant shelling out to awk and sed that delays it.
GUI apps load, but you can get up and make a cup of coffee while WebPositive loads up.
Not usable. Not even close. But it does create possibilities for getting onto the wifi for which Haiku has no driver ...
Re: Virtualize a Physical Haiku Partition With Virtualbox
Something very wrong there... some kind of configuration issue I suspect.
I've run haiku in a virtual machine years ago on far worse hardware with better results.