I am trying to get a working virtual machine in Genode with the recipe vbox4_ubuntu_16_04_64.run but I am unsure where the virtual disk image file (.vdi) should reside so that the VirtualBox module loads it properly. I am able to get a good compile and it seems to boot to Genode just fine and I even see the CPU status meter but I don't get the virtual machine booting up. I created a VirtualBox VM with this same name with a VDI and completed a full install of Ubuntu 16.04 64 bit and am trying to use this image file. As far as I can tell, the VDI meets all the parameters and works fine with using both Linux and Windows VirtualBox to run. Any instructions on getting this (and possibly Windows VMs to work) would be greatly appreciated.
Thanks in advance, Chris Rothrock
Hello,
On 13.10.2017 17:01, Chris Rothrock wrote:
I am trying to get a working virtual machine in Genode with the recipe vbox4_ubuntu_16_04_64.run but I am unsure where the virtual disk image file (.vdi) should reside so that the VirtualBox module loads it properly. I am able to get a good compile and it seems to boot to Genode just fine and I even see the CPU status meter but I don't get the virtual machine booting up. I created a VirtualBox VM with this same name with a VDI and completed a full install of Ubuntu 16.04 64 bit and am trying to use this image file. As far as I can tell, the VDI meets all the parameters and works fine with using both Linux and Windows VirtualBox to run. Any instructions on getting this (and possibly Windows VMs to work) would be greatly appreciated.
the vbox4_* and vbox5* run scripts are specifically setup for our test machine. The scripts are executed automatically by our tests every day.
If you want to use those run scripts, you have to manually prepare your test target machine beforehand similar to ours.
All the vbox4_*.run and vbox5_*.run scripts expect that the .vdi image is placed on the target test machine. In the test machine a AHCI disc is expected to appear as device 0 with a MBR partition scheme. The 4. partition must contain a ext2 filesystem (see repos/ports/run/virtualbox_auto.inc, look for ahci_drv and part_blk).
On the ext2 filesystem the vdi must lie in the root directory, and additionally a "ram" directory is expected with a empty overlay vdi image. The overlay image is loaded and kept during run script execution just in RAM. All writes to the vdi goes to this overlay image instead of the original Ubuntu image, to make sure that the original vdi file is not modified.
So, for vbox4_ubuntu_16_04_64.run (using repos/ports/run/vm_ubuntu_16_04_64.vbox) it looks like:
/ubuntu_16_04_64.vdi /ram/overlay_ubuntu_16_04_64.vdi
on the target test machine.
For the Windows VMs it is similar, just look into the corresponding Virtualbox configuration *.vbox files for the vdi image names and add the files to the filesystem on the target machine beforehand.
Information about creating the overlay images you will find in the Internet or you may read the beginning of repos/ports/run/vbox_share.inc for some hints.
Cheers,
Hey Chris,
additionally to Alexander guide I'd like to add that Virtual Disk Image (VDI) files carry a UUID for identification that is also specified in the .vbox file. So please make sure that the UUIDs of the VDIs match those in the configuration files. For vm_ubuntu_16_04_64.vbox
<HardDisks> <HardDisk uuid="{2a248ff9-7ac9-4862-98f9-14e31968f23d}" location="/ubuntu_16_04_64.vdi" format="VDI" type="Immutable"> <HardDisk uuid="{78a3a6a1-ade6-41bf-8b29-ec7cf16de4bb}" location="/ram/overlay_ubuntu_16_04_64.vdi" format="VDI" autoReset="true"/> </HardDisk> </HardDisks>
You may retrieve the UUID of an VDI via
vboxmanage showhdinfo <vdi file> | grep ^UUID
on any Linux machine.
Greets