VMware Cloud Community
CCJNL
Enthusiast
Enthusiast

vSphere 5 License Query Script - Results Thread

I'm not sure if this has type of results thread has been started else where but I am interested to see what the real world scenarios are and how VMware's customers may or may not be affected.

Some nifty scripts have appeared that cut right to the chase and informs you if you are currently using more or less vRAM that you would be entitled to  under vSphere 5 licensing rules.

Check the scripts out here and post your results!!!

  

AuthorLink
Alan Renoufhttp://www.virtu-al.net/2011/07/14/vsphere-5-license-entitlements/
LucDhttp://www.lucd.info/2011/07/13/query-vram/
Hugo Peetershttp://www.peetersonline.nl/index.php/vmware/calculate-vsphere-5-licenses-with-powershell/

Cheers!

-Justin

Edit:

It is worth noting that as Hugo mentioned on his blog, his script "assumes the environment is homogeneous, so uses only one type of edition."  I've also had feedback that it does not take into consideration how many CPU licenses are registered in vCenter.  Rather it looks at how many CPU licenses are in use by the hosts managed by vCenter.  What that means is that if you own 36 CPU licenses but are only using 22 CPUs, the calculation will be based off of 22, not 36.

Reply
0 Kudos
56 Replies
FredPeterson
Expert
Expert

62GB is available for new guests.

Reply
0 Kudos
peterkho
Contributor
Contributor

Here is what we have. 

-----------------------------------------------------------------------------------

CCVC4:

------

pCpu Count: 8

vRAM (GB):  110

Edition                    Entitlement                Licenses               

-------                    -----------                --------               

Essentials/Essentials P... 1 pCpu + 24 GB vRAM        8 with 82 GB vRAM overhead

Enterprise                 1 pCpu + 32 GB vRAM        8 with 146 GB vRAM overhead

Enterprise Plus            1 pCpu + 48 GB vRAM        8 with 274 GB vRAM overhead

-----------------------------------------------------------------------------------

CCCOLOVC:

---------

pCpu Count: 10

vRAM (GB):  48

Edition                    Entitlement                Licenses               

-------                    -----------                --------               

Essentials/Essentials P... 1 pCpu + 24 GB vRAM        10 with 192 GB vRAM overhead

Enterprise                 1 pCpu + 32 GB vRAM        10 with 272 GB vRAM overhead

Enterprise Plus            1 pCpu + 48 GB vRAM        10 with 432 GB vRAM overhead

-----------------------------------------------------------------------------------

Reply
0 Kudos
digitlman77
Enthusiast
Enthusiast

Ahhh..you mean 62G is avail for *ALL* running guests, right?

Reply
0 Kudos
CCJNL
Enthusiast
Enthusiast

You'll have 62GB you will be allowed/licensed to give out to new powered on VM's or existing powered on VM's.

Reply
0 Kudos
digitlman77
Enthusiast
Enthusiast

Right, 62Gb maximum for all running guests.

Total for all my hosts.

That sucks.

Reply
0 Kudos
SAN_USER
Contributor
Contributor

