vmware/pyvmomi-community-samples

Sample: login to guest example

Open

#44 建立於 2014年5月30日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Python (972 star) (914 fork)batch import
help wantedin progresssample request

描述

Create some simple sample that addresses requests like https://github.com/vmware/pyvmomi/issues/22

And formalizes...

# executes /bin/touch /tmp/hello.txt
cmdspec = pyVmomi.vim.vm.guest.ProcessManager.ProgramSpec(arguments='/tmp/hello.txt', programPath='/bin/touch')

# cmdoutput returns a pid
cmdoutput = si.content.guestOperationsManager.processManager.StartProgramInGuest(vm=vm, auth=creds, spec=cmdspec)

貢獻者指南