vmware_guest_vnc – Manages VNC remote display on virtual machines in vCenter¶
New in version 2.8.
Requirements¶
The below requirements are needed on the host that executes this module.
- python >= 2.6
- PyVmomi
Parameters¶
Examples¶
- name: Enable VNC remote display on the VM
vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
folder: /mydatacenter/vm
name: testvm1
vnc_port: 5990
vnc_password: vNc5ecr3t
datacenter: "{{ datacenter_name }}"
state: present
delegate_to: localhost
register: vnc_result
- name: Disable VNC remote display on the VM
vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
datacenter: "{{ datacenter_name }}"
uuid: 32074771-7d6b-699a-66a8-2d9cf8236fff
state: absent
delegate_to: localhost
register: vnc_result
- name: Disable VNC remote display on the VM using MoID
vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
datacenter: "{{ datacenter_name }}"
moid: vm-42
state: absent
delegate_to: localhost
register: vnc_result
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Armin Ranjbar Daemi (@rmin)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.