Skip to main content

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

Change Log

  • 0.1.0: Initial release (2025-01-16) (CONTAINS BUG: entry_point is wrong)
  • 0.1.1: Update README.md (2025-01-16) (CONTAINS BUG: entry_point is wrong)
  • 0.1.2: Fix bug of entry point (2025-01-17) (USABLE!)

Installation

pip install syzqemuctl

Requirements

python3.8+ qemu screen ssh  

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

  1. Initialize syzqemuctl:
syzqemuctl init --images-home /path/to/images
  1. Create a new VM:
syzqemuctl create my-vm
  1. Run the VM:
syzqemuctl run my-vm --kernel /path/to/kernel
  1. Check VM status:
syzqemuctl status my-vm
  1. 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
  1. Execute commands in VM:
syzqemuctl exec my-vm "uname -a"
  1. Stop the VM:
syzqemuctl stop my-vm
  1. 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


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.2.tar.gz (10.9 kB view details)

Uploaded Source

File details

Details for the file syzqemuctl-0.1.2.tar.gz.

File metadata

  • Download URL: syzqemuctl-0.1.2.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for syzqemuctl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8d3dee857847fd9c0d64cca381fa549ae196c671a9e84fcf2abf181f47593053
MD5 968bbdc6c93bfdf5a282e7251bf2ec0f
BLAKE2b-256 f25a68d4e8b2c406495d447d69f3818fc0a92c7d475711ee02d8f5ad06b17884

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page