code: def list_domains():
      '''
      Return a list of virtual machine names on the minion
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' virt.list_domains
      '''
      with _get_xapi_session() as xapi:
          hosts = xapi.VM.get_all()
          ret = []
  
          for _host in hosts:
              if xapi.VM.get_record(_host)['is_control_domain'] is False:
                  ret.append(xapi.VM.get_name_label(_host))
  
          return ref list_domains():
      '''
      Return a list of virtual machine names on the minion
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' virt.list_domains
      '''
      with _get_xapi_session() as xapi:
          hosts = xapi.VM.get_all()
          ret = []
  
          for _host in hosts:
              if xapi.VM.get_record(_host)['is_control_domain'] is False:
                  ret.append(xapi.VM.get_name_label(_host))
  
          return ret
docs: Return a list of virtual machine names on the minion
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' virt.list_domains