Skip to content

Scripts to create images/boxes compatible with vagrant-libvirt

License

Notifications You must be signed in to change notification settings

domcleal/vagrantify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vagrant-builder

Wrapper script around virt-builder from the libguestfs suite.

This generates a vagrant-libvirt compatible image based on the pre-built templates that virt-builder can consume (and publishes).

Unfortunately many of the images are bigger than the cloud images, so if you're trying to minimise the image sizes, then this may not be best.

vagrantify

Contains scripts to create Vagrant boxes for vagrant-libvirt. I'm only interested in:

  • RHEL, CentOS
  • Fedora
  • Debian stable, oldstable
  • Ubuntu LTS
  • Puppet and non-Puppet

Converting "cloud" images

Fedora, RHEL and other distros produce qcow2 images suitable for OpenStack or libvirt, but they don't contain the vagrant user and are set up to run cloud-init on boot.

Instead of altering the cloud images, the Vagrant-specific changes are be applied via cloud-init when the image boots up. While this minimises changes to the image, the downside is boot speed (if needing to install Puppet).

The problem is that libvirt has no cloud-init support itself. Rich Jones describes how to boot a cloud image under libvirt using a cloud-init config disk, but this would involve changes to vagrant-libvirt to configure the libvirt domain correctly.

Instead, vagrantify injects cloud user-data into the image's filesystem and cloud-init picks this up at boot as a first class datasource.

Compatibility

Tested with:

Building Debian images

Copy debian/* to /root/ and run:

build-openstack-debian-image -r wheezy -u http://ftp.uk.debian.org/debian -s http://ftp.uk.debian.org/debian -hs /root/cloud-init.sh

The hook script reconfigures cloud-init to use a NoCloud datasource.

About

Scripts to create images/boxes compatible with vagrant-libvirt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages