Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

Failing while trying to execute VixVM_RunProgramInGuest

$
0
0

Failing while trying to execute VixVM_RunProgramInGuest. Please let me know if it is not right way to run program. If I remove argument argv[2]; It works; so something is wrong the way I am passing argument to program; please help ....

 

I am using Linux host server.

 

Here is the code

 

err = VIX_OK;

Vix_ReleaseHandle(jobHandle);

jobHandle = VIX_INVALID_HANDLE;

 

 

jobHandle = VixVM_RunProgramInGuest(vmHandle,

                                    "/local/sys/scripts/updateHosts.sh argv[2]",

                                    "",

                                    0, // options,

                                    VIX_INVALID_HANDLE, // propertyListHandle,

                                    NULL, // callbackProc,

                                    NULL); // clientData

 

err = VixJob_Wait(jobHandle, VIX_PROPERTY_NONE);

 

if (VIX_OK != err) {

   printf("Could not update hosts file %s \n");  

   // Handle the error...

   goto abort;

}


Viewing all articles
Browse latest Browse all 34639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>