Skip to main content

Setup for VM

If your node will serve virtual machines, you need to install and configure Libvirt and Qemu.

To allow Libvirt to use GPU device in pass-through mode, you have to make sure the NVIDIA driver is not installed or not used by the system.

0. Check NVIDIA Driver Installation

You can check if the NVIDIA driver is loaded and used by the system using the following command:

lsmod | grep nvidia
# or check if driver is used by your GPU:
lspci -k | grep -EA3 'VGA|3D|Display'

1. Remove NVIDIA Driver (if installed)

If the NVIDIA driver is installed, you can remove it using the following command:

sudo apt-get remove --purge '^nvidia-.*'
sudo apt autoremove
echo 'nouveau' | sudo tee -a /etc/modules
sudo rm /etc/X11/xorg.conf
info

Restart your machine to apply the changes.

2. Install System Dependencies

Install additional packages required by the service.

sudo apt update
sudo apt install qemu-kvm libvirt-daemon-system genisoimage whois

3. Configure Libvirt

Rift system service is run as the root user, so you need to set up libvirt to run under root as well. Edit /etc/libvirt/qemu.conf and modify the user and group settings:

user = "root"
group = "root"

Then restart the libvirtd service:

sudo systemctl restart libvirtd
tip

You can use client_setup.sh to install libvirt and rift:

sudo client_setup.sh --only=vm
sudo client_setup.sh --only=rift

4. (Optional) Ensure that GPU is not Used by the System

Add nomodeset video=efifb:off the following line in the /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=efifb:off console=ttyS0"

Then, invoke:

sudo update-grub
sudo update-initramfs -u

And reboot.

Next Steps

Proceed to the Disk Setup guide.