Is Virtual Machine Pass Through Possible On Purism Hardware?

I’ve been hacking away at this for awhile, but still no luck getting pass through to work on VMs.

According to this guide, the vast majority of laptops don’t support pass through. Is this the case with Librem 13"?

Have anyone got pass through to work on their VMs?


I think the main Problem is that you don’t have the 2 GPUs the article is talking about you only have the one integrated into the CPU which your base OS is using, so which PCIe hardware of your Librem 14 do you want to pass thru to your VM, we might be able to help you a little bit better.

A short search brought this one up maybe that could help you set it up

1 Like

Thanks. I will go thru the manual.

What I need right now is external harddrives & USBs to pass thru to the VM. The VM needs to be able to access external media.

Anyone using VMs and is able to access the USB drives with it?

Before a spend anymore time, only to find out that it can’t be done on this hardware, I just need to know that it is possible, and others are doing it now.

Yes, you can pass USB controllers through to a VM. The question is why would you on a librem? Normally, when bothering with hardware passthrough, you pass a GPU through, since that’s the one component VMs don’t virtuallise well.

This sounds like an X,Y problem, what exactly are you hoping to do on the laptop in the VM?

That aside, you can only safely pass whole IOMMU groups through to a VM, there is a kernel patch to disable IOMMU security, but using it is a bad idea. You can find out if your kernel has IOMMU enabled by looking at dmesg at boot. If it’s enabled, but doesn’t find any IOMMU controllers, you probably don’t have IOMMU enabled in the BIOS, which lots of laptops don’t let you enable (but since the BIOS is more open on a librem, you may be able to enable them, in theory). Then it’s just a matter of figuring out which IOMMU groups to pass through, and passing them through. I strongly recommend qemu over VirtualBox and the like.


I don’t think you need PCIe pass through for that.
AFAIK the most universal usable option would be sshfs you’ll probably find clients for all Operating systems.
Also most virtualization tool offer some out of the box folder sharing that should work as well.

1 Like

What exactly do you need to access in the VM? The disk? Some spare blocks of storage on the disk? The file system on the disk (i.e. the contents of the files on the disk)?

If it’s the last of the three then

a) it would not be normal to give the VM access to the entire file system (since you’ve lost a lot of your isolation by doing that)

b) the VM can access whatever parts of the file system it is supposed to access by serving the file system from the host computer to the VM (i.e. using a mechanism outside of the virtualisation mechanism that works exactly the same as when the ‘client’ is on a different computer, rather than virtual on the same computer).


Doesn’t Qubes rely on this to pass devices to separate domains so the drivers run seperate?
If so, any of the Librem laptops that supports Qubes can do this.

To help with your specific problem it would be useful to know what kind of errors you get while trying to do this.

As far as passing through USB devices with GNOME Boxes, I used to be able to easily check the Properties of a VM, go to the “Devices and Shares” tab, and then see any USB devices I had and pass them through.

Now I can’t seem to do that. Dunno if it’s because I’m running Boxes from Flatpak, or if there’s some library missing.

Anyone know?

If you install guest additions in your guest os (I think I read that you’re using virtualbox) it should allow access to external USB drives plugged into the host.

To make USB work with VirtualBox, you need to make sure that the user running VirtualBox belongs to the vboxusers group. If you want to use USB 2.0 or USB 3.0 devices, then you also need to install the VirtualBox Extension Pack from Oracle, which has a separate license agreement.

Having done this, you should be able to pass individual USB devices through to the VM by using the GUI. You can also set up filters which automatically attach specific devices to the guest instead of the host, whenever those devices are plugged in.

AFAIK, you don’t need to install Guest Additions to make USB work, but it won’t hurt.

However, the performance of USB pass-through is not always great in my experience. If you need better performance:

  • To access files on USB storage devices, consider whether you can use VirtualBox’s Shared Folders feature instead (which does require Guest Additions).
  • If the USB drive will only ever be accessed by that particular VM, then consider just creating a new virtual disk image that’s stored on the USB drive, and attaching that image to the VM.
  • Only if none of these methods is suitable would I consider passing through an entire physical USB controller to the guest, instead of using the hypervisor’s emulated one. (Not something I’ve ever done.)

I have no experience with using USB with hypervisors other than VirtualBox.

Note that the separate license agreement is pretty terrible. It’s free for non commercial, personal use only (used to be personal use, commercial or otherwise). Oracle watches the IPs from which it’s downloaded, and if they think the IP is a business IP, may come after you (have before).

They made that change right before qemu gained most of the missing features, as a last minute money-grab. Anymore, I suggest just using qemu, as it’s actually free, and generally better than VirtualBox.


I haven’t tried Qemu in 7 or 8 years, but at that time, VirtualBox was faster, Qemu didn’t have an easy way to access USB ports, and VirtualBox had a nice feature that allows you run an application in the virtual machine as if it is a window inside the host’s desktop environment.

I’m going to have to try Qemu again. I usually prefer community software over commercial software, even when both are FOSS.

1 Like

1 Like

Aye, it’s only been in the last 4 or so years the qemu worked well enough for general use. It can pass whole PCI/e components through to guests (which means you can pass a USB controller through and anything plugged into those ports automatically show up in the VM). It can also use the raw /dev/sdX too, has UEFI support, can do cross-arch emulation, and so on. All while suffering <10% performance loss to virtualization, usually. Note that you have to have virtualization support in the bios, KVM in the kernel, and access as the user to /dev/kvm.

That said, running a program in the client as a window on the host does sound neat. It could probably be added easily enough under Linux guests. Maybe the Looking Glass guys could add something similar with Windows…

Yes. That’s what I meant. :sweat_smile: