VMware vCloud Usage Meter – BND to Bundle Translation Technical Discussion

Recently, we received a post on VMware Communities forum for vCloud Usage Meter requesting clarification on the “BND” column on the Virtual Machine History Report. I’d like to spend a little more time discussing this further for others and some of the logic under the covers.

Moreover, I’m going to review a sanitized customer collection and discuss something I even learned.

Luis Ayuso and I spend a lot of time with Usage Meter, so over time, we’ve come intimately close to the inner workings of UM logic (more Luis, follow him for further updates and direction!). While UM has its quirks, it has quite a bit of logic and intelligence integrated for billing purposes.

First, here’s the BND mapping to current VCPP bundles –

Items that I want to point out:

  1. The BND identifier does not reflect the actual bundle point value. This is by design due to the variances of past bundles.
  2. The Standard Bundle is being retired, but will still show up in any existing or previous Usage Meter instances.
  3. While we have a unique ID for the Standard SP Bundle with Management or Networking, the point bundle value remains the same.

The second thing I’d like to cover is the BND column inside of the Virtual Machine History report – this is column P –

We can see in the above screenshot three important columns:

  1. Bnd Column – which is the bundle identifier. In the above example, we see VM’s reporting ID 7, which is the Standard Bundle.
  2. vROps Column – we would see a “Y” or “N” here depicting if this VM is registered inside of vRealize Operations. What we can conclude from the above screenshot is the following:
    1. Running vSphere Enterprise (NOT Enterprise Plus)
    2. vRealize Operations Itemized Breakout
    3. How? Well, Usage Meter will always pick the most cost-effective option as a bundle for the Providers. We know that the 7-point/Advanced Bundle has vSphere Enterprise Plus while the 5-point Standard bundle uses vSphere Enterprise which was EoL’d a few years ago. Moreover, if the Provider utilizes Advanced or Standard vROps, this is not in any VCPP bundle, so this will be itemized billed out. This could also be the Enterprise version since we are using the 5-point bundle.
  3. NSX Column – in this example, we do not have any NSX detection. However, if we did, we would see:
    1. B – NSX SP Base Version. Included in Advanced/7-Point Bundle
    2. A – Advanced SP Version. Included in Standard with Networking (8-Point) OR Advanced with Networking Bundle (9-Point).
    3. E – Enterprise SP Version. Included in Advanced with Networking and Management/12-Point Bundle.

As a quick refresher, here are the different versions of NSX inside of VCPP –

We can see in the below screenshot where the VM state changed – VM was registered inside of vROps. Therefore, the bundle went from BND 8 (Advanced SP) to BND 10 (Standard with Management). Why? Well, it was not utilizing vCloud Director nor NSX, so this is the most cost-effective option for this VM. 

Makes sense. Moreover, this is AVERAGED over the month, so if you utilize the Advanced bundle for half of the month while utilizing Standard with Management for the rest, you only pay for the specific hours of use.

Let’s talk about an interesting scenario. I noticed that a VM was “flapping” between BND 7 and BND 13 – that’s a big change. We can see that it’s utilizing vROps and NSX Advanced, but why wasn’t defaulting to a lower point bundle?

Well, Usage Meter will append a new line for VM state change – that includes vMotions. What we can see if this VM vMotion from host-30 to host-31 (sanitized names) but were using different vSphere licenses. Ah ha!

We can see on the top line which is host-30, it was using a vSphere Enterprise license while the next three line items (host-31) were on an vSphere Enterprise Plus license.

Interesting! So, how did this look in the Monthly Usage Report?

We can see NSX Advanced in the Monthly Report. While there is no itemized NSX Advanced in the Product Usage Guide, I believe the Provider would have to just report NSX Enterprise for these VM’s.

So, what did we learn from this scenario? Make sure your licensing is configured in a uniform fashion! This will be very unlikely in the future as Enterprise is not supported after September 2018, but it’s imperative to have proper hygiene for the same hosts in the same cluster.

