Add files via upload
This commit is contained in:
committed by
GitHub
parent
c1ca9e0218
commit
ea159e5809
34
virt-manager-install-debian.sh
Normal file
34
virt-manager-install-debian.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
########################################################
|
||||
# Author: Slackjeff
|
||||
# Install and configure virt-manager on Debian.
|
||||
########################################################
|
||||
|
||||
# Check if user use sudo.
|
||||
if [[ -z "$SUDO_USER" ]]; then
|
||||
echo "Need run $0 with sudo."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update repo and install qemu and virt-manager.
|
||||
apt update
|
||||
echo -e "\n-------------> Install Qemu and virt-manager."
|
||||
sleep 2s
|
||||
apt install \
|
||||
qemu-kvm \
|
||||
qemu-guest-agent \
|
||||
libvirt-daemon-system \
|
||||
libvirt-clients \
|
||||
bridge-utils \
|
||||
virt-manager
|
||||
|
||||
# Add user on groups kvm and libvirt
|
||||
echo -e "\n-------------> Add $SUDO_USER groups: libvirt and kvm."
|
||||
sleep 2s
|
||||
adduser $SUDO_USER libvirt
|
||||
adduser $SUDO_USER kvm
|
||||
|
||||
echo -e "\n-------------> Restart Service and enable."
|
||||
sleep 2s
|
||||
systemctl start libvirtd
|
||||
systemctl enable libvirtd
|
Reference in New Issue
Block a user