Muffinresearch Labs by Stuart Colville

Running VMware images under VirtualBox | 1 Comment

Posted in Linux/Unix, Work on 4th June 2009, 12:11 pm by

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.

hard disk dialogue

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 vmware-tools-uninstaller.pl 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.

Post Tools

  • justsomeguy

    Thanks for the heads up. VirtualBox is really shaping up with 2.24, using it instead of Vmware Server now. I found Desktop Effects and audio to be flawless in Ubuntu 9.04… not quite so on Fedora though, but probably a Fedora issue.

Insert a tab character in vim when expand tabs is on|(0)

I have vim set-up to use spaces in place of tabs. Sometimes you need to use an actual tab e.g. editing a Makefile. Now whilst it’s possible to change settings so that tabs are used for specific files, a quick tip to remember is to simply type in insert mode:

Ctrl+v tab

That is Ctrl and “V” and hit the tab key, et voila you’ve entered an actual tab.

GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Photos on Flickr

© Copyright 2004-13 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.435s.