|
|
7 ماه پیش | |
|---|---|---|
| .github | 7 ماه پیش | |
| app | 7 ماه پیش | |
| templates | 7 ماه پیش | |
| .gitignore | 7 ماه پیش | |
| README.md | 7 ماه پیش | |
| pyproject.toml | 7 ماه پیش | |
| requirements.txt | 7 ماه پیش |
API for managing virtual machines on Ubuntu using FastAPI and libvirt.
Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Ensure libvirt is installed on the system:
sudo apt install libvirt-daemon-system libvirt-dev pkg-config
source venv/bin/activate
uvicorn app.main:app --reload --host 0.0.0.0
The API will be available at http://0.0.0.0:8000
Access the interactive documentation at http://0.0.0.0:8000/docs
VM templates are XML files stored in the templates/ directory. Each template defines the base configuration for a VM. When creating a VM, the name in the XML is replaced with the provided name.
Example template: templates/ubuntu.xml