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
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!)
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
mv ~/Documents/ubuntu.vmdk .
9) Play the virtual machine
uninstall the old virtualbox guest additions:
In the new ubuntu guest vm:
i.e. press the Tab key to autocomplete the VBox folder name
N.B. choose the latest VBoxGuestAdditions folder
This will uninstall VBox GuestAdditions
Install VMWare Tools:
Use VMPlayers menu option to install the VMWare Tools Installer
tar -zxvf VMWareTools*.tar.gz
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
press Enter to all the defaults EXCEPT:
Would you like to enable VMware automatic kernel modules
type “yes” here
Shutdown the VM:
shutdown sudo shutdown now
CTRL+ALT to exit the VMPlayer if focus is grabbed.
You need to add shared folders by editing through the VMWare GUI:
mapped folders are now in /mnt/hgfs whereas VirtualBox they were in
If you’ve got anything depended on the old drives the easiest was is to create a symbolic link to the new location
sudo rmdir sf_Downloads
sudo ln -s /mnt/hgfs/Downloads sf_Downloads
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:
This should report that “Unity 3D supported = True”
Closing a virtual machine:
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.