title: How can I get all information about my vcenters in vmware vsphere with pyvmomi
body: <p>I can currently get info on all vms, all hosts, all "clusters" (datacenters?) and all datastores.  Is there anything else, any other managed datatype that would provide useful information.</p>
  
  <p>My objective is to give my company info about the machines and utilization, but my side project is gather as much information as possible so that I can pair it with known outages and use machine learning to detect when systems or applications are likely to fail.</p>
  
  <p>To be clear, right now this is how I gather information on vms</p>
  
  <p>Also the print statements are just there so I can see what I want to put into a database and what I dont have a use for.  </p>
  
  <pre><code>def vm_and_up():
      viewTypeComputeResource = [vim.ComputeResource]
      containerView = content.viewManager.CreateContainerView(container, viewTypeComputeResource, recursive)  # create container view
      clusters = containerView.view
      for cluster in clusters:
          print(cluster.name)
          print(cluster.summary)
          hosts = cluster.host
          host_count = 0
          for hosts2 in hosts:
              host_count = host_count +1
              hosts_list.append(hosts2.name)
              #print(hosts2.name)
              vms = hosts2.vm
              #print('Cluster: '+cluster.name)
              #print('Host: '+hosts2.name)
  #            vm_count = 0
              for vm in vms:
                  print('Capability: '+ str(vm.capability))
                  print('Datestore: '+ str(vm.datastore))
                  #print('Config: '+ str(vm.config))
                  print('Guest: '+str(vm.guest.disk))
                  print('GuestDiskInfo')
                  print('GuestFullName: '+str(vm.guest.guestFullName))
                  print('GuestFullName')
                  print('Guest: '+str(vm.guest.hostName))
                  print('GuestHostName')
                  print('Guest: '+str(vm.guest.ipAddress))
                  print('GuestIpAddress')
                  print('Guest: '+str(vm.guest.net))
                  print('GuestNic')
                  print('Guest: '+str(vm.resourcePool))
                  print('GuestResourcePool')
                  print('Guest: '+str(vm.runtime))#
                  print('GuestRuntime')#
                  print('Guest: '+str(vm.layout))#
                  print('GuestLayout')#
                  print('Guest: '+str(vm.resourcePool))
                  print('GuestResourcePool')
                  #print(vm.config.hardware)
  </code></pre>
  
  <p>similarly for datacenters I use </p>
  
  <pre><code>def see_datacenters():
      viewTypeDatacenter =[vim.Datacenter]
      containerviewDatacenter = content.viewManager.CreateContainerView(container, viewTypeDatacenter, recursive)
      datacenters = containerviewDatacenter.view
      print(len(datacenters))
      for data_center in datacenters:
          data_center_name = str(data_center.name)
          print(data_center_name)
          print('data_center_name')        
          print(data_center.overallStatus)
          print('data_center.overallStatus')
          print(data_center.configStatus)
          print('data_center.configStatus')
          print(data_center.configIssue)
          print('data_center.ConfigIssue')
          print(data_center.vmFolder)
          print('data_center.vmFolder')
          print(data_center.recentTask)
          print('data_center.recentTask')
          print(data_center.configuration)
          print('data_center.configuration')
          print(data_center.datastore)
  </code></pre>
  
  <p>and for datastores</p>
  
  <pre><code>def see_datastores():
      viewTypeDatastore = [vim.Datastore]
      containerViewDatastore = content.viewManager.CreateContainerView(container, viewTypeDatastore, recursive)  # create container view
      datastores = containerViewDatastore.view
      print(len(datastores))
      print(datastores)
      print('datastores')
      for datastore in datastores:
          print(datastore.name)
          print('name')
          print(str(datastore.browser))
          print('Browser')
          print(str(datastore.capability))
          print('Capability')
          print(str(datastore.info))
          print('Info')
          print(str(datastore.iormConfiguration))
          print('IormConfig')
          print(str(datastore.summary))
          print('Summary')
          print(str(datastore.overallStatus))
          print('Status')
          global datastore_summary_raw
          datastore_summary_raw = datastore.summary
  </code></pre>
  
  <p>for each of these, I am creating a container view, using viewtypes like [vim.Datastore], [vim.Datacenter] and [vim.ComputeResource]</p>
  
  <p>are there any other major ones I should concern myself with?
  Particularly, manage object types
  <a href="https://vdc-download.vmware.com/vmwb-repository/dcr-public/6b586ed2-655c-49d9-9029-bc416323cb22/fa0b429a-a695-4c11-b7d2-2cbc284049dc/doc/index-mo_types.html" rel="nofollow noreferrer">https://vdc-download.vmware.com/vmwb-repository/dcr-public/6b586ed2-655c-49d9-9029-bc416323cb22/fa0b429a-a695-4c11-b7d2-2cbc284049dc/doc/index-mo_types.html</a>
  or 
  <a href="https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/index-mo_types.html" rel="nofollow noreferrer">https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/index-mo_types.html</a></p>