Migrating from VMware Server via OVF

After manually migrating a VMware VM to Virtualbox and all the hackery involved (although it was fun to learn), we need to remember that we should be able to accomplish the same with the help of OVF, the Open Virtual Machine Format. With that, things are a lot easier. Let's export that WindowsXP VMware-Server VM again, so that I can deploy it in a VMware-ESX Server later on:

# ls -lgho *vmx* *vmdk
-rwxr-xr-x 1 2.0K 2010-06-22 21:54 winxp.vmx
-rw-r--r-- 1  278 2010-05-15 00:32 winxp.vmxf
-rw-r--r-- 1 6.0G 2010-06-08 00:22 winxp-flat.vmdk
-rw-r--r-- 1  435 2010-06-07 23:44 winxp.vmdk

# time ovftool winxp.vmx winxp.ovf
Opening VMX source: winxp.vmx
Opening OVF target: winxp.ovf
Target: winxp.ovf
Disk Transfer Completed         
Completed successfully

real    13m25.328s
user    7m56.998s
sys     1m32.942s

# ls -lgho *vmx* *vmdk
[...]
-rw-r--r-- 1 3.1G 2010-06-22 22:07 winxp-disk1.vmdk
-rw-r--r-- 1 4.4K 2010-06-22 22:07 winxp.ovf
-rw-r--r-- 1  123 2010-06-22 22:07 winxp.mf
Note that our 6GB winxp-flat.vmdk has been converted to a 3.1GB winxp-disk1.vmdk:
# file winxp-flat.vmdk winxp-disk1.vmdk
winxp-flat.vmdk:      x86 boot sector, Microsoft Windows XP MBR
winxp-disk1.vmdk:     VMware4 disk image
Now we can logon to our ESX Server an deploy the winxp.ovf. We should be able to import the same VM into VirtualBox (supported since v2.2.0), I did not try it though. So yeah, OVF FTW, hm? :)