Manage tenant costs for Windows Azure Pack

Atualizada: Outubro de 2014

Aplica-se a: Windows Azure Pack for Windows Server

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.

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

Operations Manager data warehouse

Virtual Machine Manager

Service Provider Foundation

Windows Azure Pack (and possibly WAP02 and other servers depending on the deployment scenario)

Service Reporting (optional)

Service Reporting database (optional)

SharePoint (optional)

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

  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


    Required. Must be a database connection string.


    Required. Must be DatabaseConnectionString.


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


    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 = ""
    # 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.

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

  1. Logon to the portal de gestão para administradores.

  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.

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

  1. Logon to the portal de gestão para administradores.

  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.

Consulte Também