Determine if an Host has Hypertreading enabled
-
We are working on an integration between Octopus Cloud, a Microsoft-certified licensing tool that measures the required Microsoft SPLA licenses in your network. For the integration, we are currently working with the REST API. We have a basic prototype in place but are encountering the following issue.
To determine how many licenses you need to purchase for Windows, it is important to ascertain the number of physical processors a machine has and the number of cores present. A machine with 16 cores per socket and 2 sockets has 32 cores that need to be counted for the license. However, when Hyperthreading is enabled, XOA indicates that there are 64 cores/CPUs present. It's not a problem if you know that Hyperthreading is enabled because you can deduce this, but it seems that it's not visible through the API whether this is turned on or not, while it is visible in the interface. How can this be resolved? Are we missing something, or is this information lacking in the API?
-
Hi,
The REST API do not have exactly all the features yet. But let me ask @julien-f if it's exposed in the host info.
-
@olivierlambert Thank you, we have noticed that. Additionally, what seems to be missing at the moment is the VM host affinity, which would be beneficial to include in the output. The reason is that these metrics are essential for determining licensing needs. For Microsoft hosting partners, having a management system like Octopus is crucial to remain compliant in their SPLA reporting every month. We have recently undergone a Licensing audit, and I can confirm that it is challenging without this information.
I believe the adoption of XCP-NG by a product like Octopus Cloud is broadening the customer base for XCP-NG. Therefore, it would be a valuable addition!
-
You can always use the JSON-RPC API that is feature complete (ie everything you see in the web UI comes from it), but it's less fun to use. Let us know if there's other missing features so @julien-f can check to integrate them in the REST API for a next release
-
@olivierlambert Thank you, i will sumarize them and add the requirements into a feature request.
Sorry for my dumb questions ;-), but i am wondering how to use the JSON-RPC API, is there some documentation on that? i can then share that with the developers so we can integrate that as well.
-
-
@olivierlambert thank you.
i asked the dev about the info they would like to pull from the api. i added a feature request over the support portal as well.
"As per feedback from the OC Dev team, we would need the following additional XenOrchestra RESTful API calls:
- info about affinity hosts,
- info about host OS,
- used space (in bytes) for virtual drives, endpoint: "rest/v0/vdis"
- info about drives type (DVD, Removable disks, USB, local storage, ...) for endpoint: "/rest/v0/srs"
Number 3, and 4 would be interesting if you would like to see disk space info for the hypervisors, like VMware has
" -
Hyperthreading status is not part of the REST API because it's not part of the XAPI itself, it requires a call to a plugin on the host.
Which is why it's not part of the XO host object, it requires a calls to
host.isHyperThreadingEnabled
on the JSON-RPC API.For the other questions:
- VMs have a
affinityHost
field containing the host's UUID - See
productBrand
andversion
fields in hosts - Checkout the
usage
field in VDIs - See
SR_type
andcontent_type
in SRs
- VMs have a
-
@julien-f i have discussed with our developer and i would like to ask you the following
As per their feedback, the XCP-NG API itself gives the double amount of cores per CPU in its output.
For a 2 CPU x 16 core configuration, the system gives 32 cores per CPU, instead of 16.
Please consult with Vates, if they can modify the current API/CPU core count enumeration, to show the actual physical CPU core counts, instead of logical ones in the API output.
-
@rtjdamen Please give me the name of the class field and its value in the XAPI and the same in XO REST API so we can compare.
-
@rtjdamen You'll likely just need to take a look at
cpus
field and multiplycores
andsockets
. -
@julien-f Hi julien, the cpu field gives a incorrect view of the real world. because of the hypertreading enabled it gives you double the number of cpu cores there actually is. We are looking for a good way to determine REAL PHYSICAL cores. Reason for that is Microsoft is licensing datacenter licenses on a physical core basis. can u help us with the correct way to find this out?
in Xoa there is a field shown for hypertreading enabled. if that value is shown into the rest api we are there, but if it is not we need a different way to find out if this is enabled or not. -
@julien-f the HT detection we created (via a plugin) is already detecting "threads_per_core" or something like that. IIRC, in XO, if it's >1, we can tell hyperthreading is enabled. So we might need to expose thread per core or something equivalent we did in XO directly in the REST API
-
@rtjdamen REST API now expose the SMT status: https://github.com/vatesfr/xen-orchestra/commit/7fc5d62ca95ba91666f5d5a2268a7871c484ac6a
-
Also, we are working to get the info directly in XAPI: https://github.com/xapi-project/xen-api/issues/5462
-
@julien-f do i need to update anything on my end to get this visible? or is this centrally managed?
-
@rtjdamen You need to rebuild your
xo-server
if you are using it from the sources. I you are using an official XOA, you will need to wait for the next release (last day of the month) and upgrade using thelatest
channel. -
@olivierlambert is it possible to apply this changes allready to our XOA? it would help with the development.