pythonpython-2.7python-requestsvmwarevmware-tools

How can use VixVM_RunProgramInGuest vix library in python?


Hi I want use RunProgramInGuest function in python for running application in vm_ware workstation but I can't Because I don't know the reference. I want the simple code for the function thanks in advance.


Solution

  • You might find vix useful (can be found @ https://github.com/naim94a/vix or with pip install vix). This library wraps the VIX API in a safe way (RAII) and is object oriented.

    import vix
    
    host = vix.VixHost()
    host.connect()
    
    vm = host.open_vm("C:\\Virtual Machines\\MyVM.vmx")
    vm.login(username="GuestUserName", password="GuestPassword")
    
    vm.proc_run("C:\\GuestExecutable.exe")
    

    Of course, if you would like to wrap the calls yourself the official documentation can be found here: https://www.vmware.com/support/developer/vix-api/vix115_reference/index2.html