The Aria Orchestrator 8.X workflow: 'Copy file from VCO to Guest' does not work
hence, unable to copy file from Aria Orchestrator to Guest VM on vCenter
Below are Symptoms:
Error: Cannot Copy
OR:
Error: Unable to find file
OR:
The Workflow will run successfully but file does not get copy
This Workflow helps is copying file from Aria Orchestrator to Guest VMs on vCenter. File can be any file with any extension. So. this helps in copying scripts as well to the VM which helps for Automation.
Note: This Workflow will copy files ONLY and not directories/folders
Incorrect File Path provided in the Aria Orchestartor 8.X Workflow: "Copy file from VCO to Guest"
Note: One of the important requirement is to ensure that VMTools is UP and Running on the Guest VM, else 'Copy file from VCO to Guest' will fail.
FYI, To make workflow to work, first we need to copy the file to Aria Orchestrator Container and from there copy to Guest VM
Below are sequences of executions and checks:
Step 1. Make sure the vCenter (where the VM/Guest is on which we want copy file) is already added into Aria Orchestrator. If the vCenter is not added run the workflow: "Add vCenter Instance"
Step 2. SSH to Aria Orchestrator using "root", if its embedded, logon to Aria Automation
Step 3. Get the Aria Orchestrator Container ID by the command: docker ps -a | grep k8s_vco-server-app_vco-app
Step 4. Run command: kubectl -n prelude get pods. If the environment is HA there will be three Aria Orchestrator Containers. Check which container matches the name which we got in Step 3.
For ex:
vco-app-5d8596XXX-4zqXX -- Highlighted part to be matched in Step 3
vco-app-5d8596XXX-bn5XX
vco-app-5d8596XXX-l4sXX
By now we should have the ContainerID (From Step 3) and Actual Container (From Step 4, where the file will be copied to the container and then it will be copied to guest VM)
Step 5. Logon to the container by the command below:
kubectl -n prelude exec -it vco-app-5d8596XXX-4zqXX -c vco-server-app -- bash
Step 6. Perform below steps in the Aria Orchestrator container.
a) In the container navigate to the directory: /run/vco/opt/vcofiles by the command below:
cd /run/vco/opt/vcofiles
b) If the 'opt/vcofiles' is not found, we can manually create the same using mkdir
For that do the steps below:
-cd /run/vco
-mkdir opt
-cd /run/vco/opt
-mkdir vcofiles
-Now the complete path becomes : /run/vco/opt/vcofiles
C) Copy the file (any file of any extension) from Aria Orchestrator Host to container by the command below :
docker cp /source/file ContianerID:/run/vco/opt/vcofiles/filenamewithextension
For Ex: docker cp /home/root/file.txt ab49eeXXXXX:/run/vco/opt/vcofiles/works.txt (Here, file.txt is getting copied as works.txt, however, you can give same name or any name)
d) Once this is done, go to the Workflow : "Copy file from VCO to Guest"
e) Here, VM/ Guest can be fetched from the vCenter registered within Aria Orchestrator.
f) Then, VCO file path is : /run/vco/opt/vcofiles/works.txt (provide the file to be copied, here it is works.txt)
g) Give right path on the guest.
For Ex: for Windows the path is: c:\Users\Administrator\Desktop\username\p1.txt (File name by which the file will be copied)
h) Run the workflow