VMware Cloud Community
rogermccarrick
Contributor
Contributor

Resize C drive in Win2008 VM

ESXi 3.0

I've done this before in 2008 VMs and it worked.

Go to VM settings, resize the C drive from 20GB to 30GB.

Go into the OS, look at Disk Management and you can see the 10GB unallocated.

In Diskpart, list volume, select volume and extend.

This usually works.

But in this one it shows the C drive as 30GB in Disk management, this is good, but 20GB in Windows Explorer, this is not good.

I've rebooted, defrag, tried Diskpart extend again and it says already extended.

I use WMI vbs scripts to get info on disk size and disk usage, and that says 20GB also.

I also ran a checkdisk at startup, no change.

Anyone ever see this before?

0 Kudos
12 Replies
AntonVZhbankov
Immortal
Immortal

Have you tried Dell ExtPart? Free utility, 36 kB size.


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
rogermccarrick
Contributor
Contributor

I'm not sure what I can d with Extpart.

In Disk management it shows the whole 30GB allocated to the C drive.

So there is no unallocated space for extpart to work on.

I could say "extpart c: 10240" but I suspect I'll get an error. It's a production machine so I don't wanna try now.

I tried it on my local PC and got this expected error.

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

0 Kudos
AntonVZhbankov
Immortal
Immortal

Very strange problem.

Can you please provide some screenshots?


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
gunnarwb
Contributor
Contributor

For $500 you can get acronis and never deal with a diskpart problem again.

0 Kudos
rogermccarrick
Contributor
Contributor

Yes .. here are the screen shots of explorer, disk management and the VM settings

0 Kudos
gunnarwb
Contributor
Contributor

What does your Datastore say the size of the VMDK is? (Screenshot)

0 Kudos
rogermccarrick
Contributor
Contributor

Says 20GB , 21,012,740 kb

0 Kudos
gunnarwb
Contributor
Contributor

Pretty sure that is your problem. You are running an older version of ESX which doesn't automatically resize that file. The file needs to be resized to 30GB.

0 Kudos
gunnarwb
Contributor
Contributor

Check out this article it might help, I'm trying to find a better one but I think this article should be good enough.

http://knmi.wordpress.com/2008/03/20/best-practices-of-resizing-windows-virtual-machine-disks-on-vmw...

0 Kudos
BenConrad
Expert
Expert

No sure why it's not working. Have you tried the GParted bootable ISO?

Ben

0 Kudos
rogermccarrick
Contributor
Contributor

Ok folks here's how I fixed it.

VMWare tools are installed on the server.

I went into computer management, right clicked on disk 0 which is the C drive and selected Shrink.

It says it can shrink it by 800mb to 2800 and something in size.

I hit ok and it took a few nervous minutes.

Finally it left me with a 19.18 GB C drive and a 10.82 unallocated block.

I went into diskpart, list volume, select volume 1, extend and low and behold my C drive is now 30GB both in DM and Windows explorer.

I had shut the machine down first and cloned it. Discovered this on the clone and then quickly did it on the production machine, so sorry I have no screen shots.

Thnaks.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

Moved to Virtual Machine and Guest OS forum.

Best way is to use VMware Converter to resize the disk + partitions.


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
0 Kudos