Shrinking VMware volumes with VMware Converter

Today I’ve been trying to migrate a VMware Workstation 5.5 virtual machine to VMware ESX 3. Unfortunately this has proved to be much more difficult than I expected! It’s not a legacy-mode VM, so if I copy it straight onto the ESX server it won’t load it up, I just get some horrible error.

So I’ve been trying to use the vmkfstools utility to generate an ESX compatible vmdk file, using commands like this:

vmkfstools -i /var/tmp/pt.vmdk /vmfs/volumes/storage1/ptvmware.dsk

…but then I get this error:

Destination disk format: VMFS thick
Cloning disk ‘/var/tmp/pt.vmdk’…
Failed to clone disk : There is not enough space on the file system for the selected operation. (13)

This had me stumped for ages, because the vmdk file I am trying to convert is only 500MB and I have 26GB free on my ESX server. I know that’s not really a lot for ESX, but this is only a test server, and there is plenty of space to hold the converted vmdk file.

Then I suddenly remembered, ESX pre-allocates all disk space when the VM is created, while VMware Workstation allows it to start small and it grows as space is needed.

So I asked the guy who created the vmdk image what size disk he configured it with – he configured it to use an 80GB SCSI disk, so when the vmkfstools utility tries to expand it I obviously run out of room!

So then I read about a tool called VMware Converter which you can get from VMware here:

This tool allows you to expand and shrink partitions inside a vmdk file so that you can make the overall vmdk file smaller. Ok, cool, I thought, so I can shrink one of the partitions to make it small enough to fit on my ESX server. Except it won’t do it! Damn. The option to resize the partition is greyed out and it won’t let me change it.

Speaking to the guy who created the VM, it seems it’s partitioned with xfs and reiserfs partitions and I have a feeling that the VMware Converter can only handle ext3 filesystems. I haven’t found any conclusive proof yet but that is my suspicion.

Unfortunately it’s going to be difficult to get the VM rebuilt as it’s an image of an appliance that contains an 80GB disk, so I’ll probably just have to find a bigger disk somewhere for my ESX server. Maybe we have one in a server I can nab!  Roll on Monday!

This entry was posted in Computers and Internet. Bookmark the permalink.

One Response to Shrinking VMware volumes with VMware Converter

  1. Paul says:

    I am getting *LOTS* of hits on this page via google and – PLEASE let me know if anything on here is helpful. This is probably the most popular page in my entire space. Cheers!

Leave a Reply

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

You are commenting using your 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