There is are a couple things that we need do first.
Install Vagrant's latest version from the download site.
Then install the plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant plugin install vagrant-kvm | |
vagrant plugin list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get-vagrant-box.sh | |
vagrant box add precise64 http://files.vagrantup.com/precise64.box | |
pushd ~/.vagrant.d/boxes/precise64/ | |
cp -R virtualbox/ kvm | |
cd kvm | |
# copy the Vagrantfile and metadata.json file in this directory | |
pwd | |
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"provider": "kvm"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vagrantfile | |
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.base_mac = "00163e779fe9" | |
config.vm.network :private_network, ip: "192.168.2.100" | |
end | |
# Load include vagrant file if it exists after the auto-generated | |
# so it can override any of the settings | |
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__) | |
load include_vagrantfile if File.exist?(include_vagrantfile) |
Here is a simple Vagrantfile you need to spin up your own KVM vagrant instance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
end |
This is about as easy as it gets.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant up provider=kvm |
The code base for vagrant-kvm is located here. https://github.com/adrahon/vagrant-kvm#quick-start
Great, thanks. I've been having performance problems with bundler gem installations on virtualbox lately. I wonder if this will help.
ReplyDelete