Happy Metering,

-Daniel

VMworld 2018 Sessions for VMware Cloud Providers

This is a very exciting time for us at VMware, especially in the Cloud Provider Program. I am elated to say there are over 34 sessions that are tied to VMware Cloud Providers at VMworld 2018 – we are only publishing the sessions that are allowed currently…

I believe this is the most we’ve ever had at a VMworld. This signifies the importance of our Cloud Providers to VMware and our channel partners. As many of you have experienced, we are in a significant growth space and these sessions are very important for us to showcase what VMware is delivering around Cloud Providers. Moreover, this is a very important venue for us to present our current and future investments in VCPP.

I was honored when two of my sessions were accepted a few months ago. While it’s a little stressful on ensuring we are creating valuable content for our Cloud Service Providers, I am looking forward to presenting this material at VMworld.

Why VMware vSAN Is the Best Solution for Cloud Provider Environments [HCI1145BU]

The first session I have is with Greg Kaffenberger who is one of my esteemed colleagues inside of the VMware Cloud Provider team. We’ve noticed there’s some confusion around how vSAN works inside of our subscription model. Our goal is to demystify and showcase how vSAN is a sustainable operating model for Cloud Service Providers.

A lot of great content created that will be reviewed in this hour. Unfortunately, I wish we had more time – we’ve had to cut a lot but we will make the best of it!

Case Study: Hybrid Cloud with vCloud Extender from Customer to Provider [HYP1142BU]

I am co-presenting with Raffaelo Poltronieri at CloudItalia and we are stoked about speaking about vCloud Director Extender. While many of you have seen my Extender posts over the past year, we will be talking about some of the best practices and lessons learned with one of our strategic partners. Moreover, I will be discussing the goals going forward for our extensibility solutions – significant investment is going in to ensure we make it easy for our Cloud Providers to provide hybridity between on-prem and vCloud environments.

A few callouts I want to make as these are sessions you should not miss –

  • Consuming Cloud Provider SD-WAN Services [BRE3038BU] – this reviews VeloCloud for VCPP and it is very top of mind for many providers. Providing seamless connectivity between sites in a secure, multi-tenant, architecture is critical.
  • Delivering Custom Services Through vCloud Director Extensibility [HYP1803BU] – you will continue to see further development in UI Extensibility inside of vCloud Director. Milko and Martin will do a great job discussing what’s possible inside of the new vCD H5 UI.
  • Introducing VMware Cloud Provider Pod [HYP1499BU] – I can’t speak much about this right now, but check out what Wade Holmes and Yves Sandfort will be presenting. This is a new initiative and we’d love to get feedback from our Cloud Providers.

Honestly, they are all awesome. I was going to continue to list more, but there’s some valuable content being created by amazing leaders in this organization.

I will be at VMworld Saturday to Thursday – please reach out if ever want to talk about any of our solutions!

See you there,

-Daniel

Automate retrieving the Horizon Usage Report for VMware Cloud Providers

For VMware Cloud Providers that are using Horizon, monthly usage collection is not automated or collected by Usage Meter currently. This is a manual process that requires the Provider to retrieve the highwater mark concurrent usage on a monthly basis.

This post will document the automation of reporting of Horizon statistics in a Cloud Provider environment. I have tested this in my environment with vSphere 6.5 with Horizon 7.x.

First off, I did not do this by myself. Winston Blake and Carahsoft provided the initial script and I built off of it from there. Moreover, I received guidance from Luis Ayuso, Ray Heffer, and Wouter Kursten – this is the power of the #vCommunity! This is the first time I’ve created PowerShell code and published it to a git repo.

What does this PowerShell script provide?

  1. Creation of secure string for storing service account password
  2. Collection of Horizon Concurrent Usage data
  3. Outputs this to a file
  4. Emails this to a specified recipient(s)

What does it not provide?

  1. Setup of Windows Scheduled Task
  2. Reset of Highest Count in Horizon – yes, this is a bummer but will explain further on why.

