Expanding your vmdk file

I ran out of space on my windows vm on the mac. I decided to expand it and ran into some problems. Finally got it to work …

- used the vmware utility

/Library/Application\ Support/VMware\ Fusion/vmware-vdiskmanager -x16GB Windows\ XP\ Professional.vmdk

- then had to extend the partition. First I tried gparted

http://professionalvmware.com/2009/09/the-best-tools-you-didnt-know-you-needed-gparted/

I had a lot of problems with gparted. First I could not get X to work properly. Oh but before that I had to set the vmware cd to point to the iso image, then press fn-f2 several times while the machine rebooted, change the boot order to boot from cd (the iso image). Finally when i did boot to the gparted livecd the X windows didn’t work well. I finally managed to get it to run, but when i extended the partition it gave error.

- At a loss what the error could be. Then I tried the EaseUS free partition tool http://www.partition-tool.com/personal.htm
but it didn’t do anything more than gparted

- finally i had to extend the ntfs volume. So i ran

>diskpart
> list volume
> select volume 1
> extend

it reported error “the volume can’t be extended”. Search on the web revealed a knowledge base article http://support.microsoft.com/kb/325590 which said you can’t extend the boot partition or the partition with the pagefile on it

- OK. I thought maybe if I boot from another vmdk and mount this vmdk using vmware disk mount utility it diskpart would work. So booted an old vmdk, it had microsoft updates turned on, took forever. Downloaded the vmware diskmount utility http://www.vmware.com/download/eula/diskmount_ws_v55.html and mounted the disk. Ran diskpart; list volumes –> the drive mounted by the diskmount utility did not show up.

- Stumped. Not yet. I remembered I had created a Win PE disk when trying out windows 7. Found it, booted the machine with it and ran diskpart. It showed the C partition in list volumes. Ran “extend” and it seemed to have worked. Took 1 sec.

- Rebooted to the original machine and typed dir, 8GB free space. Seemed to good to be true. Ran chkdsk /f and rebooted. Chkdsk did not find any errors. Finish line at last.

3 comments so far

  1. [...] leave a comment » What should you do when you run out of virtual disk space and have to expand it? Here is an interesting article on Expanding your vmdk. [...]

  2. [...] do when you run out of virtual disk space and have to expand it? Here is an interesting article on Expanding your vmdk that describes the [...]

  3. ririen on

    nice post, thank’s I’ll be try, it’s very useful for me


Leave a reply