Proxmox - GPU Passthru (Gaming VM)

posted Jan 16, 2021, 4:47 AM by Chris Franklin

So the idea was to allow gaming via steamlink, Moonlight or rdp. The spare GPU is a Nvidia GTX 970.

VM Config:


audio0: device=ich9-intel-hda,driver=spice
balloon: 0
bios: ovmf
boot: order=virtio0;net0
cores: 5
cpu: host,hidden=1,flags=+pcid
efidisk0: local-zfs:vm-119-disk-1,size=1M
hostpci0: 42:00.0,pcie=1,x-vga=1
hostpci1: 42:00.1,pcie=1
machine: q35
memory: 16000
name: Gaming
net0: virtio=32:5C:23:AB:B7:BB,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsihw: virtio-scsi-single
smbios1: uuid=56972211-eb56-407c-bf7e-3aaec9422336
sockets: 2
vga: none
virtio0: local-zfs:vm-119-disk-0,backup=0,cache=writeback,size=32G
virtio1: local-zfs:vm-119-disk-2,backup=0,cache=writeback,size=200G
vmgenid: e7c53bb6-6bcb-4e8e-8d0c-7ce54469dea2


Proxmox - Install megacli

posted Jan 5, 2021, 5:16 AM by Chris Franklin

This script simply installs the repo for and then megaclisas-status and megacli packages.



_WGET=$(which wget)
if [ $? -ne 0 ]; then
 apt update
 apt install wget -y

$_WGET -O - | apt-key add -
if [ $? -eq 0 ]; then
 cat <<EOF>/etc/apt/sources.list.d/megacli.list
deb buster main
apt update && apt install -y megaclisas-status megacli

Proxmox - Install Chrome

posted Jan 5, 2021, 5:14 AM by Chris Franklin

This script installs chrome and allows it to run as root.



_WGET=$(which wget)
if [ $? -ne 0 ]; then
 apt update
 apt install wget -y

$_WGET -O /tmp/google-chrome-stable_current_amd64.deb
if [ $? -eq 0 ]; then
 apt install -y /tmp/google-chrome-stable_current_amd64.deb
 if [ $? -eq 0 ] && [ -e /tmp/google-chrome-stable_current_amd64.deb ]; then
  rm /tmp/google-chrome-stable_current_amd64.deb

# fix root access to chrome
sed -i.backup 's/exec\ \-a\ \"\$0\"\ \"\$HERE\/chrome\"\ \"\$\@\"$/exec\ \-a\ \"\$0\"\ \"\$HERE\/chrome\"\ \"\$\@\"\ \-\-user\-data\-dir\ \-\-test\-type\ \-\-no\-sandbox/g
' /opt/google/chrome/google-chrome

Proxmox - Install Desktop

posted Jan 5, 2021, 5:12 AM by Chris Franklin

This script will install a light weight GUI (xfce), disable the extra power settings (sleep, suspend, hibernate) and allow root to login to the gui. This along with a browser helps simplify tasks that need to be done while your on/at the host itself.



apt update && apt install lightdm xfce4 gpm xfce4-terminal --no-install-recommends -y
if [ $? -eq 0 ]; then
 systemctl set-default

# Allow root
sed -i.backup 's/^minimum-uid/#minimum-uid/g' /etc/lightdm/users.conf

# Disable all power settings.
systemctl mask

1-4 of 4