Last active
February 25, 2017 19:31
-
-
Save kpettijohn/2253b82e0f47c109845f1ae2509a702d to your computer and use it in GitHub Desktop.
Vagrant + libvirt setup (Fedora 23)
This file contains hidden or 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 | |
USER=kp | |
VAGRANT_VERSION='1.9.1' | |
plugins="vagrant-libvirt vagrant-mutate vagrant-rekey-ssh" | |
sudo dnf install -y \ | |
libxslt-devel \ | |
libxml2-devel \ | |
ruby-devel \ | |
libguestfs-tools-c \ | |
gcc \ | |
qemu \ | |
qemu-kvm \ | |
libvirt \ | |
libvirt-devel | |
if ! command -v vagrant 2>/dev/null; then | |
curl -L -O https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.rpm | |
sudo rpm -Uvh vagrant_${VAGRANT_VERSION}_x86_64.rpm | |
fi | |
if ! id -nG "$USER" | grep -qw "libvirt"; then | |
sudo usermod -aG libvirt $USER | |
fi | |
for p in $plugins; do | |
if ! vagrant plugin list | grep -qw "$p"; then | |
vagrant plugin install $p | |
fi | |
done |
This file contains hidden or 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 init centos/7; vagrant up --provider libvirt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment