vCenter Chargeback Manager – Part 1

LAST UPDATE: 08-07-2013

The exam blueprint for the VMware Certified Professional Cloud (VCP-Cloud) certification includes several products. Of course, vSphere ESXi and vCenter Server are the basic building blocks and vCloud Director is the most discussed product. But there is another product you need to understand; vCenter Chargeback Manager (vCCM, from now on). You need to know how to install the product; also a full section of the blueprint is dedicated to configuration and administration. You need to know how to generate Reports. But before you can generate your first report, you have been through a lot of stages.

So, I expected to find a lot of posts on this subject, but I did not. For that reason, in a series of posts, I will share my experience with the vCCM. In the first part, let’s start with the installation of vCCM.

Note: In my case, I installed vCCM for training purposes. For that reason, I did not completely follow all steps and recommendations in the official documentation. So, in case, you need to install vCCM in a real-life production environment, I recommended having a look at the vCenter Chargeback Manager Installation and Upgrade Guide.

You can find the official resources here and start a free trial for 60 days. Some useful official documents are:

What is vCCM

In a few word, vCCM is an end-to-end cost reporting solution for virtual environments using vSphere. vCenter Chargeback Manager can also be used with VMware vCloud Director. So you can also use vCCM when you are running one or more vSphere Clusters, without vCloud Director!

According to VMware: “Chargeback is a mechanism to account for the operational costs involved in providing and maintaining an IT infrastructure, including the costs for IT services and applications. Measuring resource utilization and calculating the corresponding IT operational cost enables you to account for the IT resources utilized and bill for the services provided.”

vCCM is optimized for and can only be used in virtual environments.

vCCM Overview

vCMM01-01Figure 1 – (c) VMware

vCCM consists of the following elements:

  • vCCM Server,
    an Apache Tomcat server that runs on a Microsoft Windows Server.
  • vCCM Database,
    vCMM needs a database instance. Either a Microsoft SQL Server 2005 SP4, Microsoft SQL Server 2008 (R2), Oracle 10g (r1 or R2) or Oracle 11g (r1 or R2).
  • Load Balancer,
    users interact with the vCCM through a Load balancer.
  • Data Collectors,
    retrieve inventory and resource usage information for each VM from the vCenter server. In a vCloud environment, you can install the vCloud Director data collector.
  • vCCM UI,
    Users connect to vCCM through a web-browser (IE 7 or 8, Firefox and Adobe Flash Player plug-in)

When you install vCenter Chargeback Manager, a load balancer and a data collector can also be installed and run on the same machine. You can also choose to install the load balancer, vCenter Chargeback Manager Server, and data collector on different machines. Although the vCenter Chargeback Manager database can also be installed on the same machine, in a real-world scenario you would install the application and the database on separate machines.

In my case, I have installed all components on a single Windows Server 2008 R2 server configured with 1 vCPU and 2 GB Memory.

Before starting the actual installation, it is a good idea to use the vCCM Pre-Install Checklist in the vCenter Chargeback Manager Installation and Upgrade Guide, especially:

  • Network configuration:
    • FQDN or static IP address: 192.168.100.121
    • Port numbers, HTTP: 8080
      Load-balancer:8009
      HTTPS: 443
  • Database configuration:
    • Type: MS SQL 2008 R2
    • Database name: vCCM
    • IP address of the vCCM database: 192.168.100.121
    • Database instance name: sqlexpress
    • Database user name: vCCM_User
    • Password for this user: *****
    • If using Windows Authentication, Windows user account, password etc.
  • Software configuration:
    • Check system time on all servers and databases:
    • MS SQL Server, SQL Server Browser service is running:
    • Is MSI installation enabled:
    • Set port exceptions on Windows firewall for ports mentioned above:

Preparing the vCCM database

For those not familiar setting up a new MS SQL database, here are the steps. Otherwise, skip to the next session, but do not forget to set the correct permissions for the database user .

  • I assume you have a MS SQL server up and running. In my case I have installed a Microsoft SQL Server 2008 R2 Express edition, link here.
  • During the installation a database instance will be created
  • Create a database, in my case the name is: vCCM

vCMM01-02Figure 2 – Create database

  • Create a database user, in my case: vCCM_User. I have used SQL Server Authentication.
    UPDATE: read this post. Do not place a tick at “Enforce password expiration”.

vCMM01-03Figure 3 – Create db user

  • Set the default database to the vCCM database
  • Set the default schema for the user to dbo

vCMM01-04Figure 4 – check schema

  • Execute the following commands to assign the correct privileges to the user. This will also create a new role; CB_ADMIN_ROLE.

vCMM01-05Figure 5 – set privileges

The commands in clear text:

USE vCCM
GO
CREATE ROLE CB_ADMIN_ROLE;
GRANT ALTER ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT REFERENCES ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT INSERT ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT SELECT ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT DELETE ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT UPDATE ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT EXECUTE ON SCHEMA :: DBO TO CB_ADMIN_ROLE;
GRANT ALTER ANY DATASPACE TO CB_ADMIN_ROLE;
GRANT CREATE TABLE to CB_ADMIN_ROLE;
GRANT CREATE VIEW to CB_ADMIN_ROLE;
GRANT CREATE PROCEDURE to CB_ADMIN_ROLE;
GRANT CREATE FUNCTION TO CB_ADMIN_ROLE;
GO
sp_addrolemember CB_ADMIN_ROLE, vCCM_User

