RoyalFlash
Contributor
Contributor

How to increase HardDisk on a VM which is running on vCloud Director 6.7 via PowerCLI?

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?

0 Kudos
2 Replies
LucD
Leadership
Leadership

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

0 Kudos
RoyalFlash
Contributor
Contributor

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

 

0 Kudos