TheVMinator
Expert
Expert

Listing virtual appliances

How can I list all virtual appliances in my environment (if i can)?

14 Replies
JohnMcKeown
Enthusiast
Enthusiast



Open powercli (recommend 5.5 with powershell 3 ) 


Connect to your VI Servers 


Connect VI-Server -Server "your VC name " -User "your useraname" -AllLinked




Then enter


Get-VApp | select Name, Status, Parent | Export-csv C:\vapplist.cvs




the app list will be on your C: 

TheVMinator
Expert
Expert

OK but that doesn't give me virtual appliances such as vcenter orchestrator which are deployed as an appliance but don't have a vapp container.  It does give me vapps but I need to see all the vms that are deployed as appliances such as orchestrator. Is that possible?

0 Kudos
TheVMinator
Expert
Expert

It looks like the get-vapp cmdlet only gets virtual appliances that have a vapp container.  If you have an individual VM that is deployed as a virtual appliance such as the orchestrator appliance, it won't get returned using the get-vapp cmdlet.  Is there any other way to get all the virtual appliances in the environment?

Thanks!

0 Kudos
steveb05
Enthusiast
Enthusiast


I don't think it really answers your question, but you can add custom attributes to the VMs. So ,you could manually go through and for each appliance, add a custom attribute and value. Then, as you add appliances, make sure that field is updated. Then you can run reports with Get-CustomAttribute in PowerCLI.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100572...

- Steve Please consider marking this answer "correct" or "helpful" if you found it useful. Steve Brill Virtualization Junkie VMware, SAN/NAS, Networking and Server Infrastructure Engineer
0 Kudos
TheVMinator
Expert
Expert

Thanks for the input. That's a good idea in the long run. In the current scenario it wouldn't help me because I don't have the labeled yet and I don't know where they are. Anyone else with suggestions?

0 Kudos
TheVMinator
Expert
Expert

anyone with an idea on how to do this?  Is there some way to identify an operating system which is installed as a virtual appliance, packaged with the virtual hardware, as opposed to one which is installed on virtual hardware, so that only appliances like orchestrator are returned in the results of a "get-vm" ?  get-vapp does not return orchestrator instances, even though they are appliances, because they not packged in a vapp container

0 Kudos
kunaludapi
Expert
Expert

I checked and found this is the only difference between deployed appliance VM and manually installed/created VM, Generally whenever you deploy appliance you will find under vm settings, vApp options is enabled and some appliance related information are there (Some appliances are exceptional you might find them vapps option disabled, also the possibility that you might have enabled on normal VMs)

This below command will fetch where vApps options is enabled. (If anyone knows any other difference between  deployed appliance and general VM, please let us know)

Get-View -viewtype virtualmachine -Filter @{'config.VAppConfig'='VMware.Vim.VmConfigInfo'} | select name

pastedImage_0.png

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
0 Kudos
LucD
Leadership
Leadership

I'm afraid that is the same as the Get-vApp cmdlet, it works, but not if the appliance was not in a vApp container.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
TheVMinator
Expert
Expert

I'm noticing a similarity between the virtual appliances deployed in a vapp container and vco which is not deployed in a vapp container.  All of these have three fields in the summary tab of the VM, which don't appear on any other VMs.

They are:

Product:

Version:

Vendor:

How can I run a "get-vm" that looks for vms which contain "product, version and vendor" fields in the summary tab or is that possible?  And does that actually distinctly select virtual appliance vms whether in a vapp or out?

0 Kudos
kunaludapi
Expert
Expert

This information is only available when vApps option is enabled in the VM settings and product information exists.

Get-View -viewtype virtualmachine -Filter @{'config.VAppConfig'='VMware.Vim.VmConfigInfo'} | select Name, @{N="Appliance Name"; E={$_.config.VAppConfig.product.name}}, @{N="Vendor"; E={$_.config.VAppConfig.product.Vendor}}, @{N="Version"; E={$_.config.VAppConfig.product.Version}}

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
TheVMinator
Expert
Expert

This is definitely getting warmer.  It does seem to be giving me a list of all my appliances, even those that are not part of a vapp container.  However, it is also listing 5 or so Windows VMs, and I didn't think Windows VMs could be virtual appliances?

0 Kudos
kunaludapi
Expert
Expert

As i said earlier,

(Some appliances are exceptional you might find them vApps option disabled, also the possibility that you might have enabled on normal VMs)

Try disabling vapp option on the windows server and then check.

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
0 Kudos
TheVMinator
Expert
Expert

ok thanks.  What is the impact on a running virtual machine, if any, of disabling the vapps option?  Is there any legitimate reason for it to be enabled on a Windows VM?  Do I know for sure this won't impact the running VM?  Do I need to or should I power off the affected vms before doing this? 

0 Kudos
kunaludapi
Expert
Expert

I have checked this and didn't find any issue.

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
0 Kudos