VMware Cloud Community
DanielThomson
Enthusiast
Enthusiast
Jump to solution

vCloud API errors - GetResponse" with "0" argument(s): "The remote server returned an error: (400) Bad Request

I am running a portion of a script to increase the allocated resources to certain VM's within a vCloud vApp. The script does successfully complete sometimes and then errors other times - although it does seem to be more prone to error once the vApp is powered on.

This is the error I get:

ERROR: Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (400) Bad Request."

  1. MainForm.psf (2478, 2): ERROR: At Line: 2478 char: 2

ERROR: +         $RAMresponse = $RAMrequest.GetResponse()

ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I have attached the portion of the script I have pieced together. I have included the IF statement within the function as it appears as though the error may be due to a task still being in progress on the VM?



0 Kudos
1 Solution

Accepted Solutions
DanielThomson
Enthusiast
Enthusiast
Jump to solution

Managed to do this using $vmHardware = $CIVM.ExtensionData.GetVirtualHardwareSection() and then pushing the updates through using $vmHardware.UpdateServerdata() and this seems to work more consistently.

View solution in original post

0 Kudos
1 Reply
DanielThomson
Enthusiast
Enthusiast
Jump to solution

Managed to do this using $vmHardware = $CIVM.ExtensionData.GetVirtualHardwareSection() and then pushing the updates through using $vmHardware.UpdateServerdata() and this seems to work more consistently.

0 Kudos