CHAPTER 4 Operations on Virtual Machines
69
RC1
VixVM_RunProgramInGuest
Function Signature
VixHandle
VixVM_RunProgramInGuest(VixHandle vmHandle,
char *guestProgramName,
char *commandLineArgs,
VixRunProgramOptions options,
VixHandle propertyListHandle,
VixEventProc *callbackProc,
void *clientData);
Parameters
Results
VixHandle — A job handle that describes the state of this asynchronous operation.
Notes
• This function runs a program in the guest operating system. The program must
be stored on a file system available to the guest before calling this function.
• You must call VixVM_LoginInGuest() before calling this function.
• If the options parameter is 0, this function will report completion to the job
handle when the program exits in the guest operating system. Alternatively, you
can pass VIX_RUNPROGRAM_RETURN_IMMEDIATELY as the value of the
options parameter, and this function reports completion to the job handle as
soon as the program starts in the guest.
vmHandle Identifies a virtual machine. Call VixVM_Open() to create a virtual
machine handle.
guestProgramName The path name of an executable file on the guest operating system.
commandLineArgs A string to be passed as command line arguments to the executable
identified by guestProgramName.
options Run options for the program. See the notes below.
propertyList Must be VIX_INVALID_HANDLE.
callbackProc A callback function that will be invoked when the power operation is
complete.
clientData A parameter that will be passed to the callbackProc function.