Getting error while logging in to guest VM using pysphere

588 views Asked by At

I have vCenter 5.5 and ESXi host is 5.1 But I am getting the following error while logging in to guest VM.I have also updated vmware tools

    import sys
    from  pysphere import VIServer
    s=VIServer()
    s.connect("X.X.X.X","[email protected]","xxxxxxxxx"
    vm=s.get_vm_by_name('vmware_vm')
    vm.login_in_guest('admin', 'Admin123')

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/lib/python3.4/site-packages/pysphere/vi_virtual_machine.py", line 1027, in login_in_guest
        self.__validate_authentication(auth)
      File "/lib/python3.4/site-packages/pysphere/vi_virtual_machine.py", line 1706, in __validate_authentication
        raise VIApiException(e)
    pysphere.resources.vi_exception.VIApiException: [GuestOperationsUnavailableFault]: The guest operations agent could not be contacted.
2

There are 2 answers

0
aleos123 On

I also had the same problem. Installing vm_tools on vm helped.

0
saurabh On

install the vmware tools on your virtual machine.