VMware: Virtual Machines
Summary
This module contains actions for discovering virtual machines and interacting with them.
Actions
vmware.vms.
create_snapshot
Create a snapshot of the target virtual machine
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
-
snapshot_name: the name of the snapshot to be created
-
snapshot_description: a description text for your snapshot (Defaults to "")
-
dump_memory: whether you also want to dump memory into the snapshot or not (Defaults to false)
Output
Nothing is outputted by this action.
Example
Create a snapshot:
1 2 3 4 5 |
|
vmware.vms.
get_all
List all virtual machines from vCenter
Minimum Plugin Version: 1.0.0
Input
- vcenter_connection: a VcenterConnection dictionary
Output
A list of VirtualMachine Dictionaries.
Time consuming operation
This operation can take a bit of time, as it is discovering all the virtual machines and basic data about them.
Example
Retrieve all virtual machines:
1 2 3 4 |
|
vmware.vms.
get_by_name
Get a virtual machine by name
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_name: the name of the target virtual machine
Output
A VirtualMachine Dictionaries object.
Example
Retrieve a virtual machine by name:
1 2 3 4 5 |
|
vmware.vms.
get_by_uuid
Get a virtual machine by uuid
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
Output
A VirtualMachine Dictionaries object.
Example
Retrieve a virtual machine by uuid:
1 2 3 4 5 |
|
vmware.vms.
output_table
Display a list of virtual machines in a table. The table will display the chosen keys as columns.
Minimum Plugin Version: 1.0.0
Input
-
text: the title of the table
-
vms: a single instance or a list of VirtualMachine Dictionaries objects to display in the table
-
keys: a list of VirtualMachine Dictionaries properties to be displayed
-
element_id: an optional identifier for the table UI element
Output
Nothing is outputted by this action.
Example
-
Getting all the virtual machines
-
Saving the results as a new variable called
virtual_machines
-
Using this action to show the
virtual_machines
in a table
1 2 3 4 5 6 7 8 9 |
|
vmware.vms.
power_off
Power off a virtual machine
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
Output
Nothing is outputted by this action.
Example
Power off a virtual machine:
1 2 3 4 |
|
vmware.vms.
power_on
Power on a virtual machine
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
Output
Nothing is outputted by this action.
Example
Power on a virtual machine:
1 2 3 4 |
|
vmware.vms.
reboot
Reboot a virtual machine (Requires Vmware tools installed)
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
Output
Nothing is outputted by this action.
Example
Reboot a virtual machine:
1 2 3 4 |
|
vmware.vms.
reset
Reset a virtual machine
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
Output
Nothing is outputted by this action.
Example
Reset a virtual machine:
1 2 3 4 |
|
vmware.vms.
restore_snapshot
Restore a snapshot of the target virtual machine
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
-
snapshot_name: the name of the snapshot to be restored
Output
Nothing is outputted by this action.
Example
Restore a snapshot:
1 2 3 4 5 |
|
vmware.vms.
shutdown
Shutdown a virtual machine (Requires Vmware tools installed)
Minimum Plugin Version: 1.0.0
Input
-
vcenter_connection: a VcenterConnection dictionary
-
vm_uuid: the uuid of the target virtual machine
Output
Nothing is outputted by this action.
Example
Shutdown a virtual machine:
1 2 3 4 |
|