Skip to main content

Qemu VM management utilities

Project description

This package provides a utility to manage virtual machines and their life cycle in the Flying Circus. We try to keep specifics of our environment out of there, but we make a few assumptions:

  • VM disks (root, swap, tmp) are stored in Ceph

  • There is a script create-vm that will prepare a fresh root disk image.

The utility allows you to

  • start, stop and migrate VMs between hosts

  • run a daemon that enforces the policy about running VMs given by a set of config files

  • resize disks.

Config format

Generic template

The Qemu config file will be generated from a template. If no template is found in /etc/qemu/qemu.vm.cfg.in, a built-in default template will be used. Refer to qemu.vm.cfg.in in the source distribution.

Per-VM configuration

Expects a config file for each VM in /etc/qemu/vm/*.cfg.

The config file format is YAML.

Format:

name: test00
parameters:
    id: 12345
    resource_group: test

    online: true
    kvm_host: bob

    disk: 5
    memory: 512
    cores: 1

    nics:
    - srv: 00-01-02-03-05-06
    - fe: 00-01-02-03-05-06

Release notes

0.7 (2015-05-18)

  • Consul service registration (#15313).

  • Coordinate migration via Consul (#15313).

0.6.4 (2015-02-27)

  • Tolerate “setup” as an intermediate migration status as encountered in the wild.

0.6.3 (2015-02-19)

  • Improve pid file parser to deal correctly with trailing lines and empty pid files.

  • Ensure that exceptions are properly logged if they occur directly after daemonizing (e.g., in Agent.__init__()) (#13867).

0.6.2 (2015-01-22)

  • Relax PyYaml and psutil version requirements to accommodate to the Flying Circus managed platform.

0.6.1 (2015-01-22)

  • Improve logging and error messages (#13867).

  • Fix unwanted behaviour during error conditions (#13867).

0.6 (2015-01-15)

  • Implement live migration. Use “inmigrate” and “outmigrate” commands to coordinate the process (#13229).

  • Note that the qemu.cfg.in template has changed!

  • Improve test coverage.

0.5.1 (2014-11-22)

  • Bugfix: remove Ceph discard call since it seems to be unstable (#13414).

  • Improve operability by reworking what is logged to fc-qemu.log.

0.5 (2014-11-21)

  • Root filesystem shrink during VM start (#13414).

  • Add ‘force-unlock’ action to break stale locks (e.g., after a VM host went down).

0.4.3 (2014-11-13)

  • Read Qemu config file template from /etc/qemu/qemu.vm.cfg.in.

  • Fix tests and documentation.

0.4.2 (2014-11-12)

  • Rate limit entropy transfer from host to guest (#13751).

  • Add ‘restart’ command to simplify VM restarts.

0.4.1 (2014-09-24)

0.4 (2014-09-16)

  • Allow selecting the specific command line to call for creating a VM using a config file + formatting syntax.

  • Add test coverage to show that we gracefully recover from crashed VMs upon a subsequent ‘ensure’.

0.3 (2014-09-13)

  • Refactor and rename to ‘fc.qemu’. Integrate most functionality that was previously placed in our init scripts and localconfig (fc.agent) utilities.

  • Add a lot of test coverage.

0.2.6 (2014-08-21)

  • Fix incoming VM detection for an already locked _and_ started VM.

0.2.5 (2014-08-20)

  • Implement a safety-belt to prohibit migrating VMs that have not yet been started with the supported /run/kvm.*.cfg.in format.

fc.qemu development

Workstation development

Prepare Vagrant environment:

host$ hg clone https://bitbucket.org/flyingcirucs/fc.qemu
host$ cd fc.qemu
host$ vagrant up
host$ vagrant ssh

Run the tests:

vm$ cd /vagrant
vm$ sudo bin/py.test

Test execution automatically updates a coverage report in the htmlcov directory.

Run end-to-end migration test:

vm$ cd /vagrant
vm$ sudo ./test-migration.sh

Real-world testing on FCIO DEV network

  • Check out the source on a VM host

  • Create virtualenv: virtualenv –system-site-packages .

  • Set Puppet stopper

  • Make symlink /usr/src/fc.qemu point to the local checkout

  • Install fc-qemu package in development mode: ACCEPT_KEYWORDS=”**” emerge -1 fc-qemu

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

fc.qemu-0.7.zip (38.0 kB view details)

Uploaded Source

File details

Details for the file fc.qemu-0.7.zip.

File metadata

  • Download URL: fc.qemu-0.7.zip
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fc.qemu-0.7.zip
Algorithm Hash digest
SHA256 e60893d64ba76874465c604e49cd41ae744efbee956fd3adef88bf6552074a19
MD5 8e061ae10467bdaf38d79065ad295b2f
BLAKE2b-256 37197b8db28bd24e25671f4f0290bb6fbc04e9e161106a258733d4480c8df897

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