Hi all,
how canincrease HardDisk on a VM which is running on vCloud Director 6.7 via PowerCLI?
I guess the VMs HardDisk is based on a VMDK file, like on (vCenter) ESXi Hosts?
I can see the HardDisk Size and the VirtualQuantity here:
(Get-CIVM TestEB01).ExtensionData.getvirtualhardwaresection().Item | Where { $_.Description -like “Hard Disk”}
But i do not know how to increase the size?
Did you already try this one?
Hot Modify disks in vCloud Director using PowerCLI | v-apprentice
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
thanks for the answer.
Now i get an error:
("165000" = new Disk Size)
Exception calling "UpdateServerData" with "0" argument(s): "The reference 165000 cannot be parsed correctly. Reason: no server authority"
At line:17 char:1
+ ($vm.ExtensionData.Section|where {$_-is[VMware.VimAutomation.Cloud.Vi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CloudException
What is "#text" ?
Do I have to replace it with a value or something?
#Modify the extension data with the new size
(($vm.ExtensionData.Section|where {$_-is [VMware.VimAutomation.Cloud.Views.OvfVirtualHardwareSection]}).item|where {$_.ResourceType.value-eq17}).hostresource[0].AnyAttr[0]."#text" = $newsize