Running VMware images under VirtualBox

I use the excellent VirtualBox on Ubuntu but I had a specific Debian dev environment VM that I'd previously run under VMware Fusion on my work mac when it used to have OSX on it ;-). The current versions of VirtualBox (2.2.4 in my case) support running vmdk disks now so it makes it possible to just create a new vm with the appropriate setting for the existing vm image and attach the disks, or so I thought!

When I first ran the image it looked to book up fine - however when it got to mounting the root file system it hung saying "Waiting for root filesystem"

Fortunately whilst looking at the hard-disk settings (with the vm shutdown) I noticed that there were additional adapters for SATA and SCSI. Vmware by default uses SATA so getting it working was a simple as enabling the SATA adapter and setting each disk to the correct SATA ports 0 and 1 in my case as I have 2 hard disks.

Booting the VM resulted in the filesystem mounting correctly and it all working!!!

I then thought it would be a plan to remove the VMware tools so I could install the VirtualBoxGuestAdditions. This turned out to be a bit of a nightmare as running the also deleted my /etc/fstab (WTF?) so when I rebooted everything was read-only.

To get around this I booted back in single user mode and ran the following to remount the root filesystem as rw.

mount -no remount,rw /

Next I recreated the /etc/fstab from a backup and saved it.

Lastly I returned everything back to readonly with

mount -no remount,ro /

and then rebooted. After that it was a case of mounting the VirtualBoxGuestAdditions.iso mounting it at /media/cdrom and then running the installer from there.

Job's a good'un. If you're doing the same steps I'd strongly recommend backing-up or checking /etc/fstab is still there after removing vmware tools in case it get's binned by the vmware tools script of LOL, so you don't have to go through the same pain to get it all working.

comments powered by Disqus