Skip to content

Repository for the Visual TOM to VMWare connector

License

Notifications You must be signed in to change notification settings

AbsyssLab/vtom-vmware

VMware vSphere Management Connector

License  en

This Connector allows you to manage VMware vSphere virtual machines from the command line, including starting, stopping, restarting, and managing snapshots.

Disclaimer

No support or warranties will be provided by Absyss SAS for this project and associated files. Use is at your own risk.

Absyss SAS cannot be held responsible for damages caused by the use of any files made available in this Github repository.

Consulting days can be requested for implementation.

Prerequisites

  • Visual TOM 7.1.2 or higher
  • Python 3.x or higher
  • VMware vCenter Server or ESXi host
  • Install required python packages with pip: pip install -r requirements.txt

Instructions

  • Windows :

    • Place the files submit_queue_vmware.bat & vmware.py in the %ABM_BIN% directory
    • Declare the queue on the agent (see administrator guide)
  • Linux/Unix :

    • Place the files tom_submit.vmware & vmware.py in the $TOM_ADMIN directory
    • Declare the queue on the agent (see administrator guide)
  • Create a VMware Context and define the following environment variables:

    • USERNAME: Username for vCenter/ESXi connection
    • PASSWORD: Password for vCenter/ESXi connection
    • VCENTER: IP address or hostname of your vCenter/ESXi server
  • Create in Visual TOM a "Custom Application" connection with the following definition or import the MyApplication-VMware.xml file:

vtimport -x -f MyApplication-VMware.xml

Custom application screenshot

The script returns specific exit codes:

  • 0: Success
  • 1: Error (connection, validation, or execution error)

Parameter descriptions:

  • ACTION : Action to perform (list, start, stop, restart, snapshot, revert, delete_snapshot, delete_vm)
  • VM_NAME : Name of the virtual machine (required for all actions except 'list')
  • SNAPSHOT_NAME : Name of the snapshot (required for snapshot, revert, delete_snapshot actions)
  • SNAPSHOT_COMMENT : Description of the snapshot (optional, used only with snapshot action)

The connector provides detailed logging with:

  • Timestamps
  • Log levels (INFO, WARNING, ERROR)
  • Detailed operation status
  • VM state information

Example log output:

2025-10-22 14:27:30,797 | INFO | Connecting to vCenter: 192.168.1.100
2025-10-22 14:27:30,850 | INFO | Successfully connected to vCenter
2025-10-22 14:27:30,851 | INFO | Searching for VM: Production-Server-01
2025-10-22 14:27:30,857 | INFO | Starting VM...
2025-10-22 14:27:30,858 | INFO | Action 'start' executed successfully on VM 'Production-Server-01'

Available Actions

List VMs

  • Action: List
  • Parameters: VM_NAME (optional - for partial search)
  • Description: Lists all VMs or filters by partial name

VM Power Management

  • Action: Start - Start a VM
  • Action: Stop - Stop a VM
  • Action: Restart - Restart a VM
  • Parameters: VM_NAME (required)

Snapshot Management

  • Action: Snapshot - Create a snapshot
  • Action: Revert - Revert to a snapshot
  • Action: DeleteSnapshot - Delete a snapshot
  • Parameters: VM_NAME, SNAPSHOT_NAME (required), SNAPSHOT_COMMENT (optional for snapshot)

VM Management

  • Action: DeleteVm - Delete a VM (WARNING: Permanent deletion)
  • Parameters: VM_NAME (required)

License

This project is licensed under Apache 2.0. See the LICENSE file for more details.

Code of Conduct

Contributor Covenant
Absyss SAS has adopted the Contributor Covenant as a Code of Conduct and expects project participants to adhere to it as well. Please read the complete document to understand which actions will or will not be tolerated.

About

Repository for the Visual TOM to VMWare connector

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published