Link to home
Start Free TrialLog in
Avatar of Robert Perez-Corona
Robert Perez-CoronaFlag for United States of America

asked on

Is there a way to dynamically expand a Windows volume after growing vmdk size in VmWare?

I usually have to go back into windows and expand the drive.

Is there a way for windows server to dynamically expand the volume(assuming 1 vmdk per volume) when I expand the drive in vmware?
Avatar of Philip Elder
Philip Elder
Flag of Canada image

No. We have the same "problem" for our Hyper-V VMs when we expend their VHDX file(s).

One must use either PowerShell or Disk Management to expand the partition once the virtual hard disk has been expanded.

Now, that being said, I'm not familiar with the VMware side of things. Is there an ability to fire a script off post VMDK expansion? If yes, then that's where one could drop in a PowerShell step to expand that partition.
Avatar of Robert Perez-Corona

ASKER

Thank you for the feedback.

I can imagine a PowerShell script to expand the drive. But to Philip’s point, is there in a fact a way to trigger the script post vmdk expansion?

Otherwise, I guess simply manually running the script will do.
i found this:

$MaxSize = (Get-PartitionSupportedSize -DriveLetter c).sizeMax

Resize-Partition -DriveLetter c -Size $MaxSize

Open in new window


^source: https://social.technet.microsoft.com/Forums/Lync/en-US/4c7e7187-9ee7-47e0-b81b-c9d8b9138c69/expand-disk-using-powershell?forum=ITCG
--

Is this what you are referring to when you say, script it?
You create a script to complete the entire process,

1. Expand the VMDK.
2. Expand the OS Partition.
Are you implying that the entire process can be automated. Or do i have to have one script to expand vmdk and another to expand the os partition?

I am trying to fathom how to integrate.

Thank you, Andrew.

Robert.
The entire process could be automated if desired.
ok, ok. Can you elaborate on how or what should I be using to facilitate this process?

Best

Robert.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Wow! That looks great. I will play around with that.

Cheers