Using a cloning program to resize Vmware virtual disk files

September 5, 2007 at 9:42 pm 5 comments

Vmware Server allow you to create virtual disk (vmdk) files that are either growable or pre-allocated. When you create the file, you specify a maximum size. At some point, you fill the storage to the maximum size. You’ll have two choices:

  1. Create another virtual disk file and add it to the virtual machine. This will show up as another disk.
  2. Create a bigger virtual disk and copy the old virtual disk to the new one.

The first option is pretty easy, the second option will require a third party tool that can clone partitions such as Acronis TrueImage or Ghost. While Vmware does provide a set of command line tools that allow you to manipulate the vmdk files, the tools cannot grow or shrink files (well you can on a window host, but not on a linux host).

Here’s how I move the virtual environment around. I will be using Acronis TrueImage, but the concept should be the same for other partition copiers.

  1. Make sure the virtual machine is off. Add a second hard disk to the virtual machine.
  2. Boot the machine using Acronis TrueImage Boot CD, this boots the virtual machine with the backup software. Now the backup software sees two disc.
  3. I use the Clone feature of TrueImage to copy the content of one disk to the other.
  4. After the copy is complete, I turn off the virtual machine. Remove both hard disk and then re-add the destination hard disk so that it is my primary drive.
  5. Boot the virtual machine up with the new file. Delete the old one if you like.

Problems with Vista

When I tried this with a Vista Guest, I got a “winboot.exe” error after I boot off the cloned disk. Apparently, TrueImage does not handle the boot sector on Vista properly. To correct the problem, insert your Vista OS disc and select the repair option. This takes a few minute and fixes your problem with no data loss.

Using external drives

If you are using Vmware on a laptop like I do the hard disk space is rather limited, so you may want to create your destination file on an external usb drive. Vmware Server has an option for USB device, but don’t even think about using it. While I have managed to get the USB drive to mount, the virtual USB interface is running USB 1.1 (may be not even that fast). It took an entire day to create a 10 Gb backup file.

Instead, mount the USB on your Host OS and then create your destination file before you start the virtual machine. In fact, it’s better to turn of the USB interface on the virtual machine while you are doing this, just in case the guest and host starts fighting over your USB drive and blowing up partition table.


Entry filed under: Virtualization, vmware.

Is it worth upgrading the CPU on Acer 3680-2633? Laptop shutdown button changed on Vista

5 Comments Add your own

  • 1. JC  |  December 13, 2007 at 11:02 am

    Thanks. Good article.

    Simple question, though. After I expand the VM via cloning a second HD, when you say delete the old one, do you mean, first Remove it from inventory” and then just delete the files manually i.e. put them in the Recycle Bin?

  • 2. paulsiu  |  December 16, 2007 at 2:35 pm

    You can remove the drive from the virtual disk manager without removing the file itself. I would probably remove it and rename it to keep it around for a bit in case something goes wrong.

  • 3. rsuriaga  |  January 25, 2009 at 6:44 pm

    I have a virtual machine with win xp. the hard disk have max size 15Gb, but in the guest operating system the hard disk is 9,98Gb. How can I use the 5Gb?


  • 4. induction cookware  |  June 18, 2013 at 2:56 pm

    Hi, just wanted to say, I loved this post. It was helpful.
    Keep on posting!

  • 5. Monica Israels  |  May 11, 2014 at 1:07 am

    Thanks for the clear instructions, it worked perfectly.


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 )

Google photo

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

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


September 2007
« Aug   Oct »

Most Recent Posts

%d bloggers like this: