Wednesday, June 5, 2013

Moving virtual disks outside of vmware. The confusing flat files and descriptor files.

When using vSphere Datastore Browser, you will a see a large file like server1.vmdk. The file will be close to the size of the virtual machine. If you download the machine and move it to another vmware host, it will not work! There is a descriptor file that is hidden from the Datastore Browser.

This is my solution:

Enable SSH on the vmware host.
Use putty to connect to the host.
Find the location of the virtual machine.

cd /vmfs/volumes/my_datastore/server1
ls -l

Now I see two vmdk files.

server1.vmdk        (Small descriptor file. But this is the name of the large file earlier?)
server1-flat.vmdk  (Large flat file.)

mv server1.vmdk server1.temp

I renamed the descriptor file and now it is viewable in the Datastore Browser. Now I can download or backup my virtual machine. If you want to move to another host, rename the small file to the original name.

Note: There are other files you need to backup but they should work fine in the GUI.