• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A wrapper for QEMU allowing the creation of virtual machines with shared folder, ssh, and disk creation support.

Demo Gif

transient

Documentation Status

transient is a wrapper around QEMU that provides additional features like downloading and building disk images, shared folders, and SSH support.

Motivation

The primary motivation for the development of transient is to have a simple way to create short-lived virtual machines for testing and development, particularly kernel and hypervisor development. There are many other tools for creating virtual machines, such as vagrant or the many libvirt based solutions. However, these are almost always very stateful. It can be difficult to create virtual machines using these tools in CI environments, as the state may not always be appropriately synchronized. Also, these tools can make it more difficult to supply an existing kernel/initramfs when booting the virtual machine.

Almost all linux-based virtualization tools ultimately rely on qemu. transient makes this dependency transparent, allowing the user the entire flexibility of QEMU. This can be very helpful, for example, when attempting to setup complex virtual networking situations which may be difficult to express in the abstractions provided by other tools.

Installation

transient is available on PyPI, so the latest release can be installed with pip install transient. It is also available from GNU Guix, and can be installed with guix install python-transient. To install transient from source, clone this repository and run pip install -e '.[dev]' from the project root. As always, the usage of python virtual environments is recommended for a development setup. The development environment can also be built by running make dev from the project root.

transient has very few dependencies. On Ubuntu, these can be installed by running apt-get install ssh qemu-system-x86 python3-pip.

Documentation

Documentation for transient is available on Read the Docs.

Quick Start

transient is primarily a wrapper for QEMU. It supplies a small set of flags that are used to add additional features to the VM being started. As the name implies, it is almost completely stateless. This avoids problems that can sometimes occur with libvirt based tools becoming 'unsynchronized' with the real system state.

For example, in the following command, the flags before the -- are passed to transient. The remaining arguments are passed directly to QEMU. This example will cause transient to download and run a Centos7 VM (from the Vagrant Cloud) with 1GB of memory using a text console. This virtual machine will be automatically shut down on exit and its disk will be destroyed.

transient run centos/7:2004.01 -- -nographic -enable-kvm -m 1G

transient also supports a vagrant style SSH connection. This will start the virtual machine and connect standard input and output to an SSH connection with the machine, instead of the serial console. However, when this connection is closed, the machine will be automatically shut down (unlike vagrant). For example:

transient run centos/7:2004.01 --ssh-console -- -enable-kvm -m 1G

The --ssh-console flag depends on the image having the normal vagrant keypair trusted for the vagrant user.

Building Images

One side-effect of the development of transient was to create a Dockefile-like declarative file that can be used to build virtual machine disk images. For example, the file below would build a Centos 7 image based on the existing vagrant image centos/7:2004.01 but with nano installed and a hostname change:

FROM centos/7:2004.01
RUN yum install -y nano
RUN echo 'myhostname' > /etc/hostname

For additional information on building images, see the Building Images page of the docs.

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details

More Repositories

1

dwarfexport

Export dwarf debug information from IDA Pro
C++
204
star
2

foresight

A tool for predicting the output of random number generators
Python
185
star
3

pISO

Hardware and software source for the pISO
Rust
139
star
4

janet-mode

A major mode for the janet programming language: https://janet-lang.org/
Emacs Lisp
48
star
5

PuppyJusticeAutomated

A utility for generating PuppyJustice videos with Oyez.org transcripts and audio
Python
28
star
6

devirtualize

Python
17
star
7

lfpAlloc

A lock-free pool-based allocator using C++11 facilities
C++
15
star
8

elvish-mode

A major mode for the Elvish programming language
Emacs Lisp
14
star
9

freud

A C++ library for structure-based memory analysis
C++
7
star
10

flycheck-nim

A flycheck syntax checker for nim
Emacs Lisp
6
star
11

Quad

A simple puzzle game using Phaser js
JavaScript
6
star
12

power-mode.el

Like "activate-power-mode" for atom
Emacs Lisp
5
star
13

entrospy

A command line tool for entropy analysis
C++
5
star
14

SyntaxAwareSearch

A syntax aware search tool
C++
4
star
15

transient-baseimages

A collection of base Imagefiles for transient https://transient.readthedocs.io/en/latest/
Shell
3
star
16

rapport

A ROP utility
C++
2
star
17

cppEvolve

A C++ library for developing genetic programs
C++
2
star
18

keyview

A python utility for viewing information about cryptographic keys and certificates
Python
2
star
19

devolve

A genetic programming library in D
D
2
star
20

nonogram

A nonogram implementation for emacs
Emacs Lisp
2
star
21

SimplUI

A fooocus-style frontend for ComfyUI
Python
2
star
22

parsecpponline

A website backed by clang that shows an interactive AST representation of source.
JavaScript
1
star
23

spread

A flood-it style puzzle game for emacs
Emacs Lisp
1
star
24

cpputils

A collection of dependency-free implementations of useful C++ utilities
C++
1
star
25

flycheck-janet

A flycheck synatx checker for Janet: https://janet-lang.org/
Emacs Lisp
1
star
26

binutils

C
1
star
27

deinopis

A text similarity engine for reddit
JavaScript
1
star
28

scapy-pgp

A scapy layer for OpenPGP
Python
1
star
29

tftprs

A TFTP implementation in Rust
Rust
1
star
30

selfpass-chrome-extension

JavaScript
1
star
31

selfpass

Python
1
star
32

PlanetsWeb

Web based real-time strategy game
JavaScript
1
star
33

buildroot

Buildroot fork for the pISO project
Makefile
1
star
34

uefi-example

Minimal example to reproduce compiler-builtins issue on uefi
Rust
1
star
35

PolygonPanic

JavaScript
1
star
36

flycheck-elvish

Adds flycheck support for the Elvish programming language: https://elvish.io/
Emacs Lisp
1
star
37

gather-keepass-http-creds

A demo tool that gathers credentials from keepass through keepass-http
Python
1
star
38

mlnx_release_mirror

Mirror of the Mellanox OFED releases
1
star
39

pthy

A hy language REPL
Python
1
star
40

cec

A library providing extended C++ containers
C++
1
star
41

dotfiles

A collection of various configuration files
Emacs Lisp
1
star
42

channel9.bundle

A Channel 9 plugin for plex media server
Python
1
star