High-Level Steps:

  1. Create a service account for running the usage collection.
  2. Download scripts to a folder on your View Manager server.
  3. Modify scripts and input folder and SMTP parameters.
  4. Run Part 1 of 2 – the securestring/password PS script.
  5. Create a basic task in Task Scheduler
    1. Test Run
  6. Enjoy emailed reports on a monthly basis and a quick link on resetting the highest count.

Create a service account

  1. In my lab environment, I created an account called “horizonsvc” in my domain. This is just a non-privileged account that I will utilize for read-only access to the Horizon environment. While the PowerShell script does convert the password to a securestring, this is just another best practice rather than running it as the default administrator account.
  2. In AD, we can see my Horizon Service Account – 
  3. And we also see that I added this user that’s attached to the Administrators (Read Only) group that provides limited permissions (no modifications available). 

Download scripts to a folder on your View Manager server

My repo is located here – https://github.com/dpaluszek/horizon-vcpp

VCPP Horizon Reporting
https://github.com/dpaluszek/horizon-vcpp
0 forks.
0 stars.
0 open issues.
Recent commits:

The first file is the password file that will store the service account password in a secure string.

https://github.com/dpaluszek/horizon-vcpp/blob/master/horizon-password.ps1

Next, the second file does the work on collection while creating the file and emailing it out –

https://github.com/dpaluszek/horizon-vcpp/blob/master/horizon-usage-script.ps1

While this does automate the collection of the highwater mark of concurrent users, it does NOT reset the usage after collection. This has to be manually done and there is a link inside of the received email to do this operation.

Here’s why –

  1. There’s not a direct API/PowerShell command today that can reset this.
  2. However, one can see this field under the ADSI structure under “OU=Properties, OU=Global, CN=Counters” – we can see pae-NumCCUCountHigh which is the variable we need. 
  3. After my testing of changing this variable (along with Wouter’s help), it seems to be delayed on propagation and I do not know the long term effects of this while View Manager is running. Last of all, I do not know if this would be a production-supported operation – but researching other options and what the BU can do in the future.

Modify scripts and input parameters

Let’s walk through each file and what needs to be modified before running this in your environment:

  1. horizon-password.ps1
    1. On line 8, we need to change the location directory of where you are going to save this file. I suggest putting it in the same location as the two PS scripts along with the two files that will be created
    2. #Replace "C:\directory\" with the target directory for your secure string text file.
      read-host -AsSecureString -prompt "Please enter the password" | ConvertFrom-SecureString | Out-File C:\horizon\$filename.txt
      
      
  2. horizon-usage-script.ps1
    1. Line 8/9 –  we need to utilize the same directory location as in 1B –
      1. ##Replace "C:\DIRECTORY\file.txt" with the path to your encrypted service account password
        
        $password = get-content C:\horizon\file.txt | ConvertTo-SecureString
    2. Line 10/11 – change it to your service account. As an example, I am utilizing “CORP\horizonsvc” as my account.
      1. ##Replace "DOMAIN\username" with service account name previously used in Part 1 of 2
        
        $credentials = new-object -TypeName System.Management.Automation.PSCredential -argumentlist "CORP\horizonsvc",$password
    3. Line 13/14 – Modify your FQDN of your View Instance. For example, I am using “view-01a.corp.local”
      1. ##Replace FQDN with hostname of your Horizon Manager server.
        
        $hznode ="view-01a.corp.local"
    4. Line 30 – Another directory change –
      1. $file = "c:\horizon\horizon-usage-$timestamp.txt"
    5. Lines 40 to 43 – this is your SMTP/email information. Update with your SMTP server, recipient, and sender.
      1. ##Change the three variables below for your environment: smtpserver, recipient, and sender. 
        
        $smtpserver = "mail.rainpole.com"
        
        $recipient = "administrator@rainpole.com"
        
        $sender = "administrator@rainpole.com"

Run Part 1 of 2 – securestring/password PS script

  1. This is pretty straightforward – we open up PowerShell and .\ the first script and input your service account password – 
  2. We can now see the service account password stored in the file. 

Create a basic task in Task Scheduler

  1. This could be run locally on the View Manager server or some other Windows server that can traverse the network and hit the View instance.
  2. Right click -> Create a Basic Task, provide a name – I am using Horizon Usage Report 
  3. Select Monthly as we will want to run this on the last day of the month before the next calendar month – 
  4. We will have this start at the end of the month but selecting all calendar months and the last day of the month. I have 11:45 PM local time to give us a 15-minute buffer to run the operation (even though this takes a few seconds to run). 
  5. We want to select Start a Program since we will call on PowerShell – 
  6. I just typed in “powershell.exe” since it should be in your path already. Under Add Arguments, put the full path to your usage script. For example, I am using “C:\horizon\horizon-usage-script.ps1” 
  7. Summary page, but make sure you check the box for Open the Properties dialog for this task as we want to make sure this task runs even if there’s not a logged in user – 
  8. Change the radio button to “Run whether user is logged on or not” and press OK – 
  9. It will then prompt your for credentials to save this task – 
  10. Okay, now we are ready to run it!

Test Run and Expected Output

  1. Let’s try to test run our newly created task – 
  2. We can see the task completes pretty quickly, about 2 seconds – 
  3. Ah, we got the email! We can see the body with the URL to reset the highest count along with the attached usage. 
  4. In the file, we can see in my lab environment I had a count of 2 for the NumConnectionsHigh. This is what I’d report under BizPortal/iAsset for my monthly usage. 
  5. While the file was created in my directory – 

As for the reset highest count, I am still evaluating all options and will be discussing this internally. I am hoping this is valuable for our VMware Cloud Providers and alleviating some of the operational reporting burden.

Again, big thanks to the vCommunity for the help. I had quite a bit of fun and continue to learn more from an automation/programming perspective.

Enjoy!

-Daniel

Achievement Unlocked: VMware VCAP 6.5 DCV 3v0-624 Exam – Summary and Tips

I wanted to start off my Monday morning with a bang, so decided to schedule my VCAP 3v0-624 exam for the first in the morning. Well, I passed!

Before walking into this exam, I wasn’t sure if I prepared enough, but I felt kind of comfortable once the exam started. I’d like to share what I did to prepare for this exam, although this is my first ever VCAP-Design.

