Virtualization Team

Vmware ESX/ESXi – ESX server – Virtualization – vCloud Director, tutorials, how-to, video

vKernel vOPS

Entries for the ‘vCenter ChargeBack’ Category

VMware vCenter Chargeback VM instance model is overcharging

VM instance model in VMware vCenter ChargeBack up to version 2.0.1 still has no prorating on charges. For those of you who is not sure what I am describing by VM Instance below how its described in the “VMware-Technote-Using-vCenter-Chargeback-vCloud-Director” document as well a screenshot of where you configure VM instance in vCenter ChargeBack:

“VM Instance enables the creation of a matrix of fixed costs that apply to hard a hard bundle of vCPU (count) and memory (MB). VM Instance matrices are linked with a cost model and consist of the hierarchy selection criteria, a fixed-cost table and a default fixed cost. Selection criteria can be based on name-pattern matching or custom- attribute matching. VM Instance uses a stepping function, where the virtual machine charge steps up to the next instance size. Costs are applied only for the duration when a virtual machine is powered on and is not prorated.

All this seems great beside the one last sentence “Costs are applied only for the duration when a virtual machine is powered on and is not prorated.” This means if you setup your fixed cost charges into there for monthly and you only powered the VM for an hour then turned it off you are being charged the full month rate. Further, it will charge the full rate on each power on. This get you to another problem that when ever you power on and off the same VM multiple times it just go and insert that charge multiple times. This is obviously not what most of us intend it to do, but its how vCenter ChargeBack VM Instance Matrix has been setup to do by design. The only way around it at the moment is to clean your result through the API before showing them into your billing system. In another word, there is nothing you can do about it in the UI & this seems to be how it work by design.

One last note about VMware vCenter ChargeBack VM Instance model is that its now available for all hierarchies in vCenter Chargeback Manager including Allocation Pool Organization DataCenters which is an improvement over earlier version where it was only available for the pay as you go model which could explain the bit of odd behavior explained earlier in this post. The extended support of VM Instance Matrix in ChargeBack was included in vCenter ChargeBack 2.0 release notes & the exact paragraph is quoted below:

“VM Instance Cost support for all hierarchies in vCenter Chargeback Manager
In vCenter Chargeback Manager 2.0, you can define fixed cost pricing matrices for virtual machines based on vCPU count and memory bundles. Unlike earlier releases, this functionality is now available for all the hierarchies created in vCenter Chargeback Manager.”

The moral of the story in this post, is to be careful when using the VM Instance Matrix in VMware ChargeBack & ensure you understand the way it work & any clean up work needed before including it into your customers bills. Further, I am hoping more flexibility will be introduced to the VM Instance Matrix in vCenter ChargeBack in the future.

I hope this help clean up some one confusion.

Posted in: vCenter ChargeBack | Leave a Comment
 

VMware vCenter ChargeBack Cost Models & vCloud Director Allocation models & Overage

Since the introduction of vCenter ChargeBack integration with VMware vCloud Director & I hear repeatedly questions about how its Cost Models charge in a VMware vCD environment. To be honest, the question usually come in the form that vCenter ChargeBack is not calculating the cost as I expected & something wrong with it. Most of the time it turn out nothing but a misunderstanding of vCenter ChargeBack Cost Models in a vCloud Director environment.  As vCenter ChargeBack Cost Models highly integrate with VMware vCloud Director allocation models, its very important to have a solid understanding of VMware vCD Allocation Models. As Duncan Epping & Chris Colotti both has explained vCloud Director Allocation Models extensively in two great blogs posts, I am going to only reference these and not cover it in this post & rather focus on the vCenter ChargeBack part of the story. Below are the two posts for VMware vCD Allocation Models:

vCD – Allocation Models (By Duncan Epping)

vCloud Allocation Models  (By  Chris Colotti)

Please make sure you go over one of the above posts if you still don’t have a clear understanding of the vCloud Director Allocation models before going over this post, as I am not going to cover that.

Let’s start by looking at the most common VMware vCenter ChargeBack Cost Models for VMware vCloud Director. The five most common ChargeBack Cost Models I want to start with are as below:

vCenter ChargeBack Cost Models at the VMs Level

1- VMware vCloud Director Billing Policy – Pay As You Go Fixed Charging

2- VMware vCloud Director Billing Policy – Pay As you Go Resource Based Charging

vCenter ChargeBack Cost Models at the org-VDC level

1- VMware vCloud Director Billing Policy – Reservation Pool

2- VMware vCloud Director Billing Policy – Allocation Pool

3-VMware vCloud Director Billing Policy – Overage Allocation Pool

As you will notice above I have split the VMware vCenter ChargeBack Cost Models for vCloud Director to two types that are at the VMs levels & that at the org-VDC level. I believe most of the confusion come at this part where many customers use an org-VDC level cost models, but want to set costs for different parameters at the VM level. Unfortunately this is not the way it meant to work. Let’s exploit this a bit further.

For “Reservation Pool” and “Allocation Pool”  Allocation models of vCloud Director the whole org-VDC is sold as a chunk of capacity, the idea is to charge at the org-VDC level and not at individual VM level. Hence vCloud Director data collector running in vCenter chargeback sets allocations for CPU, memory and storage at org-VDC for Reservation and Allocation pool org-VDCs. Its basically you sell the customer a full chunk of resource and its up for him how he use it unless Overage is being utilized but let’s assume Overage is not being used at the moment. Let’s look at how the calculation happen in this Case:

If you are giving a customer an org-VDC with 10Ghz of CPU, 20GB of RAM, 200GB of disk then you decided that you will charge $.02/hr for 1Ghz of CPU, $.04/hr for 1GB of RAM, & $.1 per 1GB of disk. The cost of this customer per hour will be as follow:

(10Ghz * .02) + (20GB * .04) + (200GB * .1) =  $21/hr

One important thing to notice of the above calculation that it does not take into consideration how many virtual machines or the size of VMs running in it while coming up with the customer cost. The cost is totally being set based on the total chunk of resource given to the customer in the shape of an org-VDC. This is very important to grasp as I have been repeatedly asked by a customer who is using an Allocation Pool or Reservation pool that vCenter ChargeBack is coming up with different numbers than when the math is done manually and the reason for about 99% of the time is that the admin is doing the calculation based on the amount of resource the customer is using to create his VMs which is totally ignored in such a model.

Another important thing to grasp that although the reservation pool and allocation pool work differently on the vCloud Director level in that the Reservation pool reserve 100% of the resources where the Allocation Pool only reserve a preset percentage of resource both of them are charged in exactly the same manner in vCenter ChargeBack where you are always charging based on allocation. One more cause for confusion on the Allocation Pool & Reservation Pool cost models in vCenter ChargeBack that if you generate a report on the VM or vAPP level under an Allocation Pool or Reservation Pool org-VDC you can get the numbers based on the VMs Specs, where if you do it on the org-VDC level you can not get these. Well, when you are generating the report at the org-VDC level vCenter ChargeBack is aware that this org-VDC is running an Allocation Pool or Reservation Pool model and it will only generate info involved in such a model in the generated report where it does not do that if you do it on a VM or a vApp under that organization as it assume you only want to generate usage or cost data for that particular element based on what ever model you choose.

At last its important to mention that there is few fixed costs (Example OS Cost) that can be added at the VM level into these models. Though to do that you will need to modify the billing Policy Expressions to include Fixed costs as it does not include that by default.

Its important to always remember when using Allocation Pool & Reservation Pool cost model then you are charging the customer for the full chunk of resource you are assigning to him if he used or not. Its very similar to the web-hosting. The webhosting company give you a certain amount of CPU, RAM, & Disk space & they charge you for it regardless of how much you use out of it. Another similar scenario is you internet connection. My ISP tell me that he will give me a 35Mbps pipe for a cost of $50/Mo. Believe it or not he will still charge me the $50/mo even if I have not used it at all. I hope this make the Allocation Pool & Reservation Pool cost models clearer.

If Charging for individual VMs is what you are looking for then the “pay as you go” cost models will be more appropriate. Utilize Pay As You Go – fixed-based–charging cost model if you intend to charge a flat, fixed fee per virtual machine; use the Pay As You Go – resource-based–charging cost model if you intend to charge based on the amount of vCPUs, memory, & storage allocated to the vAPP. As you can see now the focus of the Pay As You Go Cost models are totally focused on the VMs levels how many or the specs of the VMs. So if your plan is to charge based on how many VMs a customer utilize or on what specs these VMs have or certain fixed fees for certain features in the VMs the customer use then Pay As You Go is the model for you. Let’s take a sample quick calculation of “Pay As You Go – resource-based–charging cost model”. Let’s assume you decide that you will charge $.02/hr per vCPU, $.04/hr for 1GB of RAM, & $.1 per 1GB of disk where the customer has created two VMs as follow:

VM1: 1vCPU & 1GB of RAM & 10 GB of disk

VM2: 2vCPU & 2GB of RAM & 20GB of disk

This customer cost per hour would be:

(3vCPUs * .02) + (3GB * .04) + (30GB * .1) = $3.18/hr

As you can see the calculation in a pay as you go model is totally arousing around the VM specs & counts rather than org-VDCs in opposite to the Allocation Pool Cost model & Reservation Pool Cost Model. One more thing to mention that Instance Costs are specific to Pay as you go models in a vCloud environment & won’t work with the Allocation Pool & Reservation Pool models & that should make sense as they are totally related to the specs of the VMs.

 

Charging for Overage

Charging for Overage has been another area where many questions arise. Overage is meant to give the admin the ability to charge a customer a premium fee when they run over a certain limit. It is similar to what my ISP treatment, let say I get charged $50/mo for 25Mbps up to 100GB of bandwidth. If I ever go over the 100GB of bandwidth my ISP will charge me a premium fee at a much higher rate which is something you might want to do in your cloud environment. Now you got the goal of charging for Overage in vCenter ChargeBack in a vCloud Director environment let’s look at the Allocation Pool overage scenarios.

If you remember what I have mentioned earlier without overage both allocation pool and reservation pool end up being charged similarly. Though in the allocation pool you have your allocation setup higher than your reservation. Overage will give you the chance to charge the customer at a base rate while sticking with what is reserved to him & charge him a premium fee for any extra usage above the reservation and below the limit. Let’s look at the below scenario for an allocation pool with and without overage.

The customer is assigned an allocation pool of 10Ghz, 20GB of RAM, & 100GB of Disk space. where the reservation has been setup to 50% of CPU & 50% of RAM. Let’s assume the customer is using 8Ghz, & 15GB of RAM & 80GB of disk space. The pricing are set as: $.01 per 1Ghz/hr & $.01 per 1GB/hr & $.01 per 1GB of Disk, where you will charge $.1 per 1Ghz/hr & $.1 per 1GB/hr for overage.

Without Overage: The customer will be charged for the full allocation as below:

(10Ghz * .01) + (20GB * .01) + (100GB * .01) = $1.3/hr

With Overage:

(5Ghz * .01) + (10GB * .01) + (100GB * .01) = $1.15/hr

(3Ghz * .1) + (5GB * .1) = $.8/hr <== Overage cost

The total cost with the overage for this customer will be: 1.15 + .8 = $1.95/hr.

if reservation pool cost model were used, then overage will not have any affect on the calculation which will end up being exactly as the allocation model without overage as the reservation equal exactly to allocation in that case. Further, its important to note that the overage attribute is disabled by default in vCenter ChargeBack and you can turn it on globally by going to settings=>Data Collectors =>VMware vCloud Director Tab

Then change the attribute VMware vCloud Director apply overage charge on allocation pool vDC to true as in the below screenshot:

You can as well enable overage for a certain vDC rather than globally by going to the hierarchy manager & right click the Org-VDC you want to enable overage for then choose manage attribute then change the EntityLevelOverageFlag to true as the below screenshot. I actually rather this method on enabling it globally as it give me control on where I want to enable overage and where I don’t want to do so.

Okay that all for now. I hope this help you better understand vCD allocation models and how they are treated by vCenter ChargeBack Cost models & how Overage Work.

Please note the cost for CPU, Memory, & disk I have used in my examples have only been used for the ease of calculation and not a great example to use in your real environment. For that you might want to check the vCenter ChargeBack Base Rate Calculator.

I hope this help some one, & sorry if I have given you an overdose of VMware vCenter ChargeBack :) .

Posted in: vCenter ChargeBack | 3 Comments
 

VMware vCenter ChargeBack Report does not display Disk Read and Disk Write & Network Transmitted and Network Received information

It seems the problem of vCenter ChargeBack report not displaying certain info is becoming a popular question lately. Actually this was pointed out to me earlier today by a colleague who was reviewing my vCD design. The most common info not displayed in a vCenter ChargeBack Report are below:

  • vCenter ChargeBack Report Does Not Display the Network Transmitted and Network Received Information

  • vCenter ChargeBack Report Does Not Display the Disk Read and Disk Write Information

  • vCenter ChargeBack Report Does Not Display the Memory Usage Value and the Corresponding Cost

It seems many admins are getting to the point where one of the above list is not being displayed in the vCenter ChargeBack Reports although they select them while generating the report.

It turned out that the main cause of such a problem is that the statistics collection level is not properly set on the vCenter Server. This case seems to happen often as the required statistics collection level in vCenter in order for these to work is higher than the default in vCenter where statistics collection level is set to 1 by default, where in order for these to work you will need to change the vCenter Statistics collection level as shown below:

Desired Data                                                     Required Statistics Collection Level

Network Transmitted and Network Received                                         3 or above

Disk Read and Disk Write Information                                                    3 or above

Memory Usage Value and the Corresponding Cost                                 2 or above

Please note for the Memory Usage Value and Corresponding Cost, you will have to change it to 2 or above only if using a vCenter older than vCenter 4. For vCenter 4 and above you can keep it to the default level which is 1.

For you who wonder where to change the statistics collection level to the required level in vCenter, all you need to do is:

1- Go to vCenter Server Settings ==> Statistics

2- Change the statistics level as required

3- That’s All you are done and ready to go!.

I hope this will save some one a bit of the hassle trying to figure out what he did wrong during the installation of vCenter ChargeBack and repeatingly installing and uninstalling vCenter ChargeBack without resolution as the problem or let’s say configuration he is missing is not in the vCenter ChargeBack but in vCenter. Happy Metering!

Posted in: Enterprise Management, vCenter ChargeBack | Leave a Comment
 
  
Eiad Al-Aqqad VCDX #89, vExpert, & VCP 3,4,& 5
Trilead VMExplorer Click here to download FREE 1 TB NAS
Eiad Al-Aqqad Virtualization & Storage Expert on Linkedin