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)

贡献者指南