Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple kickstart based virtual image bootstrapping tool

Project Description

Virtual Image Bootstrapping Tool.

Designed to build an image from nothing (IE via netboot/kickstart), strip it down and re-package it for different targets.

Created due to the huge amount of manual work involved in re-packaging images for new versions of things.

Expected setup

Requirements:

  • Hardware virtualization support
  • 64bit host (if you want to build 64bit images)
  • Standard qemu setup (default NAT’d network)

Packages installed:

  • python-libvirt
  • qemu
  • qemu-system
  • qemu-kvm
  • libvirt-bin
  • bridge-utils
  • libguestfs-tools

Validate the install:

damian@Capricorn:~$ virsh -c qemu:///system net-list Name State Autostart —————————————– default active yes

Workflow

  • virt-install the machine
  • serve up a ks file based off the template
  • run the scripts
  • shutdown the machine
  • virt-prep the machine
  • undefine it
  • save the image
  • run qemu-img convert against the image for all desired formats

Example:

>> cat ubuntu-base.conf distro: ubuntu release: saucy target: server arch: x86_64 source: http://mirror.bytemark.co.uk/%(distro)/dists/%(release)/main/installer-%(arch)/

packages: - ubuntu-minimal - openssh-server - salt-minion - puppet

post-scripts: - ../scripts/bootup-generic.sh

images: - vmdk - vdi - qcow2 - raw

>> cat ubuntu-13.10-i386.conf include(‘ubuntu-base.conf’) release: saucy target: server arch: i386

>> ls ./ubuntu/ - bootup-generic.sh - ubuntu-base.conf - ubuntu-13.10-i386.conf - ubuntu-12.10-i386.conf

>> vibootstrap –host=qemu:///system –settings=ubuntu/ubuntu-13.10-i386.conf Setting up qemu box Installing - Progress via callbacks - Post scripts Shutdown Virt prep Undefine Converting images qemu-img convert -O vmdk ubuntu-13.10-i386.raw ubuntu-13.10-i386.vmdk qemu-img convert -O vdi ubuntu-13.10-i386.raw ubuntu-13.10-i386.vdi qemu-img convert -O qcow2 ubuntu-13.10-i386.raw ubuntu-13.10-i386.qcow2 qemu-img convert -O raw ubuntu-13.10-i386.raw ubuntu-13.10-i386.raw Artifacts: - ubuntu-13.10-i386.raw - ubuntu-13.10-i386.vmdk - ubuntu-13.10-i386.vdi - ubuntu-13.10-i386.qcow2

Release History

Release History

This version
History Node

0.0.2

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting