quarta-feira, agosto 08, 2018

Racio CPUs to Virtual CPUs no VMware

Racio CPUs to Virtual CPUs no VMware

$allhosts = @()
$cluser2hosts = Get-VMHost | where {$_.Parent -LIKE "ClusterName"} 
foreach ($vmhost in $cluser2hosts)
{
   $vms = $vmhost | Get-VM | select name,numcpu | measure -Property numcpu -Sum
   $hostload = New-Object psobject -Property @{
            hostname = $vmhost.Name
            PhysicalCPUs = $vmhost.NumCpu
            vCPUs = $vms.Sum
            hostratio = $vms.sum / $vmhost.NumCpu
    }
    $allhosts += $hostload 
}

$allhosts  | select hostname,physicalCPUs,vCPUs,hostratio | sort hostratio


para Powershell

Sem comentários:

LinkWithin

Related Posts Widget for Blogs by LinkWithin