In our earlier post we showed you how to extend the EBS volume of EC2 instances from AWS and OS end. Today we are going to provide you a similar PowerShell script to extend the VM disk from Vcenter as well as from the OS level with a single click.
As we use the VM, it gets filled with data and will require us to extend the drive. It becomes complex to get which disk to extend from Vcenter when there is more than one Disk with the same capacity.
This script solves that problem by matching the SCSI controller and extending the correct disk.
It asks for the VM Name, Drive letter, and the amount of disk to be increased as input and does the extension from Vcenter as well as from the OS end.
Please find the complete script below and experience the magic of PowerShell.
This Script will also check and warn you if the snapshot exists for the VM and makes sure that your datastore capacity will not reduce to less than 20% after extending the drive to the requested amount.
0 comments:
Post a Comment