VMware Cloud Community
danielmgrinnell
Enthusiast
Enthusiast

Expand VM Disk

Hey all,

I am working on automating Expanding a VM disk and the Datastore it lives on.

Now here is my logical process,

Expand Volume in SAN (Dell Compellent) (currently done manually)

Expand Datastore with newly configured space from LUN

Expand VM Hard Disk ( this is done and automate, but am always up for suggestions!)

Expand Guest OS w/ Invoke-VMScript and DiskPart , but again am always up for suggestions

I thought i would throw this out there while im currently working on this and see what the community thinks.

Thanks all!!

0 Kudos
3 Replies
LucD
Leadership
Leadership

Do you only have Windows-based guest OS on your VMs?

The order of your actions is ok, and how I should do it.

Perhaps action 1 and 2 could be avoided if there is enough free space on the datastore


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
danielmgrinnell
Enthusiast
Enthusiast

Hey lucd,

Yes on Windows so that makes functionaly less work I suppose considering we only have to tackle one os.

on the “datastore” / volume expansion we run one vm for one datastore which is another discussion entirely haha, but I think justifies my requirements for the expand volume, potentials build in a host rescan, pause, and expand new space on datastore.

If we had multiple vms per ds that would eliminate the need for touching the ds as often Thats for sure, but we’re are doing array based replication in some instances and that’s why we have that.

Thanks

0 Kudos
nemoi
Contributor
Contributor

I would split this task to three functions/blocks:

1. SAN related function (vendor specific);

2. Datastore function;

3. VM+VM Guest function. You can use my Get-VMGuestPartition/Expand-VMGuestPartition functions.

Roman Gelman @ps1code
0 Kudos