RG036 – Resizing your RES VM lab environment

By Max Ranzau

 

This article isn’t related to RES technology explicitly. However, if you like many others are running your RES lab in VMware workstation, it may however be very relevant: You may have come to a point where you need more diskspace than you originally allocated to your VM’s. This can be somewhat iffy to deal with, especially if we’re dealing with the systemdrive. Note: This article was originally labeled RU001, but has been renumbered to conform to the way we number articles here at RESguru.com

Note: This article has been updated April 5th 2010, as the information in the article had become obsolete.

There are two ways of expanding your drives. The processes are fairly straight forward no mater which you chose. You can a) using VMware Workstation 7 and upyou can use the workstaiton console to expand your drives. The other option b) is to use the VMware vCenter Converter. In both cases, to be on the safe side, think of backing up your VMs somewhere safe before you start. There. I’ve said it.

Expanding disks using the console is simple:

  1. You will need to delete all your snapshots for the VM you wish to expand disk(s) in. Sorry, there’s no way around this.
  2. Go to the VM|Settings|whatever Harddisk and click the utilities button on the right, and select expand.
  3. Select the size you want the disk to be.

To use the vCenter to expand disks, do this:

  1. Download vCenter Converter here
  2. Follow the wizard and select the new disk size. Aparently it shoud be possible to preserve your existing snapshots using the converter. There is a nice article with screenshots here, which explains the process.

Now you have expanded the disk size. However, just because you expand the disks themselves, doesn’t mean the partitions inside get expanded too. Depending on the OS in question, you’ll have to do this yourself. If it’s Windows7 / 2008 or newer it’s easy: Just go to the disk manager, select the system partition and select Extend.

However, if you’re dealing with an older Windows OS I came across a nice article here on VMware’s KB, which referenced some diskpartition management utilities. One of them is a nice free opensource disk management utility called Gparted Live. It comes as a nifty .ISO file, which you just mount on your VM, boot it up and stretch the partition so it matches the new size. The mentioned tool can be found here.

Once you have collected the tools you need, the procedure is easy. I managed to follow the above route almost succesfully, with the exeption that my vm had a D-drive which was dynamic. This meant the the disk expansion utility didn’t want to touch it. In order to bypass this problem, I did the following:

  1. Create a new shiny 8gb preallocated disk and attached onto the vm
  2. Boot the vm up in safemode
  3. Partition and format the new drive, mount it as e: and copy all the contens of the old d: to it. I used xcopy d:\ e:\ /s /c /v /o which means copy subdirs, continue on error, verify and copy acls too)
  4. In the windows diskmanager, remove the driveletter for the old d: drive, change the new e: to d: and reboot.
  5. Now you can nuke all the diskfiles for the old d: drive.

I hope the above makes sense, if not – drop a comment or post in the forum.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.