I had a customer with a production cluster of around 100 VMs. They needed to segment off a few VMs due to PCI compliance, and were looking at a large expense to create a physically separate PCI DMZ. I suggested instead the purchase of our per-VM NSX solution. This is a great cost-effective way to license NSX when you’re in a situation like this that doesn’t require socket licenses for your whole cluster.
The problem with per-VM licensing is with compliance. VMware doesn’t have a KB explaining a way to make sure you aren’t using more than the number of licenses that you bought. If you add a 25-pack of NSX licenses to a cluster with 100 VMs in it, the vCenter licensing portal will show that you’re using 100 licenses but only purchased 25. VMware KB 2078615 does say “There is no hard enforcement on the number of Virtual Machines licensed and the product will be under compliance.” However, this post is related to the way per-socket licensing displays when you add it to vCenter, not related to per-VM pricing.
I’ve had a few conversations with the NSX Business Unit (NSBU) and the intent of per-VM licensing is to allow customers to use the NSX distributed firewall without physically segmenting clusters. You can run NSX-protected VMs in a cluster alongside non-NSX-protected VMs. However, you have to take some steps to ensure that you’re remaining in licensing compliance. This post shows you how to do it.
One way to do this is to avoid using ‘any’ in your firewall rules. If all of your firewall rules are VM to VM or security group to security group, all you have to do is keep the total VM count below your purchased VM count. It is difficult to craft a firewall policy without using ‘any’, though this is the simplest method if your requirements lend themselves to this method.
An alternative way is to use security tags. It’s a bit more involved but lets you have precise control over where your NSX security policy is applied.
First, I create two custom tags, Custom_NSX.FirewallDisabled and Custom_NSX.FirewallEnabled
I then assigned tags to my VMs as shown below. The disadvantage to this method is you have to keep making sure that you security tag VMs. But it does make rule writing easier. I’m only creating two groups – NSX enabled and disabled. However, there’s nothing stopping you from creating multiple tags – maybe you have a DMZ1 and DMZ2, maybe PCI and HIPAA are separate tags.
In this case, I assign all of my PCI VMs the FirewallEnabled tag and the rest of my VMs the FirewallDisabled tag.
Now, instead of going to the Firewall section, I go to Service Composer. Don’t be confused by the fact that the security groups already exist – I took the screenshot of the Security Groups tab after I created the groups.
First, I create an NSX_Disabled group with a dynamic membership of CUSTOM_NSX.FirewallDisabled.
Next, I create an NSX_Enabled security group with a dynamic membership of CUSTOM_NSX.FirewallEnabled
I then specifically exclude NSX_Disabled from the NSX_Enabled group. This guarantees that no firewall rules can touch my excluded VMs.
I create a new security policy in Service Composer
In the Firewall Rules section, NSX has something called “Policy’s Security Groups”. If we assign the policy to the NSX_enabled security group, we can safely use an ‘any’ rule as long as the other side is ‘Policy’s Security Groups’. So source could be ‘any’ if dest is Policy’s Security Groups, or dest could be ‘any’ if source is Policy’s Security Groups. The security group we made enforces that NSX won’t apply rules on VMs that aren’t in the NSX_enabled group.
I then apply my new policy to the NSX_Enabled security group.
Doing a security policy this way is a bit more involved than simply using the Firewall section of NSX, but it’s worth considering. It’s a perfect way to ensure 100% compliance in a per-VM model. It’s also helping you unlock the power of NSX – all you have to do is security tag VMs and they automatically get their security policy.
I’m being told by multiple VMware folks that all powered on VMs have to be licensed. Is there any official documentation that might say otherwise?
I had the same problem internally in that I could not find official documentation regarding what needs to be licensed in the per-VM model. My blog post, while not official VMware policy, is the result of communication with the NSX business unit. I gave my customer an official email with the blessing of the NSX business unit. I am confident that the intent of the per-VM licensing model is NOT to force all powered-on VMs to be licensed. However, I can’t point you to anything official in a EULA. If this is causing a purchasing issue, have your VMware sales folks hit me up internally and I’ll point them to the right NSBU contacts.