1 Reply Latest reply on Apr 19, 2012 3:49 AM by slayedbylucifer

    Error connecting to server at 'https://<my-vCenter_hostname>/sdk/webService': Bad hostname

    slayedbylucifer Enthusiast



      This a newby question so must be an easier one for most of you to answer. I am learning perl SDK for vSphere 5. I have written a simple script to get the list of VMs on a perticular datastore. This is the command I run:


      # perl test.pl --server <my_vCenter_hostname> --username <username> --datacenter <datacenter_name>


      but my script fails right in the beginning as below:


      Enter password:
      Error connecting to server at 'https://<my_vCetner>/sdk/webService': Bad hostname
      If I try to access https://<my_vCetner>/sdk/webService, I get a blank page. So Could you help me udnerstand what is going wrong here?
      I am not specifying the whole URL anywhere in the scipt. I am just passing the hostsname of my vCetner as one of hte parameters.
      It is quite evident that this is my 1st perl script in vSphere SDK
      Many thnaks.