VMware Cloud Community
EloHHH
Enthusiast
Enthusiast

HTTP response with status code 524 and no content (enable debug logging for details) - PowerCLI

Hi,

I'm trying to create a VM by cloning an OVF template inside vCenter through PowerCLI:

New-VM -name "newvm" -ContentLibraryItem $item -OvfConfiguration $confi -VMHost $VMHost -datastore $Datastore 

This starts to deploy, Since the template size is 25GB, it may take 5-6 minutes to complete. But after 120 seconds, PowerCLI gives an error as below and stops the script. Meanwhile, the cloning is still ongoing on vCenter and completes successfully after 5-6 minutes:

New-VM: 8/4/2022 5:04:14 PM     New-VM          HTTP response with status code 524 and no content (enable debug logging for details) 


Does anyone know why this happens?
Also, how can I enable the debug on this command for more details?

Thanks

 

0 Kudos
7 Replies
LucD
Leadership
Leadership

The "HTTP response with status code 524 and no content (enable debug logging for details)" is the message the PowerCLI cmdlet receives from the HTTP NFC protocol, and is not referring to the PowerCLI cmdlet.
The "debug" can be enabled on the VCSA Logging settings and the generated debug messages can be found in the vpxd log.

The default timeout used by the HTTP NFC protocol is indeed 120 seconds.
Unfortunately, the PowerCLI cmdlet, that implicitly uses this protocol, doesn't seem to extend the lease (as is advised in the API SDK User Guide).
Hence the error.

I suggest opening an SR since this is definitely a bug in the PowerCLI cmdlet.


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

0 Kudos
EloHHH
Enthusiast
Enthusiast

Thanks for info.
Can you share me a direct link for this (as is advised in the API SDK User Guide), please?

So, no solution to increase this time at the moment!
Is there any way to ignore this error and prevent the script break? Like putting a sleep there and waiting until the process gets completed!
Because it gives the error and breaks/stops the script after 120sec!

 

 

0 Kudos
LucD
Leadership
Leadership

You can find more info in the HttpNFCLease section of the API Reference.
And in the Programming Guide in the Importing an OVF Package section.

Since this happens in the underlying API method, there is no PowerShell way to avoid this timeout.
The only solution would be to call the API methods yourself in your script


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

0 Kudos
EloHHH
Enthusiast
Enthusiast

Thanks, would you please explain a little bit about the API method? That how I can create a VM from OVF like this?

New-VM -name "newvm" -ContentLibraryItem $item -OvfConfiguration $confi -VMHost $VMHost -datastore $Datastore 


I could not find anything related to this in API:
https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/api/vcenter/vm/post/

Please advise.

0 Kudos
LucD
Leadership
Leadership

Since you seem to know this, how do you extend the timeout?


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

0 Kudos
Macleud
Enthusiast
Enthusiast

I don't know this error.

Perhaps you need to reinstall PowerCLI (you can try another version)?

Found only this. But this doesn't seem to be the solution.

https://vdc-download.vmware.com/vmwb-repository/dcr-public/ae1a858c-2f59-4a75-b333-f2ddfa631fbd/4ae5... 

There is also a setting, but it seems to be for datastores.

 

 

 

esxcfg-advcfg -s <Timeout> /NFS/SetAttrRPCTimeout

 

 

 

 

0 Kudos