?
Solved

Extend OS Volume on a Windows 2003 Virtual Machine (VMware ESXi 4.0)

Posted on 2014-07-13
16
Medium Priority
?
2,290 Views
Last Modified: 2016-10-27
Hi,
 I have Windows 2003 VM (with one partition - OS + data) and I need to increase the hard drive space on this VM.
I increased the size of hard drive on this VM in Edit Settings, started VM, opened Command Prompt, ran DISKPART, selected Volume 0, and typed "extend", but it failed because, I discovered that,  this command only works on "Data" partition.
 Is there a way to do this without buying 3rd party software?
 If I must buy 3rd party software, what would you recommend?

Thanks.
0
Comment
Question by:sglee
  • 7
  • 5
  • 3
  • +1
16 Comments
 
LVL 8

Accepted Solution

by:
Leo earned 768 total points
ID: 40193489
This link will help you to extend C drive in different 6 methods...

http://vsphere-land.com/tips-tricks/re-sizing-virtual-disks
0
 
LVL 8

Assisted Solution

by:Leo
Leo earned 768 total points
ID: 40193503
In server 2003, you may try diskpart commands line(http://www.hdd-tool.com/partition-magic/use-diskpart-command-to-resize-partitions.htm) , which provides by microsoft and is free, but it also has some disadvantages.

There are many server partition software in the market that can help you do this job better, for example, acronis disk director, paragon partition, partition wizard, partition assistant, etc.

 

When running either of the partition software, you just need to shrink a data partition, and then extend the system partition with the unallocated space. Some tools contains HOT RESIZE feature, if the system partition is NTFS, you can extend it without rebooting the Servers.

 

In fact, it is the same to work on VMware with the physical disk partitions. see this article how to extend C drive on VMware (http://www.partition-magic-server.com/resource/extend-c-drive-vmware-server.html)
0
 

Author Comment

by:sglee
ID: 40193511
@Striker007
I tried DISKPART, but that command does not work on OS partition. Please see below comment in my original posting:
----------------------------------------------------------
I increased the size of hard drive on this VM in Edit Settings, started VM, opened Command Prompt, ran DISKPART, selected Volume 0, and typed "extend", but it failed because, I discovered that,  this command only works on "Data" partition.
----------------------------------------------------------
0
 
LVL 8

Expert Comment

by:Leo
ID: 40193516
I read it, i forwarded a link for Diskpart just to make sure if you followed all steps in order....
Have you tried the other partition softwares i suggested?
0
 

Author Comment

by:sglee
ID: 40193519
Have you tried the other partition softwares i suggested? ---> not yet. I was looking for something simple, so I tried DISKPART command.

I am going to try other methods later on either this evening or tomorrow evening.
The W2003 VM that is running out of space and SQL server failed to perform backup.
I need to free up some space from the C drive (of W2003 VM) or find the way to easily increase the HD size this evening (if I could).
0
 
LVL 4

Assisted Solution

by:ambatihp
ambatihp earned 256 total points
ID: 40193564
The following procedure will explain how to enlarge an existing virtual disk or in other words how to resize the primary windows Drive.

This procedure requires two Windows 2003/2008 machines to perform this operation.

1.      The primary Server that’s low on disk-space
2.      The Staging Server (any windows machine)

Shutdown primary server and staging server.
Right click on the drive that's running low on the diskspace (If you have not consolidated your snapshots do it before expanding your disk)

Now go to the staging server, click on add hard-disk, use existing hard-disk (reuse a previously configured disk), browse the vmdk of the primary server's c drive and click attach

Power on staging server
If the staging server is win2k8 or win7 or above, you can just type diskmgmt.msc and expand it in GUI.

If it is a windows 2003 machine, you can try a diskpart
Start -> Run -> Cmd -> Ok
Diskpart
List volume
Select Volume X (Choose Number of the drive letter that is relevant)
Extend
Exit
Exit

Once done, shutdown the guest/staging OS. Right click on the vm, go to hard-disk and click REMOVE (caution here, make sure your option says "remove from virtual machine", not the one that says "remove from vm and delete files from the disk)

Reboot your Primary OS, and you will see the C Drive being expanded.
0
 

Author Comment

by:sglee
ID: 40193648
My ComputerDiskPart@Striker007
My trial (in my posting) was based on a test VM on my Test VM Server where there was only one partition (OS + data) and extend command did not work.
However the real VM that is running out of space has two partitions (OS (C:) : 50GB & 35.9GB Free, DATA (D:): 100GB, 15GB Free). Please see the screenshot above.

Do you think I can apply the following steps to increase the DATA  (D:) drive?

(1) Increased the size of hard drive on W2003 VM in Edit Settings
(2) Start VM
(3) Open Command Prompt, run DISKPART, list Volume, and identify Volume number for DATA (D:)
(4) , selected Volume 2 and typed "extend"
0
 
LVL 8

Assisted Solution

by:Leo
Leo earned 768 total points
ID: 40193690
These are the correct steps for extending Data (D:) drive, just on the extend step;

Type extend [size=n] [disk=n] [noerr]. The following describes the parameters:
size=n
The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to use all the next contiguous unallocated space.

disk=n
The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.

noerr
For scripting only. When an error is thrown, this parameter specifies that Diskpart continue to process commands as if the error did not occur. Without the noerr parameter, an error causes Diskpart to exit with an error code.

**To extend the volume. If you don't pass any parameters, DiskPart will use all unpartitioned space on the current disk
0
 

Author Comment

by:sglee
ID: 40193705
I plan on using all available space for D drive.
0
 
LVL 8

Expert Comment

by:Leo
ID: 40193719
Dispkpart has some limitations, have a look at this, this might be what you are after....

http://macrorit.com/partition-magic-manager/server-diskpart-fails-to-extend-system-partition.html
0
 
LVL 124

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Andrew Hancock (VMware vExpert / EE MVE^2) earned 256 total points
ID: 40193882
0
 

Author Comment

by:sglee
ID: 40194351
@Striker007
I successfully extended Data partition on my test W2003 Server VM.
I just discovered that the VM had 25GB "unpartitioned" space when I ran DiskMgmt.msc. I increased HD to 200GB on VM using VSphere client, ran DISKPART and ran "Extend" on Volume 1 (which had 25GB), and now I see 75GB.

So I am confident that I can do the same with production VM this evening.
I will keep you posted.

@Andrew

 I will try EXTPART on my test VMs tonight and post the result.
0
 

Author Comment

by:sglee
ID: 40199757
I have decided to wait until Weekend to perform DISKPART.
This VM is running SQL server with SQL Data that is critical to business operation.
Should something happen during the operation, I like to have time to troublshoot.
When I spoke to SQL Server App. Tech Support, they said that just shut down SQL service , run DISKPART and should be ok. They do it all the time as they provide cloud service on their VMware boxes.

I will keep you posted this weekend.
0
 
LVL 124
ID: 40199804
or ExtPart......which is Hot Add!

Diskpart can be used in that fashion on later OS (e.g. 2008 and later!), otherwise you'll need a helper machine.
0
 

Author Comment

by:sglee
ID: 40199945
@Andrew
I tried DISKPART on my test W2003 VM and it worked. Did you experience something different?
0
 
LVL 124
ID: 40200006
Okay, it works,....depends on which partition you are extending.

ExtPart is quicker and easier, in my opinion. Less prone to human error!

(make a backup before you make any changes whatever the method you use!)
0
Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Ransomware continues to grow in reach and sophistication, putting data everywhere at risk. Learn how to avoid being caught in its sinister clutches with these 11 key tips.
Teach the user how to delpoy the vCenter Server Appliance and how to configure its network settings Deploy OVF: Open VM console and configure networking:
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question