Closed GoogleCodeExporter closed 8 years ago
There's no start_command method in pysphere. I guess you mean "start_process".
VMWare vSphere SDK does not provide sync methods for executing processes in the
guest system. You'll have to implement the logic on your side. I.e. Is a
vSpshere SDK's limitation, not pysphere's
start_command returns the pid of the process started, which you can look in the
list returned by list_processes. If you wish to kill the process you can call
terminate_process.
You might try doing something like:
def start_process_sync(path, args, ...):
pid = vm.start_process(path, args...)
if not pid:
raise Exception("process not started")
while 1:
myproc = [p for p in vm.list_processses() if p['pid'] == pid]
if not myproc or myproc[0]['exit_code'] != None:
return
time.sleep(1)
Original comment by argo...@gmail.com
on 14 Mar 2013 at 12:52
Thank you. I should have researched further. A long day and late night
equates to bad judgement.
Original comment by ctg...@gmail.com
on 14 Mar 2013 at 5:11
Original issue reported on code.google.com by
ctg...@gmail.com
on 14 Mar 2013 at 8:40