A command-line tool for managing QEMU virtual machines created through Syzkaller's create-image.sh.
Project description
syzqemuctl
A command-line tool for managing QEMU virtual machines created through Syzkaller's create-image.sh.
Features
- Easy VM creation and management
- Automated template image creation using syzkaller's create-image.sh
- SSH and file transfer support
- Command execution in VMs
- Screen session management for VM console access
Installation
pip install syzqemuctl
Requirements
- Python 3.8+
- QEMU
- screen
- SSH client
Configuration
The configuration file is stored in ~/.config/syzqemuctl/config.json. It contains:
- Images home directory path
- Default VM settings
Usage
⭐ As a command-line tool
- Initialize syzqemuctl:
syzqemuctl init --images-home /path/to/images
- Create a new VM:
syzqemuctl create my-vm
- Run the VM:
syzqemuctl run my-vm --kernel /path/to/kernel
- Check VM status:
syzqemuctl status my-vm
- Copy files to/from VM:
syzqemuctl cp local-file my-vm:/remote/path # Copy to VM
syzqemuctl cp my-vm:/remote/file local-path # Copy from VM
- Execute commands in VM:
syzqemuctl exec my-vm "uname -a"
- Stop the VM:
syzqemuctl stop my-vm
- List all VMs:
syzqemuctl list
⭐ As a Python package
from syzqemuctl import VM, ImageManager, VMConfig
manager = ImageManager("/path/to/images_home")
manager.initialize()
manager.create_image("my-vm")
vm = VM("/path/to/images_home/my-vm")
vm.start(kernel_path="/path/to/kernel")
# Wait several minutes for the VM to be ready
with vm:
vm.copy_to_vm("/path/to/local/file", "/path/to/vm/remote/file")
vm.execute("uname -a")
License
Apache-2.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
syzqemuctl-0.1.1.tar.gz
(10.7 kB
view details)
File details
Details for the file syzqemuctl-0.1.1.tar.gz.
File metadata
- Download URL: syzqemuctl-0.1.1.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25d245e0d20cd8fb93dd979ad002d6c16751956eac3fe3db817292cb994b5cce
|
|
| MD5 |
7559b57174e76aa079b7e015fe358aba
|
|
| BLAKE2b-256 |
ccafd413d0831f19d274420db8d9c09bff6995ec54205f0212c1f4e768f106b8
|