3.5. Installing Hyper-V device drivers
Microsoft provides network and storage device drivers as a part of their Linux Integration Services (LIS) for Hyper-V package. Before provisioning a VM image as an Azure VM, install Hyper-V device drivers on it.
Prerequisites
- You have installed the Azure CLI.
Procedure
Verify if the system has Hyper-V device drivers:
# lsinitrd | grep hv drwxr-xr-x 2 root root 0 Aug 12 14:21 usr/lib/modules/3.10.0-932.el10.x86_64/kernel/drivers/hv -rw-r--r-- 1 root root 31272 Aug 11 08:45 usr/lib/modules/3.10.0-932.el10.x86_64/kernel/drivers/hv/hv_vmbus.ko.xz -rw-r--r-- 1 root root 25132 Aug 11 08:46 usr/lib/modules/3.10.0-932.el10.x86_64/kernel/drivers/net/hyperv/hv_netvsc.ko.xz -rw-r--r-- 1 root root 9796 Aug 11 08:45 usr/lib/modules/3.10.0-932.el10.x86_64/kernel/drivers/scsi/hv_storvsc.ko.xzIn case, all the drivers are not installed or even the
hv_vmbusdriver is listed, complete the remaining steps.Create the
hv.conffile in the/etc/dracut.conf.ddirectory and add the following driver parameters:# vi hv.conf add_drivers+=" hv_vmbus " add_drivers+=" hv_netvsc " add_drivers+=" hv_storvsc " add_drivers+=" nvme "Ensure that you have added spaces after and before the double quotes
add_drivers+=" hv_vmbus "to load unique drivers, in case other Hyper-V drivers already exist in the environment.Regenerate the
initramfsimage:# dracut -f -v --regenerate-all
Verification
- Reboot the machine.
Verify installation of drivers:
# lsinitrd | grep hv
Next steps
- Prepare your VM for deployment on Azure cloud.