No, that 62GB overhead (should actually be headroom - overhead sounds like it's unusable for VMs) is available in addition to whatever you have running at the moment (the 226GB line near the top).

Yeah, you are somewhat hosed if you want to use all of the physical RAM in your clusters. Join the club. 😞

Reply
0 Kudos
ferdis
Hot Shot
Hot Shot

Hi,

I have tried both methods from two separated VMware PowerCLI stations against 3 different 4.1 vCenters but without success. I got latest VMware PowerCLI on both stations.

Clipboard01.png shows result for Alan Renouf Get-vSphere5Licenses script.

Clipboard02.png shows result for LucD Get-vRAMInfo function.

Clipboard03.png shows result for LucD Get-vRAMInfo function when I first run script by copy paste and run in VMware PowerCLI command line and then run Get-vRAMInfo command.

Clipboard04.png shows result for LucD Get-vRAMInfo function on one of my PowerCLI station against one of my vCenters when I used . ./Get.. .ps1 to load a function.

Clipboard05.png shows result for LucD Get-vRAMInfo function on other one of my PowerCLI station against other one of my vCenters when I used . ./Get.. .ps1 to load a function.

Please can you give me a hint? Please what Im doing wrong?

Thanks.

Frantisek

Reply
0 Kudos
LucD
Leadership
Leadership

I assume you stored the function in that .ps1 file ?

If yes, you have to dot-source the file to 'load' the function.

. ./Get-vSphere5Licenses2.ps1

Yes, that is a dot followed by a blank at the beginning.

Afterwards you can call the function from the PS prompt

Get-vRAMInfo


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
WessexFan
Hot Shot
Hot Shot

So, i am assuming under my normal Enterprise licensing, that I have 405GB of memory to allocate to every single one of my guests..

VCP5-DCV, CCNA Data Center
Reply
0 Kudos
ferdis
Hot Shot
Hot Shot

Hi Luc,

thank you very much for your prompt response. I have tried . ./Get.. .ps1 to load function but no success. You can see screenshots 04 and 05 I have updated to my reply.

Reply
0 Kudos
digitlman77
Enthusiast
Enthusiast

ferdis,

try exiting Powershell and try again.

Reply
0 Kudos
ferdis
Hot Shot
Hot Shot

Hi digitlman,

thanks for response but no sucess. It just reports same as in 04 05 screenshots from my original response. Only difference is that it repeats more sentences which are the same:

Row 31 char:56 "A parameter cannot be found that matches parameter name 'Property' "

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

Hi

I know this doesn't answer your initial question, but you may want to try a different method.  The results of the below script will pull from your license manager, not powered on guests (what is currently in use). Both methods are great, but for me, I like to see what is currently in use.

http://www.virtu-al.net/2011/07/14/vsphere-5-license-entitlements/

Reply
0 Kudos
ferdis
Hot Shot
Hot Shot

Hi Troy,

I run License Validator on two VMware PowerCLI v 4.1 machines against two vCenter 4.1 but it generated a lot of errors. So no success again. It generated report with no data.

Thanks.

Frantisek

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

yes, I see you already stated Alans code errors too.  I guess I should read the thread a bit better.  I'm no PowerShell guru, just barely a novice, but do you have the most recent version of PowerCLI

> Get-PowerCLIVersion

PowerCLI Version
----------------
   VMware vSphere PowerCLI 4.1 U1 build 332441
---------------
Snapin Versions
---------------
   VMWare vSphere PowerCLI 4.1 U1 build 332441

Reply
0 Kudos
ferdis
Hot Shot
Hot Shot

Hi,

yes I have latest VMware PowerCLI:

VMware vSphere PowerCLI 4.1 U1 build 332441

I got more vCenters. One with 4.1 258902 release, and others with 4.1 U1 345043 release.

All vCenters are Windows 2008.

VMware PowerCLI machine one is Windows XP SP3.

VMware PowerCLI machine two is Windows Server 2003 SP2.

Reply
0 Kudos
LucD
Leadership
Leadership

It looks as if you are running PowerShell v1.

The function requires PowerShell v2.

Do you have a W7 or W2K8R2 box where you can try the script ?

Those have PowerShell v2 by default.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

I'll tap out because I don't want to lead you down a road of no return.  I'm sure the PowerCLI gurus will come to the rescue soon.

You may also want to open a new thread in the VMware vSphere™ PowerCLI Community to get a bit better exposure.

Reply
0 Kudos
ferdis
Hot Shot
Hot Shot

You are right!!! Smiley Happy

Problem was that I had PowerShell v1 on my XP and Win 2003 machines.

Now after upgrade to PowerShell v2 everything is going well.

Luc, THANK YOU SO MUCH!!!! Smiley Happy

You know that feeling when someone help you to move forward? YOU HELP ME SO!!!!!!

Once again, big thank you!!! Smiley Happy

Reply
0 Kudos
slaclair
VMware Employee
VMware Employee

If you guys are having problems with the scripts and just want the numbers then you can run this single cmdlet after connecting to vCenter to pull the current configured vRAM amount.

>Get-VM | Measure-Object -Property MemoryMB -Sum

It will return the total configured memory in MB, so divide by 1000 to change to GB

VCAP5-DCD/DCA/CIA, VCA4-DT
Reply
0 Kudos