Using automation with Virtual Machine Clouds
Applies To: Windows Azure Pack
You can use automation in Windows Azure Pack to orchestrate and integrate best-practice tasks to drive down the cost of datacenter operations, while improving the reliability of IT processes. You can integrate Service Management Automation with VM Clouds to trigger runbooks every time a specific event occurred in the VM Clouds infrastructure. The topic Register Service Management Automation for Virtual Machine Clouds provides instructions on how to associate VM Clouds with Service Management Automation. This topic provides instructions on how to associate Service Management Automation runbooks with events occurring in the context of VM Clouds. If you want to understand how VM Clouds integrates with Service Management Automation at an architectural level, see How is Service Provider Foundation associated with Service Management Automation?
Note
For VM Clouds to trigger runbooks in Service Management Automation, the Service Management Automation web service certificate must be trusted on the computer running Service Provider Foundation.
To associate runbooks with events in VM Clouds
From the management portal for administrators, click the VM Clouds tab.
From the VM Clouds tab, click the Automation view.
From the Automation view, from the command bar, click Add, and specify the following:
For Action Category, select a VM Clouds object, an action on which triggers a Runbook. For the list of objects and the descriptions, see Objects that can be associated with runbooks.
For the Action, select the action that must occur on the selected object for a Runbook to be triggered. Depending on the action category that you selected, the list of actions is populated with the available actions.
For Runbook, select the Runbook that is triggered every time the specified action occurs on the selected object.
Note
For a Runbook to be available in this drop-down, it must include the “SPF” tag. For instructions on how to tag Runbooks, see Editing Runbook Properties. If you are using a non-Roman alphabet keyboard, repeat the following steps three times to include the “SPF” tag:
-
Press and hold the ALT key.
-
Press the + key on the number pad.
-
Type the Unicode value 0053 for the letter S.
-
Release the ALT key.
-
Repeat these steps two more times by typing values 0050 (for P) and 0046 (for F).
-
Select the Enable checkbox to enable the association between the object, the action, and the Runbook. This check box can be particularly useful in scenarios where you want the association between the runbooks and events in VM Clouds to come into effect at a later date or time.
Click the check mark to save your changes.
Objects that can be associated with runbooks
In the management portal, when you link an action with a runbook on the Automation tab in Virtual Machine Clouds you must choose the following:
An Action Category, such as an Administrator or Tenant, and can also include all resource providers such as usage and notifications.
Depending on the category you selected, select the Action. This selects the object whose actions, such as being deleted or updated, can be ascertained and associated with a runbook.
A Runbook to associate with the action.
The following sections list the objects and the CRUD (Create, Read, Update, and Delete) operations that trigger actions when accessed by web service calls using HTTPS, or when the tenant or administrator changes the state of an object using the management portal for administrators, management portal for tenants, or System Center 2012 R2 Virtual Machine Manager. For more information on the URLs that access these objects, see Service Management API and Service Provider Foundation URLs.
Subscription object
The subscription object represents a subscription that is created every time a tenant subscribes to a plan. It is triggered by the following actions:
CRUD actions: Create, Update, Delete
State actions: Activate, Suspend
spfVMM.MicrosoftCompute objects
The following table describes the objects accessed with the spfVMM.MicrosoftCompute prefix, and the operations that trigger an action on these objects.
Object |
Description |
CRUD actions |
State actions |
---|---|---|---|
CloudService |
A container for a VMRole. Multiple VM roles can be created under a CloudService.For tenants, a cloud service is created for every VMRole deployed using the management portal for tenants. APIs can create more than one VMRole within any given cloud service, and are not restricted to a one-to-one relationship as required when created by a tenant. |
Create, Update, Delete |
|
VM |
A child virtual machine within a VM role. |
Delete |
Restart, Shutdown, Start, Stop |
VMRole |
A scalable tier for peer VM nodes. |
Create, Update, Delete |
Repair, Scale |
VMRoleVMDisk |
The disks attached to a VMRole. |
Create, Update, Delete |
spfAdmin objects
The following table describes the objects accessed with the spfAdmin prefix, and the operations that trigger an action on these objects.
Object |
Description |
CRUD operation |
State operations |
---|---|---|---|
EventRegistration |
a mapping between an event in the API and the associated automation. |
Create, Update |
|
Role |
A user role that maps to an SSU (self-service user) in VMM. |
Create, Update, Delete |
|
Server |
Any server running Service Provider Foundation. |
Create, Update, Delete |
|
SpfSetting |
A connection string for either a database connection or for a portal endpoint connection to an Operations Manager data warehouse. |
Create, Delete |
|
Stamp |
A logical scale unit for servers and instances of System Center components. Typically a stamp represents one VMM server. |
Create, Update, Delete |
|
Tenant |
A tenant. |
Create, Update, Delete |
|
TrustedIssuer |
A trusted party used for claims-based authentication. |
Create, Delete |
|
VM |
A virtual machine. |
Delete |
Pause, Restart, Resume, Shutdown, Start, Stop |
VMRole |
A virtual machine role. |
Delete |
|
VMRoleGalleryItem |
A gallery item object that encapsulates the template using which multi-node VM tiers can be created. |
Delete |
Publish, Unpublish |
spfVMM objects
The following table describes the objects accessed with the spfVMM prefix, and the operations that trigger an action.
Object |
Description |
CRUD actions |
State actions |
---|---|---|---|
BGPPeer |
The border gateway protocol. |
Create, Delete |
|
HardwareProfile |
The hardware profiles in VMM the define the hardware attributes of a virtual machine. |
Update |
|
Job |
A task in VMM and indicates the status of operation in VMM. |
Update |
|
NATConnection |
A container of NATRule objects. |
Create, Update, Delete |
|
NATRule |
The inbound port-mapping rule for a VM network. |
Create, Delete |
|
RunAsAccount |
The VMM RunAs Account. |
Create, Update, Delete |
|
Service |
A VMM service. |
Create, Update, Delete |
|
ServiceTemplate |
a VMM service template |
Update |
|
StaticIPAddressPool |
A VMM static IP address pool. |
Create, Delete |
|
UserRole |
A VMM user role. A user role can be self-service user, tenant admin, or administrator. This object can be used for applying permissions and scopes. |
Create, Update, Delete |
|
VirtualDiskDrive |
A VMM virtual disk drive. |
Create, Delete |
|
VirtualDVDDrive |
A VMM virtual DVD drive |
Create, Update, Delete |
|
VirtualMachine |
A standalone virtual machine. |
Update, Delete |
|
VirtualNetworkAdapter |
A VMM virtual network adapter (vNIC). |
Create, Update, Delete |
|
VirtualSCSIAdapter |
A VMM virtual SCSI adapter. |
Create, Delete |
|
VMCheckPoint |
A VMM checkpoint |
Create, Update, Delete |
|
VMNetwork |
A VM network or a virtual network. A virtual machine is connected to a VM network using a virtual network adapter (vNIC). |
Update, Delete |
|
VMNetworkGateway |
a VMM network gateway. A gateway allows border gateway protocol, NAT, and VPN to be configured on a VM network. |
Create, Update, Delete |
|
VMSubnet |
a VM subnet and defines subnet ranges within a VM network |
Create, Delete |
|
VMtempalte |
A VMM virtual machine template used to create virtual machines. |
Update |
|
VPNConnection |
A VMM VPN connection. This is mapped to the site-to-site VPN connection in the portal. It allows virtual machines on a VM network to connect remotely to another site. |
Create, Update, Delete |
|
VPNetworkRoute |
A VMM VPN network route. Routes allow virtual machines on a VM network to be able to locate other computers on the remote network on the other end of the VPN connection. |
Create, Delete |