VMware Guest Info
5 min
Resumo
- Este módulo é usado para adicionar ou remover o dispositivo Virtual Trusted Platform Module (vTPM) para um Máquina virtual.
Parâmetros
Parâmetro | Tipo | Escolhas | Valor Padrão | Comentários |
|---|---|---|---|
name | string | |
|
uudi | string | |
|
moid | string | |
|
folder | string | |
|
datacenter | string | |
|
tags | bool |
|
|
tag_details | bool |
|
|
schema | string |
|
|
properties | list/elements=list | |
|
Estende fragmentos da documentação do módulo VMware Options.
Notas
Observação
- Testado em ESXi 7.0.2
- Todos os módulos requerem acesso de gravação API e, portanto, não são suportados em uma licença ESXi gratuita.
Exemplos
- name: Gather info from standalone ESXi server having datacenter as 'ha-datacenter'
vmware_guest_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: ha-datacenter
uuid: 421e4592-c069-924d-ce20-7e7533fab926
delegate_to: localhost
register: info
- name: Gather some info from a guest using the vSphere API output schema
vmware_guest_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
name: "{{ vm_name }}"
schema: "vsphere"
properties: ["config.hardware.memoryMB", "guest.disk", "overallStatus"]
delegate_to: localhost
register: info
- name: Gather some information about a guest using MoID
vmware_guest_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
moid: vm-42
schema: "vsphere"
properties: ["config.hardware.memoryMB", "guest.disk", "overallStatus"]
delegate_to: localhost
register: vm_moid_info
- name: Gather Managed object ID (moid) from a guest using the vSphere API output schema for REST Calls
vmware_guest_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
name: "{{ vm_name }}"
schema: "vsphere"
properties:
- _moId
delegate_to: localhost
register: moid_info
- name: Gather detailed information about tags and category associated with the given VM
vmware_guest_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
name: "{{ vm_name }}"
tags: True
tag_details: True
register: detailed_tag_infoValores Retornados
Chave | Tipo | Retornado quando | Descrição |
|---|---|---|---|
instance | dict | sempre | metadados sobre o a maquina virtual |