RSS All Posts

RSS PowerShell Posts

Tags

2142 Active Directory Administrativia Announcements Battlefield Blogging Cricket Deployment Deployment4 Get-PSUGUK Group Policy HowTo Linux MDT MDT 2010 Microsoft Deployment Toolkit MSDN Music Permissions Personal PowerGui Power Lines PowerShell PowerShell Groups PowerShell Support PowerShell Tools PowerShell V2 Presentations PSUGAU Quick Tips Scripting SDDL Security Tech Talk Ubuntu User Groups Virtualisation VMware Infrastructure Client WAIK Weekly Poll Windows 7 Windows Automation Installation Kit Windows Server 2003 Windows Server 2008 XML

Archives

Meta


« | Main | »

Extending a virtual hard disk with Windows PE

By Adam Bell | September 11, 2007

I tend to do a lot of my development work using virtualisation, usually VMware Server or Workstation. Quite often I build a VM and realise once I start using it that I need more hard disk space. It’s easy enough to slap another virtual disk in and just add another disk, but what if you just want to make the current disk bigger?

I’ve found there’s a way to do this that is quite painless, and is possible with the tools that I use daily – admittedly it doesn’t mean that you use them daily, but maybe you do: WinPE from the Windows Automation Installation Kit (WAIK), and vmware-vdiskmanager.exe which is installed as part of VMware Workstation or Server.

First of all we need to open up cmd.exe and run the following command from within the VMware Workstation/Server folder:


vmware-vdiskmanager.exe -x <New Size> <Path to VMDK file>

In this example, we’re going to extend the hard disk in a 2003 server VM from 8GB to 10GB:
VMware-vdiskmanager.exe Extend Example

Next, we boot the Virtual Machine with a WinPe disk. We’re not going to go into the details of preparing a PE disk now, but the documentation can be found here.

Once the VM has booted into PE, we want to use the diskpart utility.
Windows PE - Diskpart Extend example
As you can see, checking the volumes after the extend shows that we now have 10GB available for use. A reboot back into the guest OS and we’re back in business, and we didn’t even have to break out Partition Magic!

Topics: Virtualisation, WAIK | No Comments »

Comments