Missing dev/net/tun

Hi! I have been trying to install Virtual Machine Manager and get it working.
When I attempted to install a virtual machine. I got this error.

Unable to complete install: 'Unable to open /dev/net/tun, is tun module loaded?: No such file or directory'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createvm.py", line 2001, in _do_async_install
    installer.start_install(guest, meter=meter)
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 701, in start_install
    domain = self._create_guest(
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 649, in _create_guest
    domain = self.conn.createXML(install_xml or final_xml, 0)
  File "/usr/lib/python3.9/site-packages/libvirt.py", line 4393, in createXML
    raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: Unable to open /dev/net/tun, is tun module loaded?: No such file or directory

I checked the directory and it appears that tun is missing.

I have followed the installation steps on all these sites.


I have also found a site mentioning the error but the steps require me to modify SELinux But I can’t find /etc/selinux/config directory.

Does anyone know or have any advice on how to fix this problem?

The Manjaro wiki may be of some help:


It’s not so clear what you want to achieve? Perhaps just describe what kind of a VM you wish to create.

You are mixing different tutorials and that is the perfect path to failure. You won’t find a /etc/selinux folder as Manjaro doesn’t use SELinux but Apparmor.

Installing Virtual Machine Manager is as easy as installing a few packages via the package manager. Installing a virtual machine can be more challenging and depends on what you wish to accomplish:

  1. VM runs in a terminal window (no GPU passthrough)
  2. GPU passthrough with dedicated GPU
  3. Single GPU passthrough

There are even more possibilities, but the above ones are the most common.

For option 2 and 3 to work, you need hardware that supports IOMMU.

I wrote some tutorials on that, you may want to start with this: Creating a Windows 10 kvm VM on the AMD Ryzen 9 3900X using VGA Passthrough - Heiko's Blog % Virtualization

With very few modifications, the tutorial will work with Manjaro. The concepts described are the same for all Linux distros. You will find plenty of links to other tutorials as well.

In general, the Arch Linux wiki is a great source of information if you know what to look for. I hope that my tutorial will better describe the requirements and steps necessary to run a passthrough VM (VFIO as it is referred to nowadays).