VMware

VMWare is used by Demisto to manage and control virtual machines that it is using.

To set up the integration on Demisto:

  1. Go to ‘Settings > Integrations > Servers & Services’
  2. Locate ‘VMware’ by searching for it using the search box on the top of the page.
  3. Click ‘Add instance’ to create and configure a new integration. You should configure the following settings:
    Name : A textual name for the integration instance.
    Server URL : Server URL to access.
    Credentials: The credentials for accessing the integration.
    Do not validate server certificate: Select in case you wish to circumvent server certification validation.  You may want to do this in case the server you are connecting to does not have a valid certificate.
    Use system proxy settings: Specify whether to communicate with the integration via the system proxy server or not.
    Demisto engine : If relevant, select the engine that acts as a proxy to the server. Engines are used when you need to access a remote network segments and there are network devices such as proxies, firewalls, etc. that prevent the Demisto server from accessing the remote networks.
    For more information on Demisto engines see:
    https://demisto.zendesk.com/hc/en-us/articles/226274727-Settings-Integrations-Engines
  4. Press the ‘Test’ button to validate connection.
    If you are experiencing issues with the service configuration, please contact Demisto support at support@demisto.com
  5. After completing the test successfully, press the ‘Done’ button.

Top Use-cases:

  • Create and revert to snapshot.
  • Get information regarding virtual machines.
  • Power-on, power-off, suspend and rebooting virtual machines.

Commands

  • vmware-get-vms

Input:

none

Context output:

VMWare.Name : VM name
VMWare.Template : true if template, else false
VMWare.Path : Path to VM
VMWare.Guest : Guest full name
VMWare.UUID : VM instance UUID
VMWare.IP : VM IP address
VMWare.State : VM State (i.e. on, off, suspended)
VMWare.HostName : Host name of VM
VMWare.MACAddress : MAC Address of VM

Raw output:

[
{
"Guest": "Ubuntu Linux (64-bit)",
"HostName": "ubuntu",
"IP": "192.168.100.1",
"MACAddress": "00:50:56:bc:86:ec",
"Name": "UbuntuTest",
"Path": "[datastore1] UbuntuTest/UbuntuTest.vmx",
"State": "poweredOn",
"Template": false,
"UUID": "503ca58b-0821-cf21-fb56-459e55df6d19"
}
]

  • vmware-poweron

Input:

vm-uuid - VM UUID of virtual machine to be powered on.

Context output:

VMWare.UUID: VM instance UUID
VMWare.State:
VM State (i.e. on, off, suspended)

Raw output:

{
"VMWare(val.UUID \u0026\u0026 val.UUID === obj.UUID)": {
"State": "poweredOn",
"UUID": "503ca58b-0821-cf21-fb56-459e55df6d19"
}
}

  • vmware-poweroff

Input:

vm-uuid - VM UUID of virtual machine to be powered on.

Context output:

VMWare.UUID: VM instance UUID
VMWare.State:
VM State (i.e. on, off, suspended)

Raw output:

{
"VMWare(val.UUID \u0026\u0026 val.UUID === obj.UUID)": {
"State": "poweredOff",
"UUID": "503ca58b-0821-cf21-fb56-459e55df6d19"
}
}

  • vmware-suspend

Input:

vm-uuid - VM UUID of virtual machine to suspend.

Context output:

none

Raw output:

"Virtual Machine was suspended successfully."

  • vmware-hard-reboot

Input:

vm-uuid - VM UUID of virtual machine to reboot.

Context output:

none

Raw output:

"Virtual Machine was suspended successfully."

  • vmware-soft-reboot

Input:

vm-uuid - VM UUID of virtual machine to reboot.

Context output:

none

Raw output:

"A request to reboot the guest has been sent."

  • vmware-create-snapshot

Input:

vm-uuid - VM UUID of virtual machine.
name - Snapshot name
description - Snapshot description
memory - Snapshot the virtual machine's memory
quiesce - Quiesce guest file system (needs VMWare Tools installed).

Context output:

none

Raw output:

name ="VM Daily Snapshot"
description ="A daily snapshot of VM"
memory =true
quiesce =false:
"Snapshot SnapShotName completed."

  • vmware-revert-snapshot

Input:

vm-uuid - VM UUID of virtual machine.
snapshot-name - Snapshot name

Context output:

none

Raw output:

"Reverted to snapshot SnapShotName successfully."

  • vmware-get-events

Input:

vm-uuid - VM UUID of virtual machine.

Context output:

none

Raw output:

[
{
"Created Time": "2017-12-27 08:17:56",
"Event": "UbuntuTest on 192.168.1.117 in Datacenter is powered on"
},
{
"Created Time": "2017-12-27 08:34:39",
"Event": "Guest OS reboot for UbuntuTest on 192.168.1.117 in Datacenter"
},
{
"Created Time": "2017-12-27 08:44:29",
"Event": "Guest OS shut down for UbuntuTest on 192.168.1.117 in Datacenter"
},
{
"Created Time": "2017-12-27 08:44:42",
"Event": "UbuntuTest on 192.168.1.117 in Datacenter is powered off"
}
]