Run a custom Chromium OS build in Virtualbox

The developer documentation for the Chromium projects appears pretty detailed and the quick start guide is straight forward. Getting a first build didn’t took long – besides the build time of about 2 hours (X2 6000+, 4 GB RAM). To run the build I wanted to use a virtual machine as this allows to easily try out modifications.

Create an image for Virtualbox

The hard way

The build environment comes along with a script that converts a native image to images for Qemu, Virtualbox or VMware. But invoking the script with --format=virtualbox terminated with an error telling that the command VBoxManage couldn’t be found.

This is because the chroot of the build environment has no Virtualbox installed. This post suggests a way to install Virtualbox there. The same post also tells that the failed conversion could simply be done outside the chroot, so I chose that solution.

The image to pass as input parameter to VBoxManage can be found under src/build/images/x86-generic/latest/vm_temp_image.bin relative to the checkout directory. With this invoke
VBoxManage convertfromraw /path/to/input_image.bin /path/to/vbox_image.vdi

The simple way

As I found out later, Virtualbox also supports the VMDK format from VMware. So instead of the steps above you can simply call the script with --format=vmware and use the resulting image. Whether there is a drawback in terms of performance or whatsoever I don’t know. Please drop a comment if you know something about this.

Get the image running

Not really surprising, Chromium OS can only be set up if there is a working Internet connection available (and if you have a Google account to login with). In my case the network connection for the virtual machine didn’t work right away. The machine didn’t recognize it.

What helped was to change the adapter type for the virtual network interface to Intel PRO/1000 MT Desktop in the network settings for the VM. I also heard and read of troubles with NAT networking. I didn’t encounter any so far, but switching to bridged networking is said to help in this case.

Comments (8)

Ka FungDezember 3rd, 2012 at 01:24

Thanks for the advice with adapter type for VirtualBox. It worked for me.

Stephane GregoireJanuar 15th, 2013 at 21:12

Thanks for the Intel PRO/1000 MT tip…

If you’re using Vmware 32 bit, you need to change the NIC type of eth0 to the intel one.

Add this line to the VMX :
ethernet0.virtualDev = „e1000“

Dhrubo AlokMai 9th, 2014 at 17:22

I have tried it and converted the .img file. But when I try to boot it in virtualbox, the vbox screen goes black and then nothing happens. How can I fix it?

mosabMai 12th, 2015 at 12:23

Thanks

ismael haiderJuni 28th, 2015 at 21:29

Thanks for the advice

SteveJuli 24th, 2015 at 19:49

Jonas I’m stuck on the last bit.. the latest image_to_vm.sh script doesn’t have a –format=vmware switch option. What am I missing?

SteveJuli 24th, 2015 at 19:58

that was a typo btw.. –format=vmware still doesn’t work though.. unrecognized param and even the google dev docs mention it.. help?

jonasJuli 30th, 2015 at 22:31

Steve, you don’t need to do that. As mentioned in the post, –format=vmware works too.

Leave a comment

Your comment

(required)