Skip to content

Instantly share code, notes, and snippets.

@hareeshpc
Last active December 5, 2017 07:29
Show Gist options
  • Select an option

  • Save hareeshpc/18987b0740574492109dd66ab8160057 to your computer and use it in GitHub Desktop.

Select an option

Save hareeshpc/18987b0740574492109dd66ab8160057 to your computer and use it in GitHub Desktop.
vagrant_with_libvirt_provider
# KVM and Qemu
yum install -y qemu-kvm \
qemu-img \
virt-manager \
libvirt \
libvirt-python \
python-virtinst \
libvirt-client \
virt-install \
virt-viewer
systemctl enable libvirtd
systemctl start libvirtd
systemctl status libvirtd
virsh list
# Vagrant install
wget https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.rpm?_ga=2.95100890.757143751.1512435192-1237555453.1512435192
rpm -ivh vagrant_2.0.1_x86_64.rpm\?_ga\=2.95100890.757143751.1512435192-1237555453.1512435192
# Ensure dependencies are met
yum install -y qemu libvirt libvirt-devel ruby-devel gcc qemu-kvm
vagrant plugin install vagrant-libvirt
See more at: https://github.com/vagrant-libvirt/vagrant-libvirt#installation
mkdir Vagrant
cd Vagrant/
vagrant box add centos/7
Find more boxes for libvirt from:
https://app.vagrantup.com/boxes/search?utf8=%E2%9C%93&sort=downloads&provider=libvirt&q=
touch Vagrantfile
vim Vagrantfile
--
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
end
--
vagrant up
vagrant ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment