I had a problem with VMware Fusion protesting when I resized a virtual hard disk. Here's what I had to do to make it work.
Since version 2 of Fusion, VMware has incorporated the vmware-vdiskmanager resize program into the GUI, so in theory it's drag-and-drop-easy to resize a virtual hard disk. The only thing you need to do is:
- Shut down the virtual machine
- Open up the settings UI
- Press Hard Disks
- Change the Disk size and press apply
When I did this, I got an annoying error message saying "The file already exists". Nothing about which file doesn't exist or any other error information. So I had to start poking around the disk files in the virtual machine's folder.
I managed to find out that there were a number of files called MyMachine-s0XY.vmdk with a file size of 327680. I had files with the name s017 to s022, so I got the suspicion that these files were previously created and not removed correctly, and were blocking my resize. I then checked the contents of the MyMachine.vmdk and saw that there were only files up to s016 that were used.
To fix everything, I shut down VMware Fusion, backed everything up, moved the s017-s022 away and resized the virtual hard disk again, successfully this time.
Since the virtual machine is a Vista installation, I then only needed to boot the machine, go into Computer management->Disk management and extend the partition to the new size. (If it was a Windows XP machine, I'd have to boot the virtual machine using a Linux boot cd, e.g. a Ubuntu live cd, and use GParted to resize the partition.)
Oh, if you are going to try this stunt, make sure you do a back-up of your virtual machine before! It's easy; only a drag-drop of the .vmwarevm file in Finder, so there are no excuses.
2 kommentarer:
That's useful to know - maybe I don't need to create 50GB vm's "just in case" anymore then.. :D
To be quite honest, I'd actually recommend doing that and making sure VMware Fusion doesn't allocate all of the disk at once instead of doing a slim disk configuration and resizing on demand. Even though the process nowadays is easier than using the command-line vmware-vdiskmanager, it still is way too much fuss to resize. But having Vista as a guest system actually simplified the partition resizing a great deal.
Post a Comment