Summary of Study Material

  1. VMware Education Courses
    1. I took the vSphere: Design Workshop 6.5 course online a few months ago. This was good at providing a fundamental understanding of VMware’s approach to a virtualized design.
    2. However, I’ve taken other design courses (vCloud Director) so I felt that the approach is very similar. While I reflect positively on this class, I think if you’ve taken other design workshop classes and have a firm understanding of the design methodology, you probably can skip (or take another 6.5 class for my next point).
    3. One valuable thing was the instructor was careful to point on what has changed in vSphere 6.5 (or what’s new). This is very important in my opinion for the Design Exam. So again, positive and a good use of time.
  2. Books I read
    1. VMware vSphere 6.x Datacenter Design Cookbook
      1. I thought Hersey Cartwright’s book was solid on giving me a practical understanding of what to expect for a design and items to be thoughtful on.
      2. While Hersey did write this in the vSphere 6.0x days, it’s still very pertinent and covers many of the important business aspects which seem to be overlooked.
    2. IT Architect: Foundation in the Art of Infrastructure Design
    3. While I enjoyed reading this book, I thought there was more VCDX-preparation level material than specific material for this VCAP-Design test. Perhaps it provided me with a well-rounded approach and drove the thought process. Either way, this is one to keep around for any future planning.
  3. Material I used
    1. Print out BOTH the 6.5 Exam Guide AND 6.0 Exam Guide and review both. For my own study method, I ensure I go through EVERY topic and write them out on my whiteboard. I ensure I cover each one to the best of my abilities.
    2. vBrownBag VCAP6-DCV Video Series
      1. This was AWESOME! I spent quite a bit of time going through each video and taking notes.
      2. I felt this material was very pertinent to the 6.5 Design Exam. Although the Visio drawings are not on the test anymore, the design methodologies remain constant and everyone did a great job of walking through each subsection.
    3. VMware Material
      1. Review the VMware Validated Design Material
      2. I downloaded ALL vSphere 6.5 new documents, along with the following:
        1. vSphere 6.5 DRS Performance Whitepaper
        2. Deploying Extremely Latency Sensitive Applications in vSphere Whitepaper
        3. vSphere 6.5 Virtual Machine Encryption Performance Paper
        4. vSphere 6.5 What’s New? Whitepaper vmw-white-paper-vsphr-whats-new-6-5
        5. vSphere 6 Fault Tolerance: Architecture and Performance Whitepaper
        6. Platform Services Controller 6.0 Topology Decision Tree
        7. vSphere Availability – VMware vSphere 6.5 Document 
        8. vSphere Storage – VMware vSphere 6.5 Document
          1. I was pretty comfortable here, so did not review all of this since it’s the standard documentation.
    4. Other Material
      1.   CADs- Constraints, Assumptions (Risk, Requirements) & Dependencies- see attached.
      2. Conceptual_Logical_Physical_It_is_Simple – see attached
      3. Design Example – pretty sure I found this on the VMware Community Forum. design examples – conceptual,logical,physical
    5. vCommunity Material – honestly, this was a huge component as many others have created some great material out there. This is not in any order, all is good and pertinent.
      1. Graham Barker’s VCAP6-DCV Exam Preparation Guide – very detailed for Sections 1 and 2. I loved how he created sample tests to gauge your knowledge of each section.
      2. Matt Callaway’s VCAP6-DCV Design Study Guide – links to many of the videos but other applicable notes he created.
      3. Hersey’s write-up on exam experience and study notes – again, very good and the callout for the books too.
      4. David Stamen’s summary and important notes – I would stress the importance of David’s tips. They are SPOT ON!
      5. Rene van den Bedem’s Availability Explained post – very good and thorough.
      6. VirtualTiers Sample Quiz by Jason Grierson – really cool site that provides a sample design. Again, many of the questions are the Visio-type stitching but drives the thought-process around the design.
      7. vMusketeers VCAP6-DCV Design Quiz – a lot of work was put into this. Again, driving and testing your knowledge

Exam Tips

  1. I think many of the vCommunity members covered a lot of the specific things, but I will point out things that come top of mind.
  2. Know your Requirements, Assumptions, Constraints, and Risks. Practice, practice practice! I had a hard time understanding functional versus non-functional and then it finally clicked for me.
  3. Understand your AMPRS – Availability, Manageability, Performance, Recoverability, and Security. Again, practice these and understand what are the specific metrics and how non-functional requirements can be categorized in each respective role.
  4. Don’t be afraid of reviewing the 5.x and 6.0 VCAP-Design material. Again, all very pertinent.
  5. Be well prepared for anything that has changed in vSphere 6.5. There are many things that may have changed or enhanced so you’ll need to have knowledge of these aspects.
  6. Last of all, make sure you have working knowledge of design scenarios. I think this has to come with experience and dealing with actual customer situations. This does come with time and exposure.

Post-Exam Thoughts

  1. I thought the exam was very challenging, yet fair. Like I said before, this is my first VCAP-Design, so I cannot comment about the Visio-drawings that were required (albeit I heard these were difficult).
  2. Expect a lot of thought process on each question. TAKE YOUR TIME, you will have plenty of time. I had an hour left even after reviewing every question twice.
  3. Expect the multiple choice, select “x”, and drag and drop.
  4. Go with your instinct and ensure you read the questions clearly.

I hope this helps others – cheers!

-Daniel