Manage tenant costs for Windows Azure Pack

 

Applies To: Windows Azure Pack

This topic describes how to set up Windows Azure Pack for Windows Server to import usage data from an Operations Manager data warehouse database into a Windows Azure Pack database.

For a discussion about a chargeback technical scenario, see Guide to Recovering Costs for Virtual Machines.

Prerequisites

Assuming you have installed Service Provider Foundation (in System Center 2012 R2 Orchestrator), System Center 2012 R2 Virtual Machine Manager, and Windows Azure Pack, you must have the following environment:

  • Registered the Service Provider Foundation endpoint.

  • Administered virtual machine clouds, created plans, and have tenants subscribed to them.

  • Set up a server running System Center 2012 R2 Operations Manager with a data warehouse.

  • Set up a server running Microsoft SQL Server with Analysis services. You can use the same SQL Server installation as used for Service Provider Foundation and VMM.

  • Installed the agent for Operations Manager on the server running System Center 2012 R2 Virtual Machine Manager, and also on the server running Hyper-v that manages the VMM server.

As an example, the environment would have the following servers and names on the Contoso domain:

Server

Example name

Operations Manager

OM01.contoso.com

Operations Manager data warehouse

DB04.contoso.com

Virtual Machine Manager

VMM01.contoso.com

Service Provider Foundation 

SPF01.contoso.com

Windows Azure Pack

WAP01.contoso.com (and possibly WAP02 and other servers depending on the deployment scenario)

Service Reporting (optional)

VMM01.contoso.com

Service Reporting database (optional)

DB06.contoso.com

SharePoint (optional)

SP01.contoso.com

Set up data extraction from the Operations Manager data warehouse

You can use Windows PowerShell to specify where Service Provider Foundation needs extract data.

To configure Service Provider Foundation for usage metering

  1. Logon as Administrator to the server running Service Provider Foundation.

  2. In the IIS Manager Console, verify that the identity for the SPF_Usage application pool is the domain credentials account for the Service Provider Foundation server. The identity should appear as the <domain>\<server> format, such as CONTOSO\SPF. For more information about credentials in Service Provider Foundation, see Credentials checklist.

  3. In Server Manager, choose Local Server and from the menu bar choose Tools->Computer Management. In the Computer Management Console select Local Users and Groups.

  4. Verify that the user you will use to query Service Provider Foundation for data from Windows Azure Pack is member of the local SPF_Usage users group. The following code example uses the "SPF Application Identity" user. You can use any user provided that it is a member of the SPF_Usage users group.

  5. Open PowerShell console with administrative privilege

  6. Set the OMDW connection settings by using the New-SCSPFSetting command, using the parameters as described in the following table:

    New-SCSPFSetting Parameter

    Value

    Value

    Required. Must be a database connection string.

    SettingType

    Required. Must be DatabaseConnectionString.

    Name

    Optional. This setting is recommended. Specify a meaningful name for each setting.

    Server

    Associates the setting with the sever from which usage metering is to be obtained. Must be a server object obtained from the Get-SCSPFServer cmdlet.

    Here's an example, substitute your own values:

    Import-module spfadmin
    # Provide server name to the OM DW SQL instance
    $OMServer = "OM01.contoso.com"
    
    # Register the Operation Manager Data Warehouse instance to usage metering
    $stamp = Get-SCSPFStamp
    $server = New-SCSPFServer -Name $OMServer -ServerType OMDW -Stamps $stamp[0] 
    
    $setting = New-SCSPFSetting -Name $OMDWSqlServer –Value "Data Source=$OMDWSqlServer;Initial Catalog=OperationsManagerDW;Integrated Security=True" -SettingType DatabaseConnectionString –Server $server
    
  7. You can verify configurations with the Get-SCSPFSetting command.

  8. Using SQL Admin credentials, logon to the SQL Server that hosts the Operations Manager data warehouse database.

  9. Start SQL Management Studio.

  10. Choose Security->Logins, and then right-click on the Logins folder and choose New Login.

  11. Add the SPF_Usage application pool identity for the Login name, such as CONSOSO\SPF.

  12. Select User Mapping under Select a page.

  13. Choose OperationsManagerDW and then choose OpsMgrReader under Database role membership.

  14. Click Ok.

  15. Right-click OperationsManagerDW under Database and choose Properties.

  16. Choose Permissions, pick the user just added under User and Roles, and verify that the user has Execute permission on the database.

  17. Close SQL Management Studio.

Set up Windows Azure Pack to use the usage service

The following procedure configures Windows Azure Pack to locate usage metering.

To configure Windows Azure Pack for usage metering

  1. Logon to the management portal for administrators.

  2. Choose VM Clouds.

  3. From the Clouds menu, chose Register Service Provider Usage.

  4. Specify the Service URL, username, and password. The user name should be the same as the identity specified for the SPF_Usage service. Be sure to include the "/USAGE" in the service URL, such as https://vmm01:8090/Usage.

Verify usage data is being stored

Now that usage metering is configure, verify that data is being stored.

To verify usage metering collection

  1. Logon to the management portal for administrators.

  2. Start SQL Management Studio.

  3. Choose Database -> Tables.

  4. Right-click on Usage.Records and choose Select Top 100- Rows.

  5. Verify that the result returns the data with "VM Utilization" as the ResourceID.

See Also

Register the Service Provider Foundation Endpoint for Virtual Machine Clouds
Provision Virtual Machine Clouds
Administer Virtual Machine Clouds
Managing the Data Warehouse in System Center 2012 - Service Manager
Service Reporting in System Center 2012 R2