# vim: set ft=make : # Setup and configure virtualization and vfio [group("virtualization")] setup-virtualization ACTION="": #!/usr/bin/bash source /usr/lib/ujust/ujust.sh if [[ $(id -u) -eq 0 ]]; then echo "Please do not run this command as root" exit 1 fi # Check if we are running on a Steam Deck if /usr/libexec/hwsupport/valve-hardware; then echo "${red}${b}WARNING${n}: Virtualization is not properly supported on Steam Deck by Valve" echo "Use at your own risk and performance may not be ideal." fi if [ "$(systemctl is-enabled libvirtd.service)" == "disabled" ]; then echo "${b}libvirtd${n} service is ${red}disabled${n}!" echo "${green}enabling${n} and starting libvirtd" echo "If virt-manager says libvirtd.sock is not available after a big update, re-run this command." sudo systemctl enable --now libvirtd 2> /dev/null echo "Press ESC if you want to exit and do not need to do anything" fi OPTION={{ ACTION }} if [ "$OPTION" == "help" ]; then echo "Usage: ujust setup-virtualization