VMware Cloud Community
Rohail2004
Enthusiast
Enthusiast
Jump to solution

expand C drive

can i extend the size of a C drive on a VM? the VM files on the SAN and would like to extend the C drive. What's the best and secure way to accomplish this?

Reply
0 Kudos
1 Solution

Accepted Solutions
vmroyale
Immortal
Immortal
Jump to solution

Do you have any other partitions on this disk? I've run into systems that were P2V conversions and still had in EISA partition on them and extpart wouldn't extend the drive with that partition sitting between the OS partition and the free space.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com

View solution in original post

Reply
0 Kudos
18 Replies
Troy_Clavell
Immortal
Immortal
Jump to solution

with ESX 3.0, see the link below

....or you can always use Converter and do a V2V

Reply
0 Kudos
depping
Leadership
Leadership
Jump to solution

Extpart is a simple tool to do this. http://www.ntpro.nl/blog/archives/695-Dell-ExtPart-Utility-to-Extend-Basic-Disks.html

Duncan

VMware Communities User Moderator | VCP | VCDX

-


Blogging:

Twitter: (*NEW*)

Available Soon: vSphere Quick Start Guide ()

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
DheereshLodhi
Enthusiast
Enthusiast
Jump to solution

It is not uncommon that you have to enlarge a partition of a system whether it is physical or virtual. In a Windows environment, the diskpart command can be used but does not work for boot and system partitions. A lot of times however, I have the need to expand the system partition. Here are the steps I follow in an ESX environment but they can also be used in GSX or Workstation (with some other tools) or even old school physical systems.

*

Step 1: enlarge disk with vmkfstools

*

Power down the virtual machine and use the service console command vmkfstools with the -X parameter.

For example: vmkfstools -X 12G <path-to-vmdk-file>

*

Step 2: boot the guest normally

*

You need to boot the guest normally to let Windows detect the new disk size. If you omit this step, GParted will throw errors after expansion of the partition.

*

Step 3: use GParted to enlarge the partition on the disk

*

GParted (Gnome Partition Editor) can be downloaded as a Live CD from site. Just put the iso on your ESX system and connect it to the virtual cd-rom drive of the guest. Then boot the guest and boot from the cd.

When you continue, you get a menu. Select the Xvesa option and then select Done to continue. You will then get a few prompts for language, keyboard layout, screen resolution and so on. The system will continue booting and start GParted. Your disks will be scanned and presented. You see a disk that has been extended. Now it is just a matter of expanding the partition. Just right click the partition and select Resize/Move.

Now you can easily resize the partition by typing new values or with the mouse. Click the Resize/Move button when finished. Then click the Apply button and confirm. The partition will be extended.

You can now reset the virtual machine and use the enlarged partition.

There are other tools on the market for this but GParted works well. If anyone have any query please revert.

Best Regards,

DHEERESH LODHI

Reply
0 Kudos
DheereshLodhi
Enthusiast
Enthusiast
Jump to solution

one more option you can try:

  1. Connect your vm's vmdk file as secondary with another VM(provided you are using single vmdk for one partition)

  1. then use diskpart to extend the partition

Regards

DHEERESH LODHI

Reply
0 Kudos
VirtualRed
Enthusiast
Enthusiast
Jump to solution

I usually just do a V to V with converter, gets the job done for me.

Reply
0 Kudos
beyondvm
Hot Shot
Hot Shot
Jump to solution

As others have stated, ExtPart is by FAR the easiest way to accomplish this.

---

If you found any of my comments helpful please consider awarding points for "Correct" or "Helpful". Thanks!!!

www.beyondvm.com

--- If you found any of my comments helpful please consider awarding points for "Correct" or "Helpful". Thanks!!! www.beyondvm.com
Reply
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

Moved to Virtual Machine and Guest OS forum.


Best regards,

