I have bought an Edimax USB wifi stick, which requires an out-of-tree (i.e. 3rd party) kernel module to be compiled for it to run on Linux. However, Qubes OS is a bit different to ordinary Linux distributions, so I am struggling to understand how to do this. I already know that to use a USB device from NetVM I have to assign one of my two USB controllers to the NetVM, and I have this working successfully with my old USB wifi device. From here I learned that a standalone NetVM with a custom kernel is required for out-of-tree modules, so I created one, and in here I read

There is a special case when the VM can have a custom kernel – when it is updateable (StandaloneVM or TemplateVM) and the kernel is set to “none” (by qvm-prefs). In this case the VM uses the kernel from the “kernels” VM subdir and modules.img is attached as R/W device. FIXME: “none” should be renamed to “custom”.

What does "the VM uses the kernel from the “kernels” VM subdir" mean? What do I have to do?


It means that the VM directory in /var/lib/qubes/servicevms gets a new kernels subdirectory, which is auto-populated with one of the existing Qubes kernels and associated modules image file - and crucially, the latter is mounted as writeable inside the VM, which is what we need here. To customise the kernel itself, you can replace the vmlinuz file - but since I didn't need to do that, I didn't. So I didn't need to do anything special to prepare the VM for the custom kernel module installation - I just:

  1. shut down all the other VMs, shutting down the existing NetVM last, so that the new VM could claim the USB controller PCI device
  2. booted the new VM
  3. opened a terminal in the new VM
  4. typed sudo yum-deprecated install kernel-devel-$(uname -r) dkms
  5. followed the instructions to install the kernel module in its README file
  6. right-clicked on my FirewallVM, chose Settings and set the new VM as its NetVM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.