docker-compose style composer for qemu
Project description
qemu-compose
qemu-compose aims to provide a docker-compose style composer for qemu command, with advanced scripting feature as well as http support for cloud init or general purpose provisioning.
Bring up a qemu VM by providing a qemu-compose.yml and run qemu-compose up
Advantages
- Very simple and robust, written of several pure python scripts, depends on
qemucommands only. - No libvirt stuff, no daemon process, no xml config, no complex abstraction, just a simple wrapper around qemu args.
- support
before_scriptandafter_scriptfor setup and cleanup - support
boot_commandsfor vm provisioning (implemented using tty communication, gui not supported yet, and use jsonlisp for expressive power which apparently is turing-complete) - support
http_servefor cloudinit - env interpolation for advanced configuration
Installation
$ pip install qemu-compose
Examples and Screenshot
bring up ubuntu cloudimg qemu vm and run a interactive shell
$ cd ./script/ubuntu-cloudimg__amd64/
$ qemu-compose up
Demo:
SSH Helper
qemu-compose provides a helper to invoke ssh with the instance key and safe defaults.
- Usage:
qemu-compose ssh [OPTIONS] VMID COMMAND [ARG...] - Defaults added by qemu-compose:
-o StrictHostKeyChecking=no-o UserKnownHostsFile=/dev/null-i ~/.local/share/qemu-compose/instance/VMID/ssh-key- appends
root@vsock%<cid>as the default destination (falls back toroot@vsock%${cid}if CID is unknown)
Examples:
# Print the default ssh command that would be used for a given VMID
$ qemu-compose ssh <vmid>
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.local/share/qemu-compose/instance/<vmid>/ssh-key root@vsock%<cid>
# Connect using vsock destination (cid recorded when the VM booted)
$ qemu-compose ssh <vmid> root@vsock%<cid>
# Connect over TCP instead (override destination and add your own options)
$ qemu-compose ssh <vmid> -p 2222 root@127.0.0.1
# Run a remote command
$ qemu-compose ssh <vmid> root@vsock%<cid> uname -a
Notes:
- The instance key is generated at first boot and stored under
~/.local/share/qemu-compose/instance/<vmid>/ssh-key. - Any ssh options you pass will be forwarded; the last-specified option wins.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qemu_compose-0.8.2.tar.gz.
File metadata
- Download URL: qemu_compose-0.8.2.tar.gz
- Upload date:
- Size: 102.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b63dc4a51d01f4530c92eb62f1bacdeaa67565cf5ba0c3707f63898737e2d6
|
|
| MD5 |
d989134372786e5c4684028d8a1dbfa5
|
|
| BLAKE2b-256 |
01c5212af981e07a30b606072ba20d2fd656976ac5c892512bbfb1b487967ecf
|
Provenance
The following attestation bundles were made for qemu_compose-0.8.2.tar.gz:
Publisher:
pypi.yml on zTrix/qemu-compose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qemu_compose-0.8.2.tar.gz -
Subject digest:
b2b63dc4a51d01f4530c92eb62f1bacdeaa67565cf5ba0c3707f63898737e2d6 - Sigstore transparency entry: 584927471
- Sigstore integration time:
-
Permalink:
zTrix/qemu-compose@9242dbabe2efdd533b98ae71e06a5ebc2e5ee435 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/zTrix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@9242dbabe2efdd533b98ae71e06a5ebc2e5ee435 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qemu_compose-0.8.2-py3-none-any.whl.
File metadata
- Download URL: qemu_compose-0.8.2-py3-none-any.whl
- Upload date:
- Size: 124.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81a4b1b490e0d23d12a472143c3816023ada0a8b4c11d651e057b8e1310d515b
|
|
| MD5 |
9f3747b5b083c2d475c0eb3e7249446a
|
|
| BLAKE2b-256 |
290207801cd6cc8d5a284b0bc6024169d4cd45dd4cc053b1fc7ad70ddc49c5cb
|
Provenance
The following attestation bundles were made for qemu_compose-0.8.2-py3-none-any.whl:
Publisher:
pypi.yml on zTrix/qemu-compose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qemu_compose-0.8.2-py3-none-any.whl -
Subject digest:
81a4b1b490e0d23d12a472143c3816023ada0a8b4c11d651e057b8e1310d515b - Sigstore transparency entry: 584927476
- Sigstore integration time:
-
Permalink:
zTrix/qemu-compose@9242dbabe2efdd533b98ae71e06a5ebc2e5ee435 -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/zTrix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@9242dbabe2efdd533b98ae71e06a5ebc2e5ee435 -
Trigger Event:
release
-
Statement type: