"My VM disk is too small"
I’ve loaded up a Vista VMware session with all sorts of fun gizmos, and came to a perplexing dilema: “My VM disk is too small”. Yeah, I could’ve just created a new virtual disk, called it D: and been done with it, but I wanted more space for Documents, Program Files, Windows Updates, etc, etc. I didn’t want a D: drive, I wanted a bigger C: drive.
Here’s what I did:
- vmware-vdiskmanager -x 32GB myDisk.vmdk That was easy … kinda. vmware-vdiskmanager expands the disk, not the partition. C: is still the original 16 gigs. vmware-vdiskmanager is in the VMware Workstation directory, the *.vmdk file is wherever your VM data is.
2 wrong #1. Vista has built-in disk resizing. Wouldn’t I love it if I could resize the system partition. Booting the VM and trying to resize the partition failed miserably.
2 wrong #2. vmware-mount the disk. The host’s Disk Management didn’t see the mounted disk. Unmount, and try again.
2 that worked. I copied the VM, opened the copy in VMware Workstation, and edited the new VM’s profile. I added a second hard drive, pointed it to an existing disk: the original VM’s disk, and booted the new VM.
Vista’s disk manager is available by right-clicking Computer, choosing Manage, and choosing Disk Management.
Click on the second disk, right-click to choose expand, and enter the size. This dialog confused me. Apparently I’m entering the size to expand the partition by, not the new size of the partition. Um, that was odd. I click ok, and the partition magically resized.
Shut down this new VM, unlink the second disk, and delete. (Yeah, having backup copies of VMs is kinda handy, and you spent all that time waiting for the huge files to copy already. If you’ve got drive space, leave it be. But do remove the original VM’s disk from the new VM’s profile. Having the second VM think you’re potentially dual-booting is bad news.)
Boot back up the original VM. Since it was used as a secondary drive, it’s boot info is toast. Enjoy the nice “winload.exe is missing or corrupt”. It’s actually just fine. Power down the VM.
Put the original Vista disk in the drive or link the Vista iso to the VM’s CD drive.
Boot off the Vista DVD, and choose “repair my computer”. As Vista’s setup repair was loading, it noticed my boot manager was hozed, and said, “Do you want to fix this and reboot?“ “Um, why, sure. That is after all my purpose.“ I never even needed to bust out “fixboot” and “fixmbr” from the repair console.
Reboot the VM, unlink the Vista ISO or remove the DVD.
Vista now boots up just fine with the bigger hard drive. But we’ve changed stuff. Depending on how severe Vista thinks this change is, you may be in for a call to Microsoft to re-activate Vista.
While you’re on the phone with Microsoft, you can buy a second copy of vista for your new “backup” VM. Or you can “delete” it. After all, one of the questions is how many computers this license of Vista is on. With that backup VM kicking around, your answer has to be 2.