This project provides a web-based interface for managing VMware Workstation virtual machines. It scans for VMX files, extracts VM details, and allows users to start or stop VMs from a browser.
I wrote this and then found that there is apparently something from VMware directly that I am sure must be better..
I will be checking into WSX:
Turns out that WSX was deprecated in Workstation 16.X and removed entirely from 17.X.
https://knowledge.broadcom.com/external/article/310200/configuring-wsx-in-vmware-workstation.html
Fun project nevertheless.
- Automatic VM Discovery: Scans a specified folder for
.vmxfiles. - VM Details Extraction: Retrieves OS, CPU, RAM, disk size, and MAC address from VMX files.
- VM Control: Start and stop virtual machines using
vmrun. - Network Scanning: Uses
nmapto detect active IP addresses in a subnet. - Web UI: A Flask-powered web interface for managing VMs.
- Python 3.x
- Flask (
pip install flask) - Nmap (
sudo apt install nmaporbrew install nmapon macOS) - VMware Workstation (
vmrunmust be available in the system path)
git clone https://github.com/davidabacon/vmware-web-control.git
cd vmware-web-controlpip install -r requirements.txtThe base VM directory and network subnet are configurable:
- Base VM Directory: Change
BASE_VM_DIRinapp.pyto match your VM storage path. - Subnet for Scanning: Modify
SUBNETinapp.pyto match your local network. - Web Port: The web service runs on port
15000by default.
python app.pyThe web UI will be available at http://localhost:15000.
- Click the "Start" button to power on a VM.
- Click "Stop" to shut it down (soft stop by default, hard stop option available).
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Web interface |
/start_vm |
POST | Start a VM (requires VMX file path) |
/stop_vm |
POST | Stop a VM (soft or hard stop) |
/set_folder |
POST | Change the base VM directory |
- Missing VMs: Ensure
BASE_VM_DIRis set correctly. - VMs Not Starting: Check that
vmrunis installed and in your PATH. - Network Scan Not Working: Ensure
nmapis installed and run with the necessary permissions.
This project is licensed under the MIT License.
- @davidabacon
- Contributions welcome! Feel free to submit pull requests.
