How do i switch usb to a newly created HVM? qrexec not connected error

I got the error “qrexec not connected” while trying to switch an USB device to s newly created HVM… How do i fix that? I can switch it to the normal appVM’s as usual… Or how do i use USB in some OS created by an iso overall?
I need to fix this tomorrow… And i don’t feel like formatting Qubes after all the work put into this one! Just to install an os and getting usb to work… USB do work in HVM’s i hope…
A persistent USB stick might be the better option if i cant get this to work. I would appreciate some solutions, now i need to sleep…
Thanks in advance

If you have multiple USB controllers, assign one of them to the HVM or install qubes-usb-proxy using the ubuntu package from (or build it yourself); it will probably depended on other qubes-core-agent* packages.

It would be helpful if you could explain WHY you need Ubuntu on Qubes OS. Why is Debian not sufficient? If it’s about packages or running a specific application, why not build a Ubuntu template or use one from What benefit does a Ubuntu HVM installed from the official ISO bring you? Do you expect full Qubes OS integration? If so you must install the respective packages (see above). But you won’t have UI integration.

I get that you are in a hurry. But you should probably take the time to learn a little bit about what Qubes OS does, why and how. Otherwise you might actually waste a lot of time trying to get something to work which in the end turns out to not be what you actually need/want.

1 Like

Well written…
Yes you are right. I need to learn… I would use debian. I might need to use templates if i need to install packages like that… It’s this one application and this one thing that’s locked to ubuntu for some reason. Otherwise i would not have to do all of this… Debian would had been fine for me! You know that bureaucracy and lameness and locked to an android and that you can’t buy food soon without an app kind of thinking? And what’s your social credit score even? No cash or debians whatever that is… allowed here. “Guards!! Throw this man and his little pathetic debians money out now muhaha.” That’s why. :wink: Thanks for your answer. Well written. I agree.

How do i install qubes-usb-proxy to isos? Os that how you enable USN overall in newly created iso’s?
I would trust an iso more then some random package online of an OS also…
What is the best solution to install USB, is it the usb proxy? How does that work?

You can try this:

It works for Linux HVM as well.

1 Like

This is great!!! So this is the way then to use usb in newly created “iso hvm qubes” then?
Usb devices in sys-usb is still secure… but i just pick the hvm that needs usb then? Good solution! So it’s limited to that HVM then.
Yeah i will try this out. Sweet

Not sure if this will work with any HVM. I have successfully use it with Windows XP and Windows 10 after installing drivers in that HVMs. I think it also works with some Linux distros I tried (think it was Caine 11). But on Ubuntu live-cds it always crash - not sure way.

I’ve just tried it with Ubuntu 22.04 Desktop ISO and it worked without a problem for USB drive.

When you install Ubuntu (or any other system) on Qubes OS it runs in a virtual machine (qube). By itself that VM doesn’t have access to USB. This leads to the two options I mentioned:

  1. Assigning a PCI device to the VM (in this case one of your USB controllers if you have multiple) which means it now has exclusive use of that hardware. In that case you Ubuntu will see the USB controller as it would when installed bare metal and just use it.

  2. Installing special software (qubes-usb-proxy) that allows the guest OS to communicate via hypervisor mechanisms (qrexec) with the host OS. You know this from software like VirtualBox. In that case you can use the respective tray icon to select specific USB devices that are plugged into your computer and assign them to the qube. What happens technically is that the qubes-usb-proxy simulates a USB controller inside your guest OS and communicates with the actual USB controller that is assigned to sys-usb via a secure Qubes OS specific mechanism (qrexec).

In order to install qubes-usb-proxy or any of the other Qubes OS specific packages, you need to either build them yourself using the Qubes Builder (easier than it sounds) or use already build packages as provided by @unman. The Qubes OS project itself does not provide pre-built packages for Ubuntu for historical reasons.

Moderation comment

Removed "Kinda in a hurry to get stuff working this week… " from the title in order not to distract other users who could find this useful.

Did You try performing any operation on that usb drive? From my experience it works until I try to write something to it. Then it crashes. I have that experience with Ubuntu 20.04, Ubuntu 22.04 and Skywave 4.3.0 which is Ubuntu 20.04 remix.

As @jevank wrote in many topics about Windows Qubes You don’t need to install any agents in VM to be able to use USB by qrexec. You just need to

qvm-features [VM] stubdom-qrexec 1

and install appropriate drivers for emulated USB hub. In Ubuntu Live CD it looks like some driver problem. USB drive is recognized and after some operations (don’t know what happens but flashdrive blinking it’s LED and I can’t mount/unmount because of write operation in progress) it is mounted. It stops to work when I try to write something to it (or reformat it). On WIndows it works like a charm (even on XP when I found right driver for USB hub).

1 Like

I’ve just tried Ubuntu 22.04 ISO to mount/unmount, create new files, write in them, delete them on two different USB drives and it worked without a problem.
I have Qubes 4.1 with latest updates from current-testing repo.
If you also have updates from current-testing repo then I can only guess that your problem is somehow related to your USB controller.

it did work for me without crashing…
Max out the ram to maybe 4000mb

Pardon my bad explaining… No i did mean switching the Qubes devices as “USB”. It’s software emulation then… i did not put much effort into writing that, my bad.
I got ubuntu to work with qubes-usb-proxy or qrexec as sven wrote:

Yeah thanks… That did work for me.