Just as I did some days ago, you may face the problem that you’re running out of diskpace on your C:\ drive (system drive) in VMWARE. Expanding the system drive is not as easy as expanding a non-system drive (like D:\, E:\ or whatever partitions you may have in your server :) )
These steps will guide you to expand your C:\ drive easily and without any risk. To ensure you don’t lose any data, we first have to make a backup of the vmdk. To do this, turn off the virtual machine a make a copy of the vmdk of the target server. You can do this with WinSCP for example, but if you don’t know how to use that, you can also make a clone of the server. A clone is a good backup too :)
Now that we have backup, we can start with the necessary steps to expand the disk. The following steps are taken from a forum topic of VMWARE. All credits go to GordonG.
1.3.0 Use the VI Client to connect to VirtualCenter
1.3.1 Remove the Disk from the Original Server
- Select the VM, right-click and select Edit Settings
- Select the hard disk and select Remove (DO NOT select the option to Remove and Delete).
- Click OK to apply the changes.
1.3.2 Add the Disk to the Temporary Server
- Select the VM, right-click and select Edit Settings
- Click Add, then Hard Disk, Use An Existing Disk.
- Browse to the datastore, directory and select the vmdk file that we are working with.
- Click OK to apply the changes.
1.3.3 Expand the Partition
- If the temporary server was shutdown boot it. If it was running, logon, go to Disk Management and do a rescan to detect the new disk.
- Note that this will only work with Windows 2003 SP1 or later and only when the partition is the only one on the disk.
- Login to the server as an administrator
- Open a Command Prompt (*cmd*)
- Type Diskpart
Type list volume
Type select volume n (where n is the volume/ partition you want to extend. Check the drive letters and use Disk Management to be sure).
Type extend
This will extend the selected volume to fill the entire disk. Check the changes in Disk Management
1.3.4 Remove the Disk from the Temporary Server
- Shutdown the Temporary Server.
- Select the VM, right-click and select Edit Settings
- Select the hard disk and select Remove (DO NOT select the option to Remove and Delete).
- Click OK to apply the changes.
1.3.5 Add the Disk Back to the Original Server
- Select the VM, right-click and select Edit Settings
- Click Add, then Hard Disk, Use An Existing Disk.
- Browse to the datastore, directory and select the vmdk file that we are working with.
- Click OK to apply the changes.
- Power on the VM and check the disk in Disk Management.
Thanks much, this worked great!
(Quote)
I just went through the process of expanding 4 of our servers. I am running ESX 3.5 VC 2.5 and I spent so much time researching the right steps and it turns out to be very easy if you are running Server 2008 VM’s.
Steps for Server 2008:
Power down VM
In VC edit the HD to the new size
Power on VM
Under Storage Management, rescan drive and then right click on drive and choose extend volume.
You are done!!!
I did have to extend a WinXP and I did use extpart(dell tool) and it worked very well.
instead of using the extend volume utility in 2008, download the extpart and then in a command window change directory to location
Example:
To extend the g: volume by 1 GB (1024 MB) use the following command:
extpart g: 1024
Hope this helps
(Quote)
Never try the method that You are saying here. I’ve always use vmkfstools. After that depend what version of Windows:
5.0 Diskpart
or
6.0 Disk Management
(Quote)
Have anyone tried Dell EXTPART to extend a system drive?
I’ve used it on occation and not (yet) encountered any problems.
http://support.dell.com/support/downloads/format.aspx?releaseid=R64398&c=us&l=en&cs=&s=gen
Use vmkfstools or the VI client to extend the disk. Start up the VM and use EXTPART inside Windows to expand the disk. Fast (scary fast) and works on system partitions.
Not just me using it either it seems..
http://communities.vmware.com/thread/209553
//Fredrik
(Quote)
that’s a very good tips
thanks for that
(Quote)
Dont you need t use the vmkfstools -x ##gb filename.vmdk first to expand the vmdk file inside of the ESX box?
(Quote)