Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Copy file from vRO to Guest

$
0
0

Hi chaps,

 

Is it possible to execute a workflow that copies a file (e.g. .exe or .zip) from a vRO Resource Element to a guest?

 

I am using the script from "Copy file from vCO to Guest, but have amended the vcoPath variable from a string to a ResourceElement, uploaded the file as a new resource element and have tried granting additional Edit and Admin rights to the vRO service account. 

 

I see the error "No permissions on the file for the attempted operation (Workflow:Copy file from vRO to guest / Scriptable task (item1)#12)"

************************************

var host = vm.sdkConnection;

 

 

var guestOperationsManager = host.guestOperationsManager;

var guestAuth = new VcNamePasswordAuthentication();

guestAuth.username = vmUsername;

guestAuth.password = vmPassword;

 

 

var fileManager = guestOperationsManager.fileManager;

result = false;

var attr = new VcGuestFileAttributes();

var srcFile = new File(vcoPath);

var uri = fileManager.initiateFileTransferToGuest(vm , guestAuth ,guestFilePath, attr, srcFile.length, overwrite);

result = fileManager.putFile(vcoPath, uri);

 

******************************88

Thanks,


Dan

 

vRO v6.0.3


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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