We have lots and lost of hosts and would like to do a Host Summary Report across the board. From VIC I can only do this one host at a time. it would be nice to select a Datacenter or the whole inventory and run this report. Any ideas on how to do something like this?
Regards,
Garrett
What specifics are you looking for in the host summary report? It is fairly simple to write powershell scripts using the VI toolKit and export whatever data you like to a csv file.
Here is a simple script that will give you inforamtion about a vm. It will give you the Name, host, powerstate, memory, numcpu, IP, & hostname.
$IPprop = @{ Name = "IP Address"; Expression = { $_.Guest.IpAddress } }
$HostNameProp = @{ Name = "Hostname"; Expression = { $_.Guest.Hostname } }
Get-VM | select name, host, powerstate, MemoryMB, numCPU, $IPprop, $HostNameProp | export-csv c:\vm_info.csv
-Sid Smith
http://www.dailyhypervisor.com
I would use scripting, this one shows which VM is on a host, and it's state.
root@vmhost01 root# cat list-vms
#!/bin/sh
#
/root/list-vms
#
Purpose : list the vms registered on the ESX host and displays their status
#
2009-03-10 Harry C started
for VM in `vmware-cmd -l | cut -f5,6 -d"/" `
do
echo $VM
VMX=`ls -d /vmfs/volumes/[vV]*/$VM`
vmware-cmd $VMX getstate
done
root@vmhost01 root#
you could replace vmware-cmd ... getstate with whatever more verbose command you would like - any inputs on which command would give the most (useful) info ?
What specifics are you looking for in the host summary report? It is fairly simple to write powershell scripts using the VI toolKit and export whatever data you like to a csv file.
Here is a simple script that will give you inforamtion about a vm. It will give you the Name, host, powerstate, memory, numcpu, IP, & hostname.
$IPprop = @{ Name = "IP Address"; Expression = { $_.Guest.IpAddress } }
$HostNameProp = @{ Name = "Hostname"; Expression = { $_.Guest.Hostname } }
Get-VM | select name, host, powerstate, MemoryMB, numCPU, $IPprop, $HostNameProp | export-csv c:\vm_info.csv
-Sid Smith
http://www.dailyhypervisor.com
Ahhh! Powershell and the VI toolkit... Good answer. Since the VI DB is SQL I wonder if we could use SQL Reporting Services as well.
Thanks,
Garrett