VMware Aria Automation Orchestrator

 View Only
  • 1.  Upload file to vCenter through vRO

    Posted 18 days ago

    Hello,

    I'm looking for a way to upload a file from vRO to a vCenter datastore or a content library. Specifically, is it possible to upload the file to vRO first and then transfer it to the vCenter datastore?

    I attempted to use an input of type MimeAttachment, but the process is extremely slow and fails for larger files, such as a 2GB ISO. Is there an alternative approach to achieve this upload through vRO without relying on a web server and transferring via API to vCenter ( datastore or content library )?

    I would greatly appreciate any guidance on this.

    Thank you!



  • 2.  RE: Upload file to vCenter through vRO

    Posted 18 days ago

    Hi,

    let me take a look. I'll update you as soon as possible. 



    ------------------------------
    If you find the answer helpful, please click on the RECOMMEND button.

    Please visit my blog to get more information: https://www.clouddepth.com
    ------------------------------



  • 3.  RE: Upload file to vCenter through vRO

    Posted 17 days ago

    Hi,

    so, a few things. For my opinion, there are two options I can think of:

    1. Use Generic Element called "File Upload". The problem is that it's limited to 768Kb file size. Therefore, not solving your problem.

    2. Utilize the "FileManager.uploadFileToDatastore" vRO API. This API has a property called "srcFilePath". For example, the file can be copied to the temp dir. The proper path can be found by running `System.log(System.getTempDirectory())`. Usually, it is `/usr/lib/vco/app-server/temp`.

    There is some configuration required to make this path to be writable.

    Unfortunately, there's no straightforward way to upload a file to vRO. Additionally, due to the size limit, it's not feasible to use the File Upload browser feature. If I were to require such a task, I would proceed as follows:

    1. Upload files to the remote share.

    2. Create a custom form with a dropdown that dynamically queries the share and displays all the files available there.

    3. Select the file from the dropdown, construct the path and use the "SCP" command to copy it from the share to the vRO file system (built-in vRO workflow "SCP get command" can be used).

    4. After the file is copied, use "FileManager.uploadFileToDatastore" to upload it to the destination datastore.

    Sorry, I can't be more helpful. I hope you find it useful anyway!



    ------------------------------
    If you find the answer helpful, please click on the RECOMMEND button.

    Please visit my blog to get more information: https://www.clouddepth.com
    ------------------------------



  • 4.  RE: Upload file to vCenter through vRO

    Posted 16 days ago

    Hello,

    The initial plan was to use a MimeAttachment input in vRO to upload a file, which would then be saved to the vRO server at the following path: /usr/lib/vco/app-server/temp, as you mentioned.

    This approach worked fine for files under 30 MB. However, for ISO files required for VM provisioning-which are typically 1-2 GB or larger-this method is not practical.

    Step 1: Use MimeAttachment to upload the file to vRO.
    Step 2: Utilize the built-in workflow "Upload file to datastore" to transfer the ISO from vRO to a vCenter datastore. This works as expected for smaller files.

    The challenge is finding a solution for uploading larger files. Ideally, the process should still involve vRO, as the goal is to keep the workflow user-friendly. The user would open the workflow, upload the file, and in the background, the system would handle the transfer to a Datastore or Content Library.

    I want to avoid relying on an additional web server to serve as a temporary repository for Step 1. However, if no other viable option is available, I may have to consider this approach.

    Thanks,
    Catalin




  • 5.  RE: Upload file to vCenter through vRO

    Posted 16 days ago

    Hey there,

    Unfortunately, vRO isn't really built for this kind of use case. It's an orchestrator, not a file server. At least not for now.

    I can't think of any other solution. I think the main reason is that VMware has developed a Content Library for managing VMs, ISOs, images, and VM templates. So, the image should already be in the CL before vRO can use it. I'm using Hashicorp Packer to manage VM templates and store them in the CL. Then, I'm using vRO to deploy the VM from the CL. This works perfectly in all my use cases. I think VMware is thinking the same way. So, if you try to bypass this logic, any homemade solution will probably be a bit messy.



    ------------------------------
    If you find the answer helpful, please click on the RECOMMEND button.

    Please visit my blog to get more information: https://www.clouddepth.com
    ------------------------------



  • 6.  RE: Upload file to vCenter through vRO

    Posted 17 days ago

    Hi

    Did you try workflow located workflows/Library/vCenter/Datastore and Files/Upload file to datastore?

    Source file should be located on vRO local disk. Not on your workstation.




  • 7.  RE: Upload file to vCenter through vRO

    Posted 15 days ago

    I think this workflow will work or the underlying code in the action might be a good starting point.  If your files are on a network share I think you can set source file something like this:

    source_file_path = "\\\\network_share\\path\\to\\file.iso"



  • 8.  RE: Upload file to vCenter through vRO

    Posted 15 days ago

    If you need to shuttle files around the ssh plugin may work for you or you can setup an assistant linux and/or windows vm to assist with pedestrian tasks like copying files around.  I've made use of what I call "scripting hosts" to glue some things together over the years.  We don't rely on them heavily but its a nice option to have at your disposal.