Adding Hyper-V kernel mods with kickstart?

Posted on

Does anyone know how or if the Hyper-V kernel modules can be added via a kickstart file when the VM is build on a hypervisor other than Hyper-V?

We build a VM in VirtualBox then boot up, add drivers for hyper-v, then shutdown, and convert the vmdk file to vhdx. This is too time consuming, but it works.

We add the mods this way, and it works great.

dracut -f --add-drivers "hv_vmbus hv_storvsc hv_netvsc hv_utils hv_balloon hyperv-keyboard hyperv_fb hid-hyperv"

I'm not sure how to do the same thing in a kickstart. Maybe just run the same command in a %post installer section? Maybe there's a better way - a best practice method perhaps?

Thanks,

Chris