Export list of VMs OS Types | Nutanix Community
Skip to main content
Solved

Export list of VMs OS Types


Hi,
Is there a way to see/export the OS type of the VMs?
We are trying to find out how many Windows servers we have of each version (2016, 2012).
Thanks
Regards

Best answer by jlackman

jlackman wrote:
You could just do it in Powershell and not even use Nutanix;

This will list all enabled Server Objects by OS and show hostnames too;

code:
Get-ADComputer -Filter {(OperatingSystem -like "*windows*server*") -and (Enabled -eq "True")} -Properties OperatingSystem | sort OperatingSystem | ft DNSHostName, OperatingSystem





Or if you just want to count them but not get a list try this;
code:
$Servers = Get-ADComputer -Filter {(OperatingSystem -like "*windows*server*") -and (Enabled -eq "True")} -Properties OperatingSystem | Sort Name


$servers | group operatingsystem
View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

11 replies

Forum|alt.badge.img+19
  • Trailblazer
  • 26 replies
  • February 27, 2018
Hi,
Login to Prism and go to Health, Click "VMs" and click "Operating Systems" which will list VMs group by OS. Here you can see number of VMs grouped by OS type.

To export click 3 horizontal lines on top central panel to change the view to list. Click the wheel next to search (in central panel) and click export as csv..

Next to view type "Group VMs by Operating System" you have drop-down for OS type which will list VMs per OS type group.

Hope that works for you..

F>P

  • Author
  • Voyager
  • 2 replies
  • March 5, 2018
Thank you for the reply but I don't find the group by OS option.
Any idea why?




Thanks
Pablo

Forum|alt.badge.img+19
Hi,
What i noticed is my way only works with ESXi and not AHV, can u try installing NGT on VMs and see if it shows OS column.

F>P

  • Author
  • Voyager
  • 2 replies
  • March 6, 2018
Hi,
I tried installing NGT to one VDI but still no luck, probably the option is not available

Pablo

Forum|alt.badge.img
Hi, I'm running the most current version as part of a POC. How can we see the Guest OS on each VM?

  • Voyager
  • 1 reply
  • April 3, 2019
Same Question here.
I want to report list of VM's and installed OS per VM
Is there a solution?

Forum|alt.badge.img+8
  • Trailblazer
  • 20 replies
  • April 8, 2019
You could just do it in Powershell and not even use Nutanix;

This will list all enabled Server Objects by OS and show hostnames too;

code:
Get-ADComputer -Filter {(OperatingSystem -like "*windows*server*") -and (Enabled -eq "True")} -Properties OperatingSystem | sort OperatingSystem | ft DNSHostName, OperatingSystem

Forum|alt.badge.img+8
  • Trailblazer
  • 20 replies
  • Answer
  • April 8, 2019
jlackman wrote:
You could just do it in Powershell and not even use Nutanix;

This will list all enabled Server Objects by OS and show hostnames too;

code:
Get-ADComputer -Filter {(OperatingSystem -like "*windows*server*") -and (Enabled -eq "True")} -Properties OperatingSystem | sort OperatingSystem | ft DNSHostName, OperatingSystem





Or if you just want to count them but not get a list try this;
code:
$Servers = Get-ADComputer -Filter {(OperatingSystem -like "*windows*server*") -and (Enabled -eq "True")} -Properties OperatingSystem | Sort Name


$servers | group operatingsystem

  • Voyager
  • 1 reply
  • April 22, 2019
So, there is no way to do it in PRISM, beside using of powershell and server group?

Forum|alt.badge.img+6
  • Trendsetter
  • 57 replies
  • May 10, 2019
Additional question: Is an AHV cluster even aware of guest OS types or versions at all?

I've read through (although not tried) some pretty advanced reporting scripts in the VCDX56 blog, but I cannot spot any OS related info there either.

Forum|alt.badge.img+6
  • Trendsetter
  • 57 replies
  • May 14, 2019
I think that the only Ntx instance to query for guest OS type, release and version are NGT, for a single VM it goes like this:

code:
CVM$ nutanix_guest_tools_cli query_vm_tools_entity "d180a45e-7a45-4542-b17f-e4ac21ac55b7"



In the output we find

code:
   guest_os_type: kWindows
guest_os_release: "Windows7Professional"
is_windows_server_os: false
guest_os_version: "6.1.7601"




A query through arithmos_cli gives OS type and release like "windows:64:WindowsServer2008R2Standard" for all VMs in the cluster:

code:
CVM$ arithmos_cli master_get_entities entity_type=vm | grep -A 1  "vm_name\|ngt.guest_os"