Hi , can you someone help me to extract no of vcpu per vm
a report for all VM’s number of virtual sockets
This you can achieve from within the vSphere Web Client and the old vSphere Client.
Here is the way using the Web Client.
Click on Host and Clusters. Choose whether you need a list of VM on a vCenter Server, Datacenter or Cluster level.
If you need a list of all VMs choose the vCenter server and go to related objects. There you will find a tab for Virtual Machines, click it.
In the bottom, to the right, there is a export icon looking like this:
Click the icon. Then you can choose what information you want to export. By default the CPU count is not included, so you need to check the box. See the example below:
Hope this helps.
\Ibrar
Hi Friend,
You can go through this blog to understand cores/sockets/vcpus: These are great articles:
vCPU configuration. Performance impact between virtual sockets and virtual cores? - frankdenneman.nl
Sizing VMs and NUMA nodes - frankdenneman.nl
This post also will help you out:Re: List total number of vCPU per ESX host to avoid CPU over allocation when deploying VM
You can use ESXTOP : Please explore :http://www.yellow-bricks.com/esxtop/
Thanks but i need to have script to collect only the VSocket
Welcome to the Community,
Please take a look at e.g. Re: PowerCLI - Get number of cores per cpu and number of sockets to see whether this meets your requirements. Alternatively, you can get such information using RVTools
André
i need to have script to collect only the VSocket
Please i need your support .
The link I posted before contains a PowerCLI script. Did you see this?
André
thanks but i need only to get the VSocket count not the total vCPU .
Is it this what you need?
$result = @()
$vms = Get-view -ViewType VirtualMachine
foreach ($vm in $vms) {
$obj = new-object psobject
$obj | Add-Member -MemberType NoteProperty -Name name -Value $vm.Name
$obj | Add-Member -MemberType NoteProperty -Name vSockets -Value ($vm.config.hardware.NumCPU / $vm.config.hardware.NumCoresPerSocket)
$result += $obj
}
$result
André
not working ......
thanks but i got the same result .
Attempted to divide by zero.
At C:\Users\559702\Desktop\vCPUs.ps1:6 char:100
+ $obj | Add-Member -MemberType NoteProperty -Name vSockets -Value ($vm.config.hardware.NumCPU / <<<< $vm.co
ig.hardware.NumCoresPerSocket)
+ CategoryInfo : NotSpecified: (:) [], RuntimeException
+ FullyQualifiedErrorId : RuntimeException
Attempted to divide by zero.
At C:\Users\559702\Desktop\vCPUs.ps1:6 char:100
+ $obj | Add-Member -MemberType NoteProperty -Name vSockets -Value ($vm.config.hardware.NumCPU / <<<< $vm.co
ig.hardware.NumCoresPerSocket)
+ CategoryInfo : NotSpecified: (:) [], RuntimeException
+ FullyQualifiedErrorId : RuntimeException
Attempted to divide by zero.
At C:\Users\559702\Desktop\vCPUs.ps1:6 char:100
+ $obj | Add-Member -MemberType NoteProperty -Name vSockets -Value ($vm.config.hardware.NumCPU / <<<< $vm.co
ig.hardware.NumCoresPerSocket)
+ CategoryInfo : NotSpecified: (:) [], RuntimeException
+ FullyQualifiedErrorId : RuntimeException
Attempted to divide by zero.
At C:\Users\559702\Desktop\vCPUs.ps1:6 char:100
+ $obj | Add-Member -MemberType NoteProperty -Name vSockets -Value ($vm.config.hardware.NumCPU / <<<< $vm.co
when i rerun it with "NumCoresPerSocket" i got 0 value . why ?
You can also use RVTools for collecting this info.. http://www.robware.net/
Export the vCPU info to Excel and sort it..
/Rubeck
no Vsocket in the RVTools
no Vsocket in the RVTools
No?
/Rubeck
Thanks but which version you used for RVTools