Hello,
I have the below query to fecth all VM details. Below is the query:
select --VM Info hg.Name as [Host Group], h.ComputerName as [Host Name], CONVERT(varchar,vo.CreationTime,105)as[Created On], vo.Name as [VM Name], vmi.ComputerName as [Computer Name], --Generation Info hwp.Generation, vmi.VMAddition, --Boot Options vmi.StartAction, vmi.StopAction, ISNULL(hwp.BootOrder,'Not Applicable')as[Boot Order], CASE ISNULL(hwp.SecureBootEnabled,0) When 0 Then 'No' When 1 Then 'Yes' End as [Secure Boot Enabled], ISNULL(hwp.FirstBootDevice,'Not Applicable')as [FirstBootDevice], /*Hardware Info*/ --Processor Info hwp.ProcessorCount as [Processor Count], hwp.CPUPerVirtualNumaNodeMaximum, CONVERT(decimal(5,2),hwp.MemoryPerVirtualNumaNodeMaximumMB/1024.0) as [MemoryPerVirtualNumaNodeMaximum (GB)], ISNULL(hwp.CPUPerVirtualNumaNodeMaximum,0) as [CPUPerVirtualNumaNodeMaximum], CONVERT(decimal(5,2),ISNULL(hwp.MemoryPerVirtualNumaNodeMaximumMB,0)/1024.0) as [MemoryPerVirtualNumaNodeMaximum (GB)], --Memory Info hwp.RAM/1024 as [RAM (GB)], CASE hwp.DynamicMemoryEnabled When 0 Then 'No' When 1 Then 'Yes' END as [Dynamic Memory Enabled], ISNULL(hwp.DynamicMemoryMinimumMB,0) as [DynamicMemoryMinimumMB], --Disk Info vmi.VMTotalSize/1024/1024/1024 as [VMTotalSize (GB)], vmi.VMTotalMaxSize/1024/1024/1024 as [VMTotalMaxSize (GB)], --Network Info vna.VirtualNetwork, vna.IPv4AddressType, vna.IPv4Addresses, vna.DefaultGateways, vna.DNSServers from tbl_WLC_VObject vo inner join tbl_ADHC_Host h on vo.HostId = h.HostID inner join tbl_BTBS_HostGroup hg on h.HostGroupID = hg.ID inner join tbl_WLC_VMInstance vmi on vo.ObjectId = vmi.ObjectId inner join tbl_WLC_HWProfile hwp on vo.HWProfileId = hwp.HWProfileId inner join tbl_WLC_VNetworkAdapter vna on vo.HWProfileId = vna.HWProfileId order by [Host Group], [Host Name], [VM Name]
I was wondering if it is possible to get Operating System Name, VM Running Status and Status values from VirtualManagerDB?
Please help. Thanks in advance.
Thanks, Rajiv Iyer