Created
February 4, 2020 16:19
-
-
Save j-griffith/63bbbaee5b3f814eb7efca1631913f16 to your computer and use it in GitHub Desktop.
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 | |
DNF=$(which dnf) | |
APT=$(which apt) | |
if [[ ! -z $APT ]]; then | |
sudo apt update -y | |
sudo apt install -y \ | |
qemu-kvm \ | |
libvirt-clients \ | |
libvirt-daemon-system \ | |
libguestfs-tools \ | |
elif [[ ! -z $DNF ]]; then | |
sudo dnf update -y | |
sudo dnf group install -y virtualization | |
else | |
echo "unsupported package manager" | |
exit 1; | |
fi | |
sudo gpasswd -a "${USER}" libvirt | |
sudo modprobe -r kvm_intel | |
sudo modprobe kvm_intel nested=1 | |
# Don't need both of these on all systems, but meh... doesn't hurt either | |
echo "options kvm_intel nested=1" | \ | |
sudo tee /etc/modprobe.d/kvm.conf | |
echo "options kvm_intel nested=1" | \ | |
sudo tee /etc/modprobe.d/qemu-system-x86.conf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment