https://github.com/ahmetmutlugun/vmware-fusion-py
A Python wrapper for VMware Fusion's command line tools.
https://github.com/ahmetmutlugun/vmware-fusion-py
library macos python vmware vmware-fusion wrapper wrapper-library
Last synced: 6 months ago
JSON representation
A Python wrapper for VMware Fusion's command line tools.
- Host: GitHub
- URL: https://github.com/ahmetmutlugun/vmware-fusion-py
- Owner: ahmetmutlugun
- License: mit
- Created: 2024-06-18T19:02:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T21:09:45.000Z (about 2 years ago)
- Last Synced: 2025-11-28T15:20:09.179Z (7 months ago)
- Topics: library, macos, python, vmware, vmware-fusion, wrapper, wrapper-library
- Language: Python
- Homepage: https://pypi.org/project/vmware-fusion-py/
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


# vmware-fusion-py
This Python module provides a convenient way to control and interact with VMware Fusion virtual machines using the `vmrun` command-line utility. Built and tested for VMware Fusion on arm64 MacOS
## Features
- Full coverage of the `vmrun` CLI
- Start, stop, reset, suspend, pause, and unpause virtual machines
- Manage snapshots (create, delete, list, and revert)
- Manage network adapters (list, add, set, and delete)
- Manage port forwarding for host networks
- Run programs and scripts in the guest operating system
- Manage files and directories in the guest operating system
- Manage shared folders between the host and guest
- Interact with the guest operating system (type keystrokes, capture screenshots, etc.)
- Clone virtual machines
- Upgrade virtual machines and install VMware Tools
## Prerequisites
- Python 3.x
- VMware Fusion on MacOS
- `vmrun` command-line utility (included with VMware Fusion)
## Installation
### Pip
`pip install vmware-fusion-py`
### From Source
1. Clone the repository or download the source code.
2. Install the package using `pip install .`
## Usage
### Initialization
```python
# Get vmrun path or provide the path as a string
vmrun_path = shutil.which("vmrun")
if not vmrun_path:
# vmrun is installed automatically alongside VMware Fusion. Install VMware
exit()
# Initiate client
client = VMware(vmrun_path=vmrun_path)
```
### Presets
```python
client = VMware(
vmrun_path="/path/to/vmrun",
host_type="ws",
vm_password="password",
guest_user="username",
guest_password="password",
vm_path="/path/to/vm"
)
```
## License
This project is licensed under the MIT License.
## Contributors
- Ahmet Mutlugun [Github](https://github.com/ahmetmutlugun)