Posts tagged ubuntu

Convert VirtualBox .vdi disk to VMWare .vmdk

A couple months ago, I received a laptop upgrade from my company.  Naturally, it came with Windows…bleh.  I decided to install Ubuntu and dual boot it with XP in the event that I need Windows (which is unfortunately much more frequent than I’d like).  I didn’t put too much effort into application support before installing the latest version of Ubuntu, which brings me to the point of this post.  VMWare Workstation 6 will not work with the kernel I’m using.

I decided to give VirtualBox a shot given the fact that I did not want to buy a new license.  After using VirtualBox for a couple of months, I’m quite pleased with its functionality and ease of use.  Disk, and machine configuration are very intuitive and basic.  My only quarrel is that it does not allow resizing of virtual disks.  This is an issue because I do not want to size a disk extremely large to accomodate future additions or so small that it cannot support my future needs.  The ability to resize a disk is very handy for someone like me who creates templates and builds test boxes for each new project that I’m on.

I was finally able to obtain a VMWare Workstation 6.5 license and I’ve been looking into converting an existing VirtualBox .vdi disk file to the VMWare supported .vmdk format.  Why waste the effort of installation and configuration of a perfectly good virtual machine?  After some extensive reading on options, I discovered a very clean method for handling this.  Below are the steps that I’ve taken to convert my disks (note these instructions will have to be modified for your paticular flavor of linux).  These are very simple, yet sparingly documented steps for converting a virtual disk from the VirtualBox .vdi format to VMWare .vmdk format.

1. Install Qemu:

sudo apt-get install qemu

QEMU is an open source cross-platform emulator for Linux hosts. It comes with a program called qemu-img, which is a disk image management application. This program can be used to convert disk images to different formats and in the case of our exercise we will use it to convert the raw data to a vmdk format file.

2. Convert the .vdi disk to raw format:

VBoxManage internalcommands converttoraw winxp.vdi winxp.raw

3. Convert the raw data file to VMWare supported .vmdk disk image:

qemu-img convert -O vmdk winxp.raw winxp.vmdk

4. Remove the raw data file now that it is not needed:

rm winxp.raw

5. Resize the disk if necessary:

vmware-vdiskmanager -x 15GB winxp.vmdk

Finally I have space on my windows XP image to store performance data!  I hope this exercise helped you as much as it did me.

G1 USB Tethering Startup Script for use with Azilink

A couple months ago, I was at Charlotte Douglas International Airport waiting on my flight to NYC.  As usual, I had a connecting flight on my way from the tiny airport in my hometown to New York.  After an hour or so of reading, I decided it was a good chance for me to check my email and check my fantasy football team.  In typical fashion, the CLT Airport wireless would not allow me to connect — it’s a rather pathetic implementation, although I’ve devoted absolutely no time or thought to what the problem may be.

Anyway, I decided to use my G1, which is very nice and all, but for continued use, just doesn’t fit the bill.  That’s when it occurred to me that I had not checked on tethering capabilities in a while.  So I did a bit of research and came across this site:  http://xdatap1.wordpress.com/2009/08/10/g1-usb-tethering-with-ubuntu/.  This was a very informative and complete set of instructions for setting up USB tethering on my linux box/G1 phone.  In about 15 minutes (most of it downloading the necessary files) I was up and running.  I had my laptop browsing the web using the 3G capabilities of my G1!

The only thing that was missing from this was a startup script, so I decided to create one as usual to make my life a bit easier.  Please use, update, change, improve this script as you see fit.  The only thing I ask is if you come up with any improvements, please let me know!

Download it HERE.