aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/tools/setup_libvirt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap/tools/setup_libvirt.sh')
-rwxr-xr-xbootstrap/vagrant-onap/tools/setup_libvirt.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/tools/setup_libvirt.sh b/bootstrap/vagrant-onap/tools/setup_libvirt.sh
new file mode 100755
index 000000000..54003d691
--- /dev/null
+++ b/bootstrap/vagrant-onap/tools/setup_libvirt.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+export VAGRANT_DEFAULT_PROVIDER=libvirt
+
+source /etc/os-release || source /usr/lib/os-release
+case ${ID,,} in
+ *suse)
+ ;;
+ ubuntu|debian)
+ # vagrant-libvirt dependencies
+ sudo apt-get install -y qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev
+
+ # NFS
+ sudo apt-get install -y nfs-kernel-server
+ ;;
+ rhel|centos|fedora)
+ PKG_MANAGER=$(which dnf || which yum)
+ sudo $PKG_MANAGER install -y qemu libvirt libvirt-devel ruby-devel gcc qemu-kvm
+ ;;
+esac
+vagrant plugin install vagrant-libvirt