Converting from VirtualBox VM’s to VMWare VM’s

Continuing my journey, here are a few hints and tips I picked up along the way on how to convert an existing VirtualBox virtual machine to VMWare’s vmdk format.

VirtualBox stores its VM’s in your home-folder in ~/VirtualBox. VMWare stores its virtuals in ~/vmware

The first hint to perform the conversion is to remove all snapshots. You need one single VDI to work with. So use the VirtualBox GUI to delete all snapshots.

Next you need to convert the VDI format to VMWare’s vmdk format. VirtualBox has a nice command line that does just this.

First change to the folder containing the VDI file of your VM:

cd ~/VirtualBox VMs/trusty

Next take the name of the VDI – in my case ubuntu.vdi and convert it. I’m going to store the converted VM in ~/Documents

VBoxManage clonehd "ubuntu.vdi" ~/Documents/ubuntu.vmdk --format vmdk --variant standard

Next create a blank Virtual Machine in VMWare Player. The key part here is to create the VM with a single hard-drive and the size must be slightly larger than the size in VirtualBox

1) Select: Create new Virtual Machine
Workspace 1_010

2) Select: “I will install the operating system later” followed by Next
3) Select Guest Operating OS (for example Linux) and select the version you have (for example “Ubuntu 64bit”)
4) Click “Next” and give a the virtual machine a name, for example “ubuntu”.
5) Click “Next” set the maximum disk size to the size (or larger) of your actual virtual machine (important!)
6) Click “Store virtual disk as a single file (important!)
New Virtual Machine Wizard_005
7) Click “Next”and click “Finish”. The VM is created
8) Move your VM (the .vmdk file) you converted and stored in ~/Documents over the created (empty) .vmdk
cd ~/vmware/ubuntu
mv ~/Documents/ubuntu.vmdk .

9) Play the virtual machine

uninstall the old virtualbox guest additions:

In the new ubuntu guest vm:

cd /opt/VBox[tab]/

i.e. press the Tab key to autocomplete the VBox folder name
N.B. choose the latest VBoxGuestAdditions folder

sudo ./uninstall.sh

This will uninstall VBox GuestAdditions

Install VMWare Tools:

Use VMPlayers menu option to install the VMWare Tools Installer

Workspace 1_006

This will mount the drive. Next copy the VMWareTools-[version].tar.gz file to ~/Downloads
Workspace 1_007uncompress

cd ~/Downloads
tar -zxvf VMWareTools*.tar.gz
cd vmware-tools-distrib

Next install the dkms package to ensure that vmware kernel modules are automatically rebuilt when a new kernel is released.

sudo apt-get install dkms

Lets install the VMWare Tools

sudo ./vmware-install.pl

press Enter to all the defaults EXCEPT:

Would you like to enable VMware automatic kernel modules

type “yes” here

Shutdown the VM:

sudo shutdown now

CTRL+ALT to exit the VMPlayer if focus is grabbed.

Shared Folders:

You need to add shared folders by editing through the VMWare GUI:

Workspace 1_002

mapped folders are now in /mnt/hgfs whereas VirtualBox they were in /media/sf_Downloads

If you’ve got anything depended on the old drives the easiest was is to create a symbolic link to the new location

cd /media
sudo rmdir sf_Downloads
sudo ln -s /mnt/hgfs/Downloads sf_Downloads

3D Acceleration

For the majority of new graphics cards, 3D Acceleration is supported. You may need to install the proprietary NVIDIA/AMD drivers if you are using NVIDIA or AMD graphics respectively.

For me I’m using a fairly modern Intel graphics card in my laptop – but VMWare did not recognise this and kept throwing up 3D acceleration errors.

I got around this my adding the following to the .vmx file

mks.gl.allowBlacklistedDrivers = "TRUE"

If you have install Unity you can test the 3D Acceleration support via running:

/usr/lib/nux/unity_support_test -p

This should report that “Unity 3D supported = True”

Syncing time:

Workspace 1_003

Closing a virtual machine:

Workspace 1_004


 

Conclusions

Installing VMWare tools is not the simple VirtualBox autorun and install method. Its a little complicated.

It gets worse. VMWare seldom updates its VMWare Tools – new versions of a kernel & distributions dont get support from VMWare itself until many months after the release.

There is a small community around the product that attempt to provide solutions – usually around applying patches to the source code.

An example of this official lack of support is Kernel 3.16 used in Utopic (14.10) – Shared Folder support is broken.

In my opinion – this is not on and shows a poor advertisement by VMWare for its tools & products. I use virtual machines to see and use the latest stuff. Why use VMWare when you can use a simple and well support VirtualBox – despite VirtualBox being flaky at best, at least Oracle tries to support its product quickly and efficiently.

However, saying all of this – I’ve been using VMWare Player for the last few weeks. Its rock solid – no crashes, no issues with Ubuntu 12.04 & Ubuntu 14.04 guests.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s