Home VM Tips How to add NFS DATA and Expert Storage to oVirt

How to add NFS DATA and Expert Storage to oVirt

2021-09-30 | Nick Zhao

Table of contents
  • Steps for adding to oVirt

oVirt uses a centralized storage system for virtual machine disk images, ISO files, and Snapshots.

oVirt is a free and open-source virtualization solution fit for running critical enterprise Workload.

Network File System(NFS) allows client systems to access files that are stored on a remote shared server over a network and lets to make use of those file systems.

Steps for adding to oVirt

We can see the steps that Vinchin's Technical support follow to implement this.

1. Creating group/user account

First login to NFS server and create a system group called kvm on NFS server if it does not exist already:

$ getent group kvm || sudo groupadd kvm -g 36

Then create the user vdsm in the group kvm

$ getent passwd vdsm || sudo useradd vdsm -u 36 -g 36

2. Configure NFS Server

First, we can install the NFS server packages on RHEL 8.

$ sudo yum -y install nfs-utils

Then start and enable nfs-server service.

$ sudo systemctl enable --now nfs-server rpcbind

Next, we will create NFS exports directories for oVirt.

sudo mkdir -p /glusterfs/exports/ovirt/{data,iso,export}

And set the ownership of exported directories to 36:36, which gives vdsm:kvm ownership:

$ sudo chown -R 36:36 /glusterfs/exports/ovirt/data$ sudo chown -R 36:36 /glusterfs/exports/ovirt/iso$ sudo chown -R 36:36 /glusterfs/exports/ovirt/export

This gives vdsm:kvm ownership.

Next, we can change the mode of the directories:

$ sudo chmod 0755 /glusterfs/exports/ovirt/data$ sudo chmod 0755 /glusterfs/exports/ovirt/iso$ sudo chmod 0755 /glusterfs/exports/ovirt/export

And then we will configure NFS exports file with the following command:

$ sudo vim /etc/exports

Start and enable NFS server service.

$ sudo systemctl enable --now nfs-server

Then update NFS exports table with the following

$ sudo exportfs -rvv

If a firewall like firewalld is enabled, we need to add NFS service in firewalld.

$ sudo firewall-cmd --add-service=nfs --permanent$ sudo firewall-cmd --add-service={nfs3,mountd,rpc-bind} --permanent$ sudo firewall-cmd --reload

3. Attaching NFS Storage to oVirt

Finally, we can attach an NFS storage domain to the data center in oVirt/RHEV environment.

Share on:

Categories: VM Tips