---
title: vCenter VM List
slug: homologacao-atmosphere/vcenter-vm-list
description: Learn how to use a powerful script that efficiently lists virtual machines in vCenter. This comprehensive document offers a step-by-step summary, including the required parameters like vCenter server IP, username, and password. Discover how to easily filt
docTags: 
createdAt: 2021-03-25T20:36:19.000Z
---

## Resumo

- Listar máquinas virtuais do vCenter.

## Parâmetros

| **Parâmetro**                  | **Tipo**   | **Escolhas \| Valor Padrão**                          | **Comentários**                             |
| ------------------------------ | ---------- | ----------------------------------------------------- | ------------------------------------------- |
| filter                         | dictionary |                                                       | Filtros a serem usados na listagem de vm's. |
| password - r*equired   &#x20;* | string     |                                                       | Senha do vCenter.                           |
| scheme                         | string     | Escolhas:<br />- "http"<br />- "https"<br />(default) | Protocolo da requisição.                    |
| server - r*equired*            | string     |                                                       | IP do vCenter.                              |
| username - r*equired*          | string     |                                                       | Nome de usuário do vCenter.                 |



## Exemplos

```yaml
# Exemplos: Listar máquinas virtuais do vCenter.
- vcenter_vm_list:
    server: "https://localhost"
    username: username
    password: pssw
    filter: { "vms" : ["vm-xxxaaa"] }
```



## Valores retornados

| **Chave**          | **Tipo** | **Retornado quando** | **Descrição**                |
| ------------------ | -------- | -------------------- | ---------------------------- |
| virtual\_machines  | string   | Sucesso              | Máquinas virtuais do vCenter |

