Quantcast
Channel: VMware Communities : Blog List - All Communities
Viewing all articles
Browse latest Browse all 3135

Script to copy App Volumes AppStacks to another datastore

$
0
0

Like most IT guys i like to reduce the amount of repeating work where possible.
At a customer we build a VDI/Workspace One staging environment where VDI/RDS templates are build, tested and updated. Also all VMware App Volumes AppStacks are created on this platform.
When the AppStacks are ready for production you want to be able to copy these to the Production storage for App Volumes. For this, there is no proper solution.. Either stack those AppStacks again or get them transported with the fling and Veeam. Both of these solutions are time consuming and try explaining this to the support staff.

To make life more easy, I wrote a PowerShell script to properly copy App Volumes AppStacks and it’s metadata from the source datastore to any (shared) datastore.
Yes this includes from VSAN! Where you needed to fling and Veeam before to get your AppStacks to your production environment.
Manually copying these files via SSH is an option but time consuming. Copying the AppStacks from a VSAN via the Datastore browser will even end you up with CrapStacks (Broken AppStacks because something with a .flat file and some VSAN headers that are missing)

The template script i wrote can be downloaded below and requires VMware PowerCLI.
Changelog:
#v1 Added metadata copy option (Download)
#v2 merged metadata copy with AppStack copy. (Download)

#1. Change vCenter Address and account. (can be multiple vCenter but untested)
#2. Change paths to your source and target datastores. (Source staging App Volumes Datastore and target Production Datastore)
#3. No Support, know what you are doing and change whatever you like to suit your needs.

Current options build in:

“Press ‘1’ To Connect to Staging vCenter.” (Connect to source vCenter)
“Press ‘2’ To List AppStacks Staging.” (List current AppStacks on source datastore)
“Press ‘3’ To List AppStacks Production.” (List current AppStacks on destination datastore)
“Press ‘4’ To Copy AppStacks to Production.” (Copy AppStacks and matching metadata to destination datastore)
“Press ‘5’ To Copy AppStack Metadata to Production.” (Copy Metadata to destination datastore)
“Press ‘6’ To Backup AppStacks.” (Copy all AppStacks to a backup datastore, be aware no metadata is copied along. working on this)
“Press ‘Q’ To Quit.”

After Copying your AppStacks and Metadata to the target datastore import them on your production App Volumes Manager.
Presto, Your AppStacks are now available on your Productions environment with the corresponding metadata! No legacy status 

Source: Script to copy App Volumes AppStacks to another datastore - vDrone


Viewing all articles
Browse latest Browse all 3135

Trending Articles



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