Create a Custom Button in UCS Director
July 27, 2015Cisco UCS Director gives us some great automation and orchestration capabilities in the product. One thing I’ve noticed though is the need to customize the actions that can performed on virtual machines after deployment (Sometimes called Day 2 Operations). This post explains how to make some custom buttons for end users to manage their workloads more effectively.
Create Workflow
Creating a workflow is out of the scope of this post, but we need to have a workflow to use for our examples. I’ve created a very simple workflow to create a VM Snapshot and email the user when it happens. To create your own workflow Go to Policies –> Orchestration –> Workflows to get started.
Remove Default Buttons
There is a specific set of default buttons that are available out of the box. We can enable or disable these buttons in the “End User Policy.”
Go to Policies –> Virtual/Hypervisor Policies –> Service Delivery –> End User Self-Service Policy. Select or unselect the actions you need. In this case I’ve removed them to clean up the GUI.
Create Custom User Action
Now we’re going to create the button. To do this we create a User Action Policy.
Go to Policies –> Orchestration –> User VM Action Policy and create a new policy. Give the policy a name and select the number of actions that will be part of the policy. A single policy can have multiple actions (or buttons) associate with it. In this case I’ve only picked one action.
Under the VM Actions, give it a name. The name will be the name of the button that is displayed to the end user. Select the workflow we created earlier.
Modify VDC
Now we modify our VDC to include the new User Action Policy.
Go to Policies –> Virtual/HyperVisor Policies –> Virtual Data Centers
User Catalog
Once all of the configuration settings have been done we can login to the UCS Director Portal as an end user. Select a VM that we’ve provisioned and our new button should show up. Notice that there is a “*” next to the button to show that its a custom button. If you’re wondering where the icon comes from well that is a bit of a mystery. Depending on the name you use, the button will look differently. If the name has “Add” in it then the icon is a plus sign, if it’s got “Delete” in it there is a red X for an icon.
[…] to add new day 2 operations to an object. I’ve written about this in the past where you can add a custom workflow to a virtual machine once it’s been deployed. This could be an action to snapshot a virtual machine, add it to […]
I need some examples on VM provisioning, specifically INPUTs, how to create new workflow for VM provision, what inputs i should define ?
Create a new workflow and add the VM Provisioning tasks. Try this workflow as a template and see if that gets you started. https://communities.cisco.com/docs/DOC-62365