community.vmware.vmware_guest_screenshot – Create a screenshot of the Virtual Machine console.¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_guest_screenshot
.
Synopsis¶
This module is used to take screenshot of the given virtual machine when virtual machine is powered on.
All parameters and VMware object names are case sensitive.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: take a screenshot of the virtual machine console
community.vmware.vmware_guest_screenshot:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
folder: "{{ folder_name }}"
name: "{{ vm_name }}"
local_path: "/tmp/"
delegate_to: localhost
register: take_screenshot
- name: Take a screenshot of the virtual machine console using MoID
community.vmware.vmware_guest_screenshot:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
folder: "{{ folder_name }}"
moid: vm-42
local_path: "/tmp/"
delegate_to: localhost
register: take_screenshot
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Diane Wang (@Tomorrow9) <dianew@vmware.com>