VMware Cloud Community
stacycarter
Enthusiast
Enthusiast

Extending Windows 2008 R2 and 2012 R2 disks with PowerCLI 6.0

Regarding the set-harddisk powercli cmdlet:  I see that the -Resizeguestpartition functionality, though it still seems to work when I tested on a 2008 R2 VM, is listed as deprecated.  What option is supposed to be used instead when using this cmdlet on Windows 2008 R2 and 2012 R2?  Here is what I'm currently using to expand the first disk of a VM (successfully expanded the VMDK and guest OS partition during testing):

get-harddisk -vm "nameofVM" | ?{$_.name -eq "Hard disk 1"} | set-harddisk -CapacityGB x -ResizeGuestPartition

Though it worked, here are the warnings I received:

WARNING: The system cannot find the drive specified.

WARNING: Resize guest partition functionality is deprecated and is not

functional on the currently supported guest operating systems. Resizing guest

disks works only on Windows XP Service Pack 3 and Red Had Linux Enterprise 5.

0 Kudos
1 Reply
LucD
Leadership
Leadership

Afaik, the official method for Windows guest OS is with the HelperVM parameter.

Also note that it depends on the version of the Windows guest OS if it will automatically recognise the expanded disk.

See Grow a VMs disk via PowerCLI


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

0 Kudos