One of the things you will often find you need to do with vRO is to get a file to a guest VM, or just run a file from inside the VM. Now for Windows you can use Powershell remote features in many cases, but what if your server isn’t on the network yet? Until version 5.1 we had to rely on VIX as a way to do this, but now VMware has added a number of new workflows under “Guest Operations” which are much more reliable.
“Copy file from vCO to guest” is the one I’m going to be using in this example.
First of all copy the workflow into a sandbox area. This way you can move a bunch of the inputs to attributes and not have to key them in each time (e.g. The local administrator username, password, and test VM).
In my example, I’m going to create a text file called test.txt in a new folder under /opt called “vcofiles”.
My target machine is a Windows 2008 R2 server, where I will copy the file and place it in the C:\temp\ folder with the name “testcopy.txt”
If you run the workflow then these are my input parameters:
The problem is that if you run this you will get an error similar to this:
“No permissions on the file for the attempted operation (Workflow: Copying files from vCO appliance to guest/Scriptable task…”
In order to fix this you first need to give the correct rights to the folder and file on your vCO Appliance.
1. Login as root onto the appliance
2. Give Read/Write/Execution rights to the new folder
3. Give Read/Write rights to the Text file you made
Unfortunately we aren’t quite done yet. You also need to tell orchestrator which locations it can read/write/execute from. This involves editing the “js-io-rights.conf” file located in “/opt/vmo/app-server/server/vmo/conf”
Add the line “+rwx /opt/vcofiles/” as shown above.
If anyone isn’t too sure on the linux commands to do this:
- Type “cd /opt/vmo/app-server/server/vmo/conf” and press enter.
- Type “vi js-io.rights.conf” and press enter.
- Use the arrow keys to move the cursor where you want and press the insert key
- Press Enter and type in the line “+rwx /opt/vcofiles”
- Press ESC
- Type “:wq” and press enter.
4. Now, there’s one more thing. You need to restart the vCO service for this to take effect.
Login to the vCO configuration manager, go to startup, and click restart service.
5. Now run your workflow and see if your text file copied across.
You can see a quick video demo of this on youtube. (apologies for the mouse pointer issue..)
Thanks for reading. Let me know if you have any questions.