1

I run the following powercli 5.5 command , to get info about a host vm :-

Get-VMHost |Export-Csv -Path c:\VM.csv -NoTypeInformation –UseCulture 

and I got these info :-

State ConnectionState PowerState VMSwapfileDatastoreId VMSwapfilePolicy ParentId IsStandalone Manufacturer Model NumCpu CpuTotalMhz CpuUsageMhz LicenseKey MemoryTotalMB MemoryTotalGB MemoryUsageMB MemoryUsageGB ProcessorType HyperthreadingActive TimeZone Version Build Parent VMSwapfileDatastore StorageInfo NetworkInfo DiagnosticPartition FirewallDefaultPolicy ApiVersion Name CustomFields ExtensionData Id Uid Connected Connected PoweredOn WithVM Folder-ha-folder-host TRUE HP ProLiant DL365 G5 8 18400 1402 5M230-08JDM-J8R41-05NH4-2DR3N 16381.85547 15.99790573 13184 12.875 Quad-Core AMD Opteron(tm) Processor 2356 FALSE UTC 5.0.0 623860 host HostStorageSystem-storageSystem localhost: mpx.vmhba1:C0:T0:L0 VMHostFirewallDefaultPolicy:HostSystem-ha-host 5 172***.101 VMware.VimAutomation.ViCore.Impl.V1.Util.ReadOnlyDictionary`2[System.String,System.String] VMware.Vim.HostSystem HostSystem-ha-host /VIServer=root@***:443/VMHost=HostSystem-ha-host/ 

But I have these 2 questions:-

  • under the networkinfo column I got the following "localhost:" instead of getting the host ip, mac, et.. so what is causing the Networkinf to not show the actual network info ?

  • for the NumCpu column I got 8, which is the number of cores in our case. as in our case we have 2 processes with 4 cores on each processor. so my question is how I can get the number of processes (2 in our case) instead of getting the number of cores ?is this possible ?

1 Answer 1

2

Under the networkinfo column I got the following "localhost:" instead of getting the host ip, mac, et.. so what is causing the NetworkInfo to not show the actual network info ?

The NetworkingInfo property is actually an object of the VMHostNetworkInfo type, who's string representation is the host's 'Name' and 'Domain' glued together with a colon. This translates to what the host thinks it's hostname and domain are, and should be configured to match the FQDN.

You can change it with using the Set-VMHostNetwork cmdlet as outlined here.

$vmHostNetworkInfo = Get-VmHostNetwork -Host Host Set-VmHostNetwork -Network $vmHostNetworkInfo -DomainName eng.vmware.com -HostName Host1 

For the NumCpu column I got 8, which is the number of cores in our case. as in our case we have 2 processes with 4 cores on each processor. so my question is how I can get the number of processes (2 in our case) instead of getting the number of cores ?is this possible ?

It is possible, but you have dig a little deeper down the object structure of the host to get it. It's found in the ExtensionData.Summary.Hardware.NumCpuPkgs property of a given VMHost object.

You can get it thusly:

$VmHost = Get-VMHost <hostname> $HostSockets = $VmHost.ExtensionData.Summary.Hardware.NumCpuPkgs 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.