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.