Where:

vCCM is the database name.

vCCM_User is dtabase user name.

CB_ADMIN_ROLE is the new role.

vCMM01-06Figure 6 – Review results

  • Check the results, go to Security, Roles and select the new role CB_AMIN_ROLE.

vCMM01-07Figure 7 – review permissions

According to the official documentation, now you should calculate and check the maximum number of database connections to the database. The number of connections depends on the number of vCCM severs and data collector (see table 3-1 in documentation).

Before we start the actual installation, I assume you have at least your new vCCM server up and running. Do not forget to add rules to the firewall, for the ports specified.

vCMM01-08Figure 8 – firewall settings

Installing vCCM

If you choose to install the load balancer and the vCenter Chargeback Manager server on different machines, then you must first install the load balancer and then the vCenter Chargeback Manager server.

  • Run the vCenter-CB.exe file.

vCMM01-09Figure 9 – start installation

  • Click Next on the Introduction screen.

vCMM01-10Figure 10 – Introduction

  • Accept the end-user license agreement, and click Next.

vCMM01-11Figure 11 – License

  • Choose the installation folder. The install path must contain at least one folder. You cannot provide only the drive name. Also, the directory path must contain only ASCII characters

vCMM01-12Figure 12 – Folder

  • Enter the vCenter Chargeback Manager database-related information, and click Next
    Here the Pre-Install Checklist will help you providing the correct information.

vCMM01-13Figure 13 – Database configuration

  • Test the connection. If the connection fails, have a look at the error message, try to troubleshoot and fix it.

vCMM01-14Figure 14 – success

  • When you use the MS SQL Express edition, like I did, you will be presented with the message that your database does not support partitions. Because this is just a POC, we choose Continue.

vCMM01-15Figure 15 –

  • Enter the load balancer-related information, and click Next. This load balancer runs on the vCCM server, so provide the IP address of the vCCM server. Do not provide “localhost”.

vCMM01-16Figure 16 – load balancer

  • Select Install vCenter Chargeback Manager Server, enter the IP address and port details for the vCenter Chargeback Manager, and click Next.

vCMM01-17Figure 17 – Server configuration

  • Enter a user name and password for the vCenter Chargeback Manager administrative account, and click Next.

vCMM01-18Figure 18 – Admin user

  • Select the data collectors that you want to install and click Next. The Install vCenter Chargeback Manager Data Collector option is selected by default. Optional select other data collectors. You can also install data collector later on.

vCMM01-19Figure 19 – data collector

  • In case you have chosen to install the Cloud Director data collector, provide the requested information.
    In case you have a vCloud Director version 1.5.x, you need to provide more information.

vCMM01-20Figure 20 –

  • Review the information displayed on the Pre-Installation Summary screen, and click Install to start the actual installation.

vCMM01-21Figure 21 – Install

  • Click OK, when you see this message.

vCMM01-22Figure 22

  • The installation ends with a message that errors occurred during installation. We discuss this later. The URL for accessing vCCM is displayed, in our case: https://192.168.100.121:443/cbmui/

vCMM01-23Figure 23 – Done

  • Following, a dialog is displayed, with two options for generating a SSL certificate; a default SSL certificate or an own certificate. The last option is recommended. Because this is a POC, we choose “Generate default SSL certificate”. There is an option available to replace the default SSL certificate with a self-signed certificate at a later time.

vCMM01-24Figure 24

To conclude the installation, let’s have look at the reported errors. The name of the installation log is: VMware_vCenter_Chargeback_InstallLog.log and can be found in this folder: C:\Program Files (x86)\VMware\VMware vCenter Chargeback.

The summary shows 2 NonFatalErrors.

vCMM01-25Figure 25 – Errors

It turns out that during installation, the provided vCloud Director server was not available.

Status: ERROR
Additional Notes: ERROR - Sun Dec 30 11:35:42 CET 2012
ERROR - Failed to connect to VCD specfied by the user with ip, https://192.168.100.11
Status: ERROR
Additional Notes: ERROR - Sun Dec 30 11:36:28 CET 2012
ERROR - Failed to connect to VCD specfied by the user with ip, https://192.168.100.11/cloud

This concludes the first part about vCenter Chargeback Manager. In the next episode, we will start with the basic configuration.

As always, I welcome your comments and I thank you for reading.

Also read the other two episodes in this series:

vCenter Chargeback Manager – Part 2

vCenter Chargeback Manager – Part 3

Advertisements

3 Responses to vCenter Chargeback Manager – Part 1

  1. […] the previous post, I have discussed the basic installation of vCenter Chargeback Manager (vCCM, from now on). In this […]

  2. […] is the third part in a series of posts on the vCenter Chargeback Manager (vCCM, from now on). Part 1 was all about the installation of vCCM. In Part 2, the basic configuration was discussed. In this […]

  3. […] For the installation of this server, see my previous post. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: