This Connector allows you to manage VMware vSphere virtual machines from the command line, including starting, stopping, restarting, and managing snapshots.
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.
- 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
-
Windows :
- Place the files
submit_queue_vmware.bat&vmware.pyin the%ABM_BIN%directory - Declare the queue on the agent (see administrator guide)
- Place the files
-
Linux/Unix :
- Place the files
tom_submit.vmware&vmware.pyin the$TOM_ADMINdirectory - Declare the queue on the agent (see administrator guide)
- Place the files
-
Create a VMware Context and define the following environment variables:
USERNAME: Username for vCenter/ESXi connectionPASSWORD: Password for vCenter/ESXi connectionVCENTER: 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
The script returns specific exit codes:
0: Success1: 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'
- Action:
List - Parameters: VM_NAME (optional - for partial search)
- Description: Lists all VMs or filters by partial name
- Action:
Start- Start a VM - Action:
Stop- Stop a VM - Action:
Restart- Restart a VM - Parameters: VM_NAME (required)
- 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)
- Action:
DeleteVm- Delete a VM (WARNING: Permanent deletion) - Parameters: VM_NAME (required)
This project is licensed under Apache 2.0. See the LICENSE file for more details.
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.
