Open Guerckan opened 7 months ago
Hello, Guerckan! ๐
Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.
If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.
This item has an upstream dependency on [vmware/govmomi](https://github.com/vmware/govmomi/blob/bf28314d9e3287ad1674f80d8a80d2245c0159ae/vim25/types/enum.go#L4846-L4881)
which would need to support values other than Low, Normal, Medium, and High. Once available and the dependency is updated, the virtualMachineLatencySensitivityAllowedValues
could be updated to support the new value.
For example:
to...
var virtualMachineLatencySensitivityAllowedValues = []string{
string(types.LatencySensitivitySensitivityLevelLow),
string(types.LatencySensitivitySensitivityLevelNormal),
string(types.LatencySensitivitySensitivityLevelMedium),
string(types.LatencySensitivitySensitivityLevelHigh),
string(types.LatencySensitivitySensitivityLevelHighHyperthreading), # Example
}
Please consider opening an upstream enhancement in vmware/govmomi
.
Ryan Johnson Distinguished Engineer, VMware by Broadcom
Thank you for your help @tenthirtyam ! Upstream enhancement request has been opened as requested.
Hello @tenthirtyam ,
So I compared the two JSON VM objects returned by the vsphere web UI for a same VM when configured first on latency sensitivity "High" and then "High with HyperThreading" and it seems that @dougm was right over at (https://github.com/vmware/govmomi/issues/3468). In both cases the value for latency sensitivity was set to "high".
"latencySensitivity": {
"_type": "com.vmware.vim.binding.vim.LatencySensitivity",
"level": "high",
"sensitivity": null
}
However the difference between "high" and "high with HT" is made elsewhere on a property called "SimultaneousThreads". In the first case it is set to 1 and on the second it is set to 2.
"hardware": {
"_type": "com.vmware.vim.binding.vim.vm.VirtualHardware",
"numCPU": 2,
"numCoresPerSocket": 1,
"autoCoresPerSocket": true,
"memoryMB": 2048,
"virtualICH7MPresent": false,
"virtualSMCPresent": false,
"device": [
...
],
"motherboardLayout": "i440bxHostBridge",
"simultaneousThreads": 2
}
So I guess this parameter should be updated by the vSphere terraform provider as well as the latency sensitivity when switching from "normal" to "high with HT". The value for simultaneousThreads is probably to adapt depending on the number of vCPUs configured on the VM.
Anybody to confirm or reject my above hypothesis ?
I've assigned it to myself to review.
Thank you ! Let me know if any additional info is needed.
Community Guidelines
Description
As introduced by vSphere 8.0, the "latency sensitivity" virtual machine setting now has a new possible value named "High with Hyperthreading". See VMWare documentation supporting this statement : https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-F5DAC793-7B13-418F-949E-0CD80CEC5D1E.html
Current provider implementation (2.7.0 at the time of writing) of the resource vsphere_virtual_machine does not support this new value as specified here : https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/virtual_machine#latency_sensitivity
Use Case(s)
This setting is particularly interesting for network appliances virtual machines and the new functionality of "high with hyperthreading" offers a way to reduce the computing power footprint of a latency sensitivity "high" setting on the host without sacrificing much of its advantages.
Potential Terraform Provider Configuration
No response
References
No response