Collection: List of all Virtual machines and their Physical host System Name

List of all Virtual machines and their Physical host System Name

 

 

This report lists all the virtual machines and also adds the PhysicalHostName0 property. This tells you the name of the host server the virtual system is sitting on.

Here is the report syntax:

SELECT distinct SYS.Netbios_Name0, Gvm.PhysicalHostName0, SYS.User_Name0,
SYS.Resource_Domain_OR_Workgr0,OPSYS.Caption0 as C054, OPSYS.Version0, ENCL.Manufacturer0,
CSYS.Model0, Processor.MaxClockSpeed0, MEM.TotalPhysicalMemory0, WSTATUS.LastHWScan
FROM v_R_System SYS
LEFT JOIN v_GS_VIRTUAL_MACHINE  gvm ON SYS.ResourceID=gvm.ResourceID
LEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceID
LEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceID
LEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceID
LEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceID
LEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID=OPSYS.ResourceID
LEFT JOIN v_GS_PC_BIOS BIOS on SYS.ResourceID=BIOS.ResourceID
LEFT JOIN v_GS_SYSTEM_ENCLOSURE ENCL on SYS.ResourceID=ENCL.ResourceID
LEFT JOIN v_GS_WORKSTATION_STATUS wSTATUS on SYS.ResourceID=WSTATUS.ResourceID
LEFT JOIN v_R_User USERS on SYS.User_Name0 = USERS.User_Name0
WHERE OPSYS.Caption0 is not null and CSYS.Model0 = 'Virtual Machine'
ORDER BY SYS.Netbios_Name0, SYS.Resource_Domain_OR_Workgr0

 
Enjoy,
-------------------
Thanks,
http://sccm07.blogspot.com/

0 comments:

Post a Comment