vmware/pyvmomi-community-samples

Sample: login to guest example

Open

#44 opened on May 30, 2014

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Python (972 stars) (914 forks)batch import
help wantedin progresssample request

Description

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)

Contributor guide