Edward L. Haletky VMware Communities User Moderator, VMware vExpert 2009, Virtualization Practice Analyst[/url]
Now Available: 'VMware vSphere(TM) and Virtual Infrastructure Security: Securing the Virtual Environment'[/url]
Also available 'VMWare ESX Server in the Enterprise'[/url]
[url=http://www.astroarch.com/wiki/index.php/Blog_Roll]SearchVMware Pro[/url]|Blue Gears[/url]|Top Virtualization Security Links[/url]|Virtualization Security Round Table Podcast[/url]

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos
Rohail2004
Enthusiast
Enthusiast
Jump to solution

I tried to run ExtPart but got the following error, even though I have enough space available to extend. Any ideas? thanks

Unable to expand partition. Check if there is sufficient space on the disk

Reply
0 Kudos
beyondvm
Hot Shot
Hot Shot
Jump to solution

Did you already expand the disk in the VM properties? You need to do that first, then run extpart on the volume.

---

If you found any of my comments helpful please consider awarding points for "Correct" or "Helpful". Thanks!!!

www.beyondvm.com

--- If you found any of my comments helpful please consider awarding points for "Correct" or "Helpful". Thanks!!! www.beyondvm.com
Reply
0 Kudos
Rohail2004
Enthusiast
Enthusiast
Jump to solution

Yes i have extended the partition at the VM level, seeing 2 gb unallocated space under Computer Management, but when I run extpart, it gives me an error. any ideas?

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

if you use extpart and want to extend the disk by 2GB, you are only going to put 2048 in the size in which you want to increase the drive by, not the total size you are going to.

Reply
0 Kudos
Rohail2004
Enthusiast
Enthusiast
Jump to solution

I know.. that's the exact thing I did and got the error.. see below...

C:\dell\ExtPart>extpart.exe c: 2048

ExtPart - Utility to extend basic disks (Build 1.0.4)

(c) Dell Computer Corporation 2003

Current volume size : 30710 MB (32201938432 bytes)

Current partition size : 30710 MB (32201938944 bytes)

Unable to expand partition. Check if there is sufficient space on the disk

Reply
0 Kudos
vmroyale
Immortal
Immortal
Jump to solution

Hello.

And if "extpart c: 2048" doesn't work, try backing it down in increments of one, until it succeeds - 2047, 2046, etc.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
beyondvm
Hot Shot
Hot Shot
Jump to solution

I usually start with the next lower even thousand (i.e. 2000) for the first run then run it a second time to eat up whatever remaining MB disk management says is left.

---

If you found any of my comments helpful please consider awarding points for "Correct" or "Helpful". Thanks!!!

www.beyondvm.com

--- If you found any of my comments helpful please consider awarding points for "Correct" or "Helpful". Thanks!!! www.beyondvm.com
Reply
0 Kudos
Rohail2004
Enthusiast
Enthusiast
Jump to solution

I tried everything but no luck....

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

I tried everything but no luck....

then shutdown the VM, use a helper VM, mount the HDD to the helper VM, use diskpart. Unmount the disk from the helper and power on the primary VM

It's outlined in the first post I made

Reply
0 Kudos
vmroyale
Immortal
Immortal
Jump to solution

Do you have any other partitions on this disk? I've run into systems that were P2V conversions and still had in EISA partition on them and extpart wouldn't extend the drive with that partition sitting between the OS partition and the free space.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
RYANDELORETO
Contributor
Contributor
Jump to solution

When trying to extend a Windows Server 2003 partition using either Windows DiskPart or Dell’s ExtPart you get a message referencing “unable to extend the partition check if there sufficient disk space on the disk”. However, you do have sufficient disk space available. This happens because you are trying to add unallocated space to the drive that is not contiguous to the unallocated space. The unallocated space can only be added to the last partition not the other partitions before it. So in this case I had a C: drive a 😧 drive and a P: drive. I was trying to add space to the 😧 drive. The unallocated space can only be added to the last partition which is the P: drive.

If you were to look at disk management you can see that the unallocated space is at the end of the P: drive and therefore, cannot be added to the C: or the 😧 drive.

If you want to add the unallocated space to the C: or 😧 drive then you will need to use a 3rd party utility such as Paragon or GParted or AOMEI, etc. otherwise you can only add the unallocated space to the last partition.

Reply
0 Kudos