Category: Vmware

Migrating and Mounting VMWare Images from VMWare Server 2.x into a VMWare Server 1.x environment

Tonight we decided we’d had enough of VMWare Server 2.0’s issues and shakiness. We started getting the following error, because as it turns out (we’re stupid for not thinking of this ahead of time – lesson learned) VMWare server beta’s have an expiry date, along with it’s bugs. Today we started getting this error:

“VCommand error: This product has expired.”

This box holds some Asterisk Development stuff and some other Dev systems that we couldn’t really have go down on us. So, we downgraded our VMWare 2.x Server to the latest 1.x branch of VMWare. Then on we went to importing Virtual Machines from Server 2.0 and Workstation 6. As soon as we started to power them on, the fun started. Of course! The VM’s weren’t compatible anymore and gave us a couple errors. Here’s how we fixed it.

The first error we received was:

“A General System Error Occurred: Unknown Error”

This happened as soon as we tried to power on the VM. This was easily fixed. We entered the Virtual Machine’s directory, and edited the .vmx file for the virtual machine, this is just plain text. Replacing the next few lines fixed it right up for us.

config.version = “8”
virtualHW.version = “6”

became

config.version = “4”
virtualHW.version = “4”

Now we could power them up. However, we now encountered another error that we couldn’t open the virtual disk we had created. The error was something about how the Virtual Disks were created in a later version of vmware, and couldn’t be mounted. We’d have to re-create them. Obviously this wasn’t an option.

In some of the Virtual Machine directories, we had a file to edit with a text editor, this was simple enough.

# nano virtualdiskname.vmxf

Then change this:

ddb.virtualHWVersion = “6”

became

ddb.virtualHWVersion = “4”

However, some of the other directories (mainly the ones created with VmWare Workstation 6) did not have a simple text file to edit, instead we had to edit the actual virtual disk using a hex editor. We chose the wonderful heme editor. Usage Instructions for Heme are here.

Basically put, do this:

# heme virtualdisk.vmdk

Now press “w” on your keyboard to search for “virtualHWVersion“. You will find it in the ascii column eventually. Hit “TAB” to enter Ascii mode, move your cursor with the arrow keys to where you need to replace the number. Replace the “8” or the “6” with a “4” and then press “s” to save the file. Answer yes to saving and then wait for it to save. Now exit the program by pressing “q“. You’ll notice it created a backup file with the “~” extension on it incase you messed up the hex editing. Leave this backup file here for now. Continue on, nothing to see here.

Now on the VMWare server, make sure that all the files in the virtual machine directory are chmodd’d properly.

# cd /virtual machine/directory/

# chown user:group *
# chmod og=rwx *

Now you should be able to start your vm without any issues.

If it all works, feel free to delete the backup .vmdk~ that heme created for you.

Good luck!

Ubuntu Server LTS 8.04 VMWare VMTools Howto and Tutorial

You may have some difficulty with Ubuntu Server and VMWare Tools. Here’s how we got it working in the end:

  • start vm
  • # sudo mount /cdrom
  • # cd /cdrom
  • # cp *.tgz /tmp
  • # cd /tmp
  • # apt-get install build-essentials
  • # apt-get install linux-headers-`uname -r`
  • # tar xzvf vmtools<yourversion.tgz>
  • # cd vmtools<yourver>
  • # perl vmware-install.pl

That’s it. You might want to modify your console settings so you can get 1024×768 from VMWare Workstation, but it’s not really required if you’re just SSH’ing to it.