2012-04-08 06:44 PM
I would like to create a custom provisioning script for Provisioning Mgr that sets some specific volume options, but I'm having trouble finding any information/documentation on exactly how to do this.
Does the post-provisioning script:
If anyone has an example of a post-provisioning script they would like to share, as well as the syntax which is used in the provisioning policy's post-provisioning command field, it would be greatly appreciated.
2012-04-09 01:34 AM
The post provsioning script specified in the provisioning policy is run from DFM/OnCommand server. There you specify the path as on DFM server.
For rest of the queries could you please share following info:
- OS on which DFM is running?
- How many controllers and datasets you have?
- What kind of volume options you are trying to set?
2012-04-09 06:48 AM
In addition to the other suggestions, I might recommend that you look at our Workflow Automation tool. It is designed to do the things you are looking for and I think you will be impressed with its functionality. There are plenty of samples from which to draw your own workflows.
2012-04-09 09:19 PM
to answer your Qs:
- DFM will be running on a Windows (2003 or 2008) server/vm.
- This will be used for separate environments across multiple customers, so it could be as small as a HA-pair (2 controllers) to 14+ controllers.
- The key one I'm trying to set is snapshot_clone_dependency, but I'm also looking at having a template/structure so that I can use it for other options/values in the future also.
Thanks for your help!
2012-04-10 02:23 AM
Ok here is what I would like to suggest.
For OnCommand/DFM Server running on Windows 2003/2008 going with Data ONTAP PowerShell Toolkit is one of the option. You can follow below steps to create the script that sets the options that you are looking for without need to ssh/rsh to the controller:
1. On Win2k3 install WinRM 2.0 & PowerShell 2.0. In case of Win2k8R2/Win7 it comes pre-installed.
2. Install Data ONTAP PowerShell Toolkit from following location on OC/DFM server:
3. Create a powershell script and save it on DFM server. This script will set the option "snapshot_clone_dependency" on the volume being used for provisioning. Simple PowerShell commands in the script (withput error/exception handling and after successfully connecting to the appropriate controller within the script) would look like:
$vol_name = $ENV:PM_VOLUME_NAME
Set-NaVolOption $vol_name snapshot_clone_dependency on
The volume name is passed to the script as environment variable i.e.$ENV:PM_VOLUME_NAME. You may want to check out other env variables that are avaialble to you inside the script. For detailed list please refer to thread:https://communities.netapp.com/message/52073#52073
Make the script executable.
4. Specify the path to this executable script in the provisioning policy under "Provsisioing Script" tab in NMC or "dfpm policy set provisioning-policy-name-or-id scriptPath=post-provisioning-script-path" command on DFM server.
5. For any specific queryhowtos on PowerShell related issues feel free to reach out to fellow community members on:
Now henceforth whenever the provisioning is done using the policy that has this script defined this script will be executed post-provisioning.