24 lines
918 B
Bash
24 lines
918 B
Bash
#!/bin/bash
|
|
|
|
|
|
echo "(1/5) Update apt"
|
|
apt-get update -y -qq
|
|
echo "(2/5) Install dependencies..."
|
|
apt-get install -qq lxc lxcfs lxc-templates python3-lxc python3-pip bridge-utils
|
|
apt-get install -qq qemu-kvm virtinst qemu virt-manager libvirt-daemon libvirt-daemon-system bridge-utils virt-viewer libvirt-clients libosinfo-bin python3-venv
|
|
echo "(3/5)Install Flask modules and Web terminal modules..."
|
|
python3 -m pip install --upgrade pip
|
|
pip3 install -q psutil flask_fontawesome flask pyxtermjs simplepam Flask-Navigation flask-dropzone pygal
|
|
pip3 install -q -r ./requirements.txt
|
|
echo "(4/5) Libvirt configuration"
|
|
echo "\tEnable libvirt"
|
|
systemctl --quiet enable --now libvirtd
|
|
echo "\tStarting libvirt"
|
|
systemctl --quiet start libvirtd
|
|
echo "(5/5)Create a Bridged Network"
|
|
cp ./bridged.xml /usr/share/libvirt/networks/
|
|
virsh net-define bridged.xml
|
|
virsh net-start bridged
|
|
virsh net-autostart bridged
|
|
echo "Done !"
|