VMware Cloud Community
aryan14in
Enthusiast
Enthusiast

get-vmhost error "Client found response content type of '', but expected 'text/xml'"

Getting below error while running get-vmhost. any idea?

PowerCLI C:\Windows\system32> Get-VMHost |fl
Get-VMHost : 1/30/2013 2:10:35 PM    Get-VMHost        Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
At line:1 char:11
+ Get-VMHost <<<<  |fl
    + CategoryInfo          : NotSpecified: (:) [Get-VMHost], ViError
    + FullyQualifiedErrorId : Client20_QueryServiceImpl_RetrievePropertiesEx_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost

0 Kudos
5 Replies
LucD
Leadership
Leadership

Could you tell us which versions (vSphere/ESXi/PowerCLI/PowerShell) you are using ?

And on which platform (OS and 32/64-bit) you ran this ?


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

0 Kudos
aryan14in
Enthusiast
Enthusiast

PowerCli5.1

Win7,  32bit

0 Kudos
LucD
Leadership
Leadership

Did your Connect-VIServer complete successfully ?

You can check if there is a connection by displaying

$defaultVIServers


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

0 Kudos
Sfet
Contributor
Contributor

This is a SOAP issue that .net developers experience sometimes.

Possibly a proxy causing this or the URL is wrong for the SOAP call?

0 Kudos
aryan14in
Enthusiast
Enthusiast

I have seen this issue when i install vCloud Director PowerCli along with vSphere PowerCli. i uninstalled cloud stuff and it is working fine since then..

Also looks like powercli 5.1 is more prone to this than 5.0

0 Kudos