• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Per processor licenses for your application

Duncan Epping · Jun 4, 2009 ·

Some vendors license their application per processor, also in a virtualized environment. So if your VM has 4 vCPU’s your vendor will want you to buy a 4 processor license for the application. But you can avoid this by telling the VM that it has cores instead of processors. In others words, instead of having 4 processors you would have 1 processor with 4 cores:

  1. Power off the VM
  2. Right click on the VM and select “Edit Settings…”
  3. Select the “Options” tab
  4. Click on “General” (in the “Advanced” options section)
  5. Click “Configuration Parameters…” (in the pane on the right)
  6. Click “Add Row”
  7. Enter “cpuid.coresPerSocket” in the “Name” column
  8. Enter a value (try 2, 4, or 8) in the “Value” column
  9. Click “OK”
  10. Power on the VM

The VM will now appear to the OS as having multi-core CPUs with the number of cores per CPU given by the value that you selected. For example, if you create an 8 VCPU VM and set “cpuid.coresPerSocket = 2” it will be recognized as 4 dual-core CPU’s by the OS while it’s actually utilizing 8 physical cores.

Keep in mind that this feature is currently unsupported!

Share it:

  • Tweet

Related

Server ESX, licensing, vcenter, vSphere

Reader Interactions

Comments

  1. jasemccarty says

    4 June, 2009 at 16:15

    Duncan,

    I had success with this in the beta, but upon attempting it with the GA, I didn’t see any difference between 2 vCPUs or 1 dual core vCPU in Windows 2003.

  2. Lukas Beeler says

    4 June, 2009 at 18:00

    Also, remember that this may very well put you in illegal waters. Always make sure to check with the vendor if what you intend to do is actually what they licensed you to do.

    Hyper-V does this automatically, btw. If you have a 4 CPU VM, and the host is running 4 dualcore CPU, the VM will see two dualcore CPUs. If the host is running 4 quadcore CPUs, the VM will see a single quad core CPU.

  3. RobSF says

    4 June, 2009 at 18:11

    Wow, that would be so cool. We run SQL Server in a number of VMs, and SQL is licensed per-socket. So we could save a huge amount of money on SQL licensing alone!

    Does this trick only work on vSphere 4, or can we use it with ESX 3.5u4?

  4. Andrew Cohen says

    4 June, 2009 at 23:41

    I just implemented it in ESX 3.5u2.

  5. wjpatton says

    4 June, 2009 at 23:46

    @Lukas
    I am not certain why you would FUD by saying it could put you in “illegal waters.”

    It would certainly seem reasonable that if I have 4x Dualcore processors in the physical system and I have a 2x vCPU VM that I would rather it show as a single socket Dualcore and would certainly be legal. Same as the example you give from Microsoft’s Hyper-V.

    I could understand your concern if someone was trying to run a 8x vCPU VM on 4x Dualcore as cpuid.coresPerSocket 4.

    However, I would be concerned at that point about performance as I assume you would be limiting Scheduler to run across 2 of your Dualcore processors for each time slice.

    Great information Duncan.

  6. Jason Boche says

    5 June, 2009 at 03:28

    Oh Duncan you are so evil, the lawyers are hot on your trail now. šŸ˜‰ Love this post, it’s one for the 3 ring binder. Thanks!

  7. jole says

    5 June, 2009 at 09:02

    Little unrelated to the post, but is there an list for available “Configuration Parameters” that can be used?

  8. Duncan Epping says

    5 June, 2009 at 11:24

    Lukas, if a vendor doesn’t agree send them to me and I will welcome them into 2009. šŸ˜‰

  9. roidude says

    8 June, 2009 at 07:09

    If you run SQL Server Enterprise, you only need license it for the underlying CPUs, and you can then run unlimited instances of SQL Server. With a 2-CPU Intel 5500 based server, you should be able to run lots of SQL Server so this can potentialy provide a quick payback.

  10. kiddkoala says

    8 June, 2009 at 13:04

    Surely this could undermine the VMWare limitation of 8vCPU included with Enterprise Plus edition of vSphere?

  11. wjpatton says

    8 June, 2009 at 14:41

    @roidude, actually you have to license based on vCPUs assigned to each VM.
    When you assign 2, 4 or even 8 vCPUs currently they will be presented to the guest as distinct sockets.
    With the change Duncan has identified, you can present your underlying hardware of multiple cores per socket to the VM and properly license your SQL instance.
    @kiddkoala, how so? This would simply allow you to properly present your underlying hardware up to a new maximum of 8 vCPUs. Sounds perfect to me. This doesn’t change how many vCPUs can be presented to a guest, just HOW they are presented.

  12. Duncan Epping says

    8 June, 2009 at 15:04

    indeed, it doesn’t limit scheduling or the amount of vCPU’s just how the GOS sees these.

  13. wjpatton says

    8 June, 2009 at 16:07

    Duncan,
    Have you received any confirmation of support on this? I have submitted it through our Rep as well and have not received any information.

    Thank you.

  14. Duncan Epping says

    8 June, 2009 at 16:22

    Experimental support only at the moment.

  15. kiddkoala says

    9 June, 2009 at 11:38

    Apologies for my previous comment, I have reread and now fully understand – it will not undermine the licensing at all.

  16. Jason Litka says

    12 June, 2009 at 20:37

    Thank you! I migrated a SQL server to ESXi a while back and had to move from a single-socket, quad-core to a single vCPU because I couldn’t get the OS to detect a second vCPU as a second core and not a separate socket.

  17. Matt says

    16 June, 2009 at 17:37

    Aside from making it easier/cheaper to license per applications per socket, what other uses does this have?

  18. John B says

    19 June, 2009 at 15:07

    This is fantastic for VDI deployments. Windows XP has a 2 socket limit, so normally that would be 2 virtual cpu’s. But if I buy a high power desktop I can install 2 quad core processors giving me 8 cpu’s. Now I can do this on a VM running XP too! Awesome.

  19. sahaynes says

    7 July, 2009 at 21:57

    Important note to this.

    “The number of VCPUs must be divisible by cpuid.coresPerSocket. So if your VM was created with
    8 VCPUs, coresPerSocket can only be 1,2,4, or 8.”

    I didn’t quite get the process the first time so maybe this will help the next person to come along.

    You first have to determine how many cores you need. If you need 8 cores then assign 8 VCPUs to your machine. Then if you set coresPerSocket to 4, ESX will assume you mean 2 Quad core processors. I first made the assumption that I would assign 1 vCPU and then set coresPerSocket to 2 to get 1 dual core CPU and it just doesn’t work that way.

  20. Pete says

    2 October, 2009 at 18:09

    We have some XP machines we use to build/compile our software for that given platform, and have run into the 2 processor limitation already. Can anyone confirm that they have bumped this up to say 4 cores (2 sockets with 2 cores) or 8 cores (2 sockets with 4 cores) successfully? does this have an adverse affect on co-scheduling that is different from a VM/OS that is allowed to have 4 or 8 sockets?

  21. slatribat says

    9 October, 2009 at 11:17

    Andrews says:
    –
    I just implemented it in ESX 3.5u2.
    –

    Has anyone else done this on esx 3.5 ?

    Regards
    Anders

  22. Mark says

    5 November, 2009 at 17:38

    For those of us with Microsoft SQL – They have recently clarified their Processsor based licensing. Licensing for SQL is based on the PHYSICAL processor / per VM. Within a VM, if the host has 4 cores per socket, then a single processor license would allow you to present 4 Virtual Processors to the VM. This was first clarified in answer to a question I posed to a Licensing person at MS – see http://ladylicensing.spaces.live.com/blog/cns!87F95F1B5B21B01E!1558.entry?ccr=136#comment . The official licensing page for SQL 2005 has also been updated to make this a bit more clear.

    Hope that helps!

  23. Aaron says

    31 May, 2010 at 04:41

    Doesn’t seem to address the problem that it only lets me assign 2 vCPU’s to my XP VM. Not sure if changing the OS type is also required before it will let me do that but am going to give it a shot…

  24. Aaron says

    31 May, 2010 at 04:49

    Update to previous – doesn’t seem to work on ESX 4.0

  25. ck says

    14 June, 2010 at 17:24

    This didn’t seem to work for me in ESXi. I’m running windows 2k8R2 standard. Even after adjusting the “cpuid.coresPerSocketā€ i’m unable to allocate 8vcpu’s. I had 4 to begin with. I shutdown the vm and tried the “cpuid.coresPerSocketā€ with 2 and 4. Every time I attempt to increase the vcpu’s it tells me that “Virtual machine has 9 vcpu’s but the host only supports 4. The number of vcpu’s may be limited by the guest OS selected for the virtual machine or by the licensing for the host”. I know for a fact that windows 2k8R2 can take advantace of dual core hyperthreaded procs. Any ideas?

  26. Aaron says

    28 June, 2010 at 04:38

    Just tried this again and in ESX 4.0 this works fine as per all the other posts – I just needed to do an update hardware on the VM.

  27. jivetolkein says

    14 September, 2010 at 10:23

    CK – you’re restricted by your VMWare licences to 4 vCPUs

    If you had Enterprise Plus, you could supply 8 vCPUs – this trick is merely a way of changing the presentation of the processors – as multiple cores in single or more sockets. This is useful to allow a VM to behave the same as a similar physical machine.

    Example – we have an app that requires 8vCPUs but W2K3 x64 Std. only supports 4 sockets. If we present them without this tweak we can only use 4 vcpus in the OS. Changing this setting to dual cores per socket means we present 4 sockets, but 8 cores, which is, as the youth say, for the win!

    Any news on if this is officially supported in 4.1?

  28. Duncan Epping says

    14 September, 2010 at 10:35

    it is officially supported as of 4.1

  29. Jared Wildes says

    23 October, 2010 at 08:42

    I tried this with ESXi 4.1 on a CentOS x86_64 Guest i added cpuid.coresPerSocket and then 4 in the value and powered on the VM, It still only recognized (4) Cores. I’m trying to get it up to 8. Any Ideas?

  30. wharlie says

    9 November, 2010 at 01:35

    Jared,
    Do you have the “enterprise plus” version?
    With normal “enterprise” version you will only ever see max 4 processors (or cores).

  31. APN says

    29 November, 2010 at 04:09

    I have set the value as per the KB Article: 1010184 but my 2003 server still does not report multiple cores using CPU-Z utility to show cores, please help with pointers as to what i am doing wrong.

  32. wowbagger says

    30 November, 2010 at 13:23

    Since the max. vCPU is 8, does this mean the maximum cores would be 8 (one core to one vcpu)? Or can I use this to get more cores?

    For instance I have a 2 socket 6 core server and I want to use the 12 cores in 1 VM, would that work?

  33. Ken says

    21 December, 2010 at 21:07

    Is this parameter addition enabled for the free version of ESXi 4.1? Or perhaps only the paid licensed versions?

    I have a W7-64 vm on a Dell R710 with dual quad-core processors. They also have hyper-threading enabled giving me a total of 16 logical processors. I am trying to get my W7 vm to have 4 cpus through whatever means possible. I tried to assign the vm 4 processors, assign the vm 2 processors with 2 cores, and just a single processor with 4 cores through the above method, but cannot seem to do so. My only guess is that this feature is not available for the free version.

    Any know this to be the case? Perhaps I’m overlooking something simple? Any help would be appreciated.

  34. Faisal Farooqui says

    5 January, 2011 at 15:59

    I am experiencing the same issue of trying to assign 1 vCPU and 4 cores, but the OS doesn’t recognize the additional cores. Im on ESXi 4.1 here and guest OS is Win2k8R2.

  35. Bennice says

    26 January, 2011 at 19:22

    Same thing for me in initial testing. Regardless of how many vCPUs I allocate, the settings change is not reflected in the guest OS.

  36. Ryan says

    14 February, 2011 at 18:49

    I too am having trouble. I’d like to set 1 vCPU to have 4 cores, Page 79 of this document: http://www.vmware.com/pdf/vsphere4/r41/vsp_41_vm_admin_guide.pdf leads one to believe that it’s possible.

    However, setting 1 vCPU with 4 cores does not work. 1/4=.25 (not an integer) and 4 vCPU with 1 core just shows 4 single core CPU.

    2 vCPU + 2 coresPerSocket works, as does 4 vCPU with 4 coresPerSocket. But I can’t get any other combination (2 cpu / 4 core etc) to work.

    • William Votta says

      8 March, 2011 at 19:21

      You just have it backwards. 4 cores in 1 cpu is 4 vCPU’s and 1 cpuid.coresPerSocket (which is the same as never adding the cpuid.coresPerSocket row and setting 4 vCPU’s as far as 32bit XP Pro is concerned and you’ll only see 2 CPUs in the guest). Setting both values to equal each other cancels out and makes the total number match. 4 vCPU’s and 4 cpuid.coresPerSocket still shows in XP Pro as 2 CPUs (at least it did for me), as did them both set to 2. I had to set the vCPU’s to 4 and the cpuid.coresPerSocket to 2.

  37. computer towers says

    28 February, 2011 at 18:26

    is measured in megahertz (MHz) or these days in gigahertz (GHz).

  38. William Votta says

    8 March, 2011 at 19:18

    A little clarification for those that didn’t get it at first (like me). You want the configured number of processors to be the total amount of cores you want to see. The number of physical sockets becomes a math equation that goes like this:
    Number of processors / cpuid.coresPerSocket = sockets.

    Kinda makes sense and made me feel stupid for not getting it. Anyway, that means you want your set number of CPUs to be higher than your coresPerSocket. So the max for ESXi without any licensing running Windows XP Pro is 4 cores. So set the CPUs to 4 and the cpuid.coresPerSocket to 2 and voila. You now have 4 processors in the task manager’s performance tab, and finally, a decent running 32bit XP box!

  39. Marco Eegdeman says

    6 August, 2011 at 22:52

    Just applied it on a ESXi 4.1 with Enterprise Plus license with a VM with SBS2011 and it works great.

    The problem was the Windows Server 2008 just allow’s 4 sockets. My assigned 8vCpu’s where not used, only 4 of them.

    Set “cpuid.coresPerSocket” to 2 and now I have 8 Core’s in Windows 2008 instead of 4.

  40. Marc says

    7 December, 2011 at 00:40

    Has anyone tried to make this change on a Linux VM? I just did it recently and there was a very significant difference in how the guest OS views the change AND the VM performance.

    Initial configuration:
    – OS Red Hat 5
    – VMware Assignment 4 vCPUs (no cpuid.coresPerSocket configuration)
    -OS view of /proc/cpuinfo showed 4 processors (no “cpu cores” line)
    – time to complete CPU intensive load task 30+ minutes

    Updated configuration:
    – OS Red Hat 5
    – VMware Assignment 4 vCPUs (4 cpuid.coresPerSocket configuration)
    -OS view of /proc/cpuinfo showed 4 processors AND a new line for “cpu cores: 4”)
    – time to complete identical CPU intensive task 4 minutes

  41. Chung Fabrizius says

    18 May, 2012 at 00:59

    Thx for information.

  42. web site says

    12 February, 2013 at 00:49

  43. sc2111 says

    22 August, 2013 at 14:03

    Duncan , apart from the licensing benefit , is there a real difference ( from performance view ) between a VM with 4vcpu*1vcore and one with 2vcpu*2vcore
    thanks

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the ā€œvSphere Clustering Technical Deep Diveā€ series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

Feb 9th – Irish VMUG
Feb 23rd – Swiss VMUG
March 7th – Dutch VMUG
May 24th – VMUG Poland
June 1st – VMUG Belgium

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 Ā· Log in