Cannot get the network settings via parallels python api on OS X El Capitan GM Seed

Discussion in 'Installation and Configuration of Parallels Desktop' started by JustinC3, Sep 24, 2015.

  1. JustinC3

    JustinC3 Bit poster

    Messages:
    1
    Hi.

    Recently I have encountered a problem with the parrallels python api and OS X 10.11 El Capitan (as guest).
    The problem is - I cannot get the network settings via the parallels api.

    Here is the example on python:

    import prlsdkapi

    # Connect to parallels server
    prlsdkapi.init_desktop_sdk()
    server = prlsdkapi.Server()
    server.login_local('', 0, prlsdkapi.prlsdk.consts.PSL_NORMAL_SECURITY).wait()
    vl = server.get_vm_list().wait()


    # Get VM and login to it
    vm = vl.get_param_by_index(0)
    gu = vm.login_in_guest('%login', '%password').wait().get_param()

    # Trying to get the network settings
    print gu.get_network_settings().wait().get_param().get_net_adapter(0).get_net_addresses().get_item(0)

    The last line should print the ip address of the VM.
    Code was tested working on all previous versions of OS X, on Parallels Desktop 10 and 11.
    However, when executing it with OS X 10.11.1 guest, it produces the following error:

    Traceback (most recent call last):
    File "prlstst.py", line 9, in <module>
    gu = vm.login_in_guest('%login', '%password').wait().get_param()
    File "/Users/tester/.env3/testbot/lib/python2.7/site-packages/prlsdkapi/__init__.py", line 582, in wait
    sdk_check_result(self.get_ret_code(), err_obj)
    File "/Users/tester/.env3/testbot/lib/python2.7/site-packages/prlsdkapi/__init__.py", line 67, in sdk_check_result
    raise PrlSDKError, (result, conv_error(result), err_obj)
    prlsdkapi.PrlSDKError: SDK error: 0x80034001: Unable to open new session in this virtual machine. Make sure the latest version of Parallels Tools is installed in this virtual machine and it has finished booting.

    I've tried to reinstall the parallels tools, it didn't help.

    Please help me with any advice on how to get network settings via python parallels api on OS X 10.11.1.
    Thanks in advance!
     
    Last edited: Sep 24, 2015

Share This Page