Skip to content

Instantly share code, notes, and snippets.

@rmariano
Created June 20, 2015 21:30
Show Gist options
  • Save rmariano/3e7d50d0ef7d124f96d1 to your computer and use it in GitHub Desktop.
Save rmariano/3e7d50d0ef7d124f96d1 to your computer and use it in GitHub Desktop.
Vagrant: Ubuntu 1404 libvirt
#!/bin/bash -x
set -e
readonly P26FLAG=/var/spool/py26-installed
apt-get install -y gcc
if [[ ! -f $P26FLAG ]]; then
[[ ! -d Python-2.6 ]] && wget https://www.python.org/ftp/python/2.6/Python-2.6.tgz
tar xf Python-2.6.tgz
cd Python-2.6
./configure
make && make install
[[ $? -eq 0 ]] && touch $P26FLAG
fi
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
Vagrant.configure(2) do |config|
# This is an image of Ubuntu 14.04 LTS with libvirt support
config.vm.box = "baremettle/ubuntu-14.04"
config.vm.provision :shell, path: "provision.sh"
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration
config.vm.provider "libvirt" do |libvirt|
libvirt.driver = "kvm"
libvirt.memory = 512
libvirt.cpus = 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment