---
tags: Redhat, RHEL
---
# Redhat KVM installation with Tesla T4 Pass Through
###### tags: Redhat, KVM, RHEL
## HW Equipment
SCB 1921
Xeon 6264
16GB*24
## SOP





### Hardware & Software & OS compatebility
https://docs.nvidia.com/grid/latest/product-support-matrix/index.html
### Downloading Source
Download iso file from:
RHEL8 https://access.redhat.com/downloads/content/479/ver=/rhel---8/8.1/x86_64/product-software
RHEL7 https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.9/x86_64/product-software
Always download Red Hat Enterprise Linux Binary DVD file and file size should be in GBs. and While Installation choose server with GUI option
### Manual Partion of Hard Drive
https://www.computernetworkingnotes.com/rhce-study-guide/rhel-installation-step-by-step-explained-with-screenshots.html
### How to install a graphical user interface (GUI) for Red Hat Enterprise Linux
https://access.redhat.com/solutions/5238
### Finish the installtion
### BIOS Setting
1. Socket Configuration > Processor Configuration
```javascript=
vmx [Enabled]
```
2. Socket Configuration > IIO Configuration > Intel VT for Directed I/O (VT-d)
```javascript=
Intel VT for Directed I/O (VT-d) [Enabled]
```
3. Advanced > PCI subsystem settings
```javascript
SR-IOV Support [Enabled]
```
### Open the terminal and Run
```javascript=
su
```
```javascript=
yum update
```
> Possible Error "There are no enabled repositories in /etc/yum.repos.d /etc/yum/repos.d /etc/distro.repos.d solved in RHEL"
Solution 1:
```javascript=
1. subscription-manager register
or
subscription-manager register --force
"Give the username and password like mine is username: sohail.anjum pw:****"
2. Subscription-manager auto-attach
"Auto-attach preference: enabled"
3. Subscription-manager subscribe
"Product Name: Red Hat Enterprise Linux for x86_64"
"Status: Subscribed"
4. yum update
```
Solution 2:
```javascript=
"The main problem is that there are no enabled repositories, which can easily be solved the best for you would be to start over from scratch."
"First clean up everything - open a terminal and execute the following commands :"
sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean
"Now re-register the system, attach the subscriptions - execute these commands :"
sudo subscription-manager register
sudo subscription-manager refresh
sudo subscription-manager attach --auto
```
Solution 3:
```javascript=
"Make sure the system time and date is correct"
[root@localhost ~]# date
Mon Mar 30 16:45:20 EDT 2020
"Set the time and date from settings if the about result is not matched with current data and time"
```
### Verify the CPU virtualization extensions are available
```javascript=
grep -E 'svm|vmx' /proc/cpuinfo
```
### Analyze the output

### Verify the CPU virtualization VT-d is available
```javascript=
$ lscpu | grep Virtualization
"Virtualization: VT-x"
```
### Ensure the KVM kernel modules are loaded
```javascript=
lsmod | grep kvm
```
```julia=
"kvm_intel 315392 0"
"kvm 847872 1 kvm_intel"
"irqbypass 16384 1 kvm"
```
### Installing useful tools for virtual machine management.
```javascript=
sudo yum -y install virt-top libguestfs-tools
```
### Start and enable KVM daemon.
```javascript=
sudo systemctl enable --now libvirtd
```
### Install Virtual machine Manager GUI – Optional.
```javascript=
sudo yum -y install virt-manager
```
### Installing Virtualization Packages Manually
```javascript=
yum install qemu-kvm libvirt
yum install virt-install virt-manager virt-install libvirt-client
yum groupinstall "Virtualization Tools"
```
### Check the details of NVIDIA devices
```javascript=
$ lspci -vnn | grep -A 13 NVIDIA
"08:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A] [10de:1f08] (rev a1) (prog-if 00 [VGA controller])""
"Kernel driver in use: vfio-pci"
"Kernel modules: nouveau, nvidia_drm, nvidia"
```
## Errors
### 1. Unable to verify server's identity: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed, use below steps.
```javascript=
"follow the steps below:"
vi /etc/rhsm/rhsm.conf
"Set to 1 to disable certificate validation:"
insecure = 1
"and Resgiter the system again with username and password. Registration step are above"
```
### 2.Another app is currently holding the yum lock; waiting for it to exit
```javascript=
"Solution 1:"
rm -f /var/run/ yum.pid
"Solution 2:"
ps aux | grep yum (find out yum-updatesd and yum PID)
kill -9 <yum PID>
```
### 3. InitRAMFS, Dracut, and the Dracut Emergency Shell
```javascript=
# ls /dev/mapper
"control rhel-swap"
# lvm lvscan
"ACTIVE '/dev/rhel/swap' [3.85 GiB] inherit"
"inactive '/dev/rhel/home' [22.85 GiB] inherit"
"inactive '/dev/rhel/root' [46.80 GiB] inherit"
# lvm lvchange -a y rhel/root
# exit
```
### Reference
https://github.com/bryansteiner/gpu-passthrough-tutorial