I have found never uglier way to achieve some goal.
IF YOU ARE WILLING TO RISK AND MESS WITH POTENTIALLY COMPROMISED XEN WI(N)DOWS PV DRIVERS, here’s how to do it.
Create Win HVM.
Downgrade dom0 to qwt 4.1.69-1.
Start Win qube for QWT installation (qvm-start win-qube --install-windows-tools).
Install qwt as usual in Win qube and DO NOT install network and disk drivers.
Copy .msi from CD-ROM to qube if you’ll to take step 7. in this qube.
Shutdown and start Win qube.
Using specific program, like Universal Extractor under Windows, or correspondent under Linux (if there’s any), extract .msi file from step 5 in order to get Xen disk drivers. If you did that in some other qube, copy it back to Win qube (qvm-copy-to-vm now works for Win qube, of course).
In Device Manager, manually update/add the driver with the one found in xenvbd folder extracted from .msi file, in order to install Xen PV Storage Host Adapter.
DO NOT “restart” (shutdown and start) WIn qube, or you’re done. Press NO when asked to do so.
Attach any block or USB device to Win qube.
Do your business in the Win qube.
When finished, detach device(s).
UNINSTALL the driver you installed in step 8. in Device Manager AND make sure to mark/check the option "Attempt to remove the driver for this device", or you’re done.
Shutdown Win qube.
When you want/need to use it again, REPEAT steps 8-14.
Admit you never seen uglier workaround!
Hopefully, it’ll give to someone else idea what could be done to make the installation permanent.
Also for attaching block devices you can use the Xen drivers for Windows that are not possibly compromised but unsigned instead of using the Xen drivers from QWT: https://xenproject.org/windows-pv-drivers/
The only available drivers are v9.x. I have never heard anyone succeeded to get them work with Qubes. I tried them with no luck before starting this topic. Have you? If you did and it worked out for you please share some workflow.
The v9 Xen PV drivers works the same way as QWT PV drivers for me in Windows 10.
Enable testsigning in WIndows by running this command in admin console:
bcdedit /set testsigning on
Restart qube.
Install xenbus and xenvbd drivers.
Restart qube.
In some Linux disposable qube run these commands to create test block device:
Attach this block device to Windows qube.
Open Disk Management and initialize/format the disk.
Create some test file on the disk.
Detach the block device.
Restart the Windows qube.
Attach the block device to Windows qube and check if the file created there exist.
Should this be in the “High Quality Guides” category? I’m subscribed to the category through email, and a guide that describes itself as “ugly” isn’t exactly my definition of quality.
I checked now with Qubes R4.2.2 and different Windows versions without QWT and without the Xen drivers, all having stubdom-qrexec set. With Windows 7 and 10, USB devices can be attached, but Windows does not see them. For Windows 11, the situation is even worse, as the Qube Manager does not even see the Windows VM when you try to attach a USB device to a VM.
It works for me on Qubes OS 4.2 with latest current-testing updates and Windows 10 standalone qube without QWT and Xen drivers installed.
I’ve connected the USB flash drive and USB WiFi adapter to it and I can access the USB disk in explorer and use the WiFi adapter.
Did you try to test it in a freshly installed Windows 10 qube?
This confirms my suspicion that such qubes are somehow different from newly created ones, especially as my versions are the same as those listed by @tempmail, with the exception of the kernel (I am using Linux 6.9.10-1.qubes.fc37.x86_64). I am afraid this means digging further - probably a lot of work.
Was it a clean WIndows 10 qube without QWT or Xen drivers installed there and uninstalled later?
If QWT was installed there and later uninstalled then maybe some leftover files still remains that are causing this issue.
Also check the features of the qube, maybe they’re are some of them left after installing QWT.
I have these features in my Windows 10 qube without QWT:
Upgrading dom0 set the kernel to Linux 6.10.3-1.qubes.fc37.x86_64, but this did not change anything for the Windows qube - it still could not access the USB device.
The Windows qube has left-overs from the prior QWT installation: There is a device “Xen PV Bus”, and its driver is shown as an installed program. I did not find any other remnants of the QWT installation, which seems to have been removed cleanly. Trying to uninstall the Xen PV Bus device or the driver seems to succeed, but does nothing: they just remain, even after a reboot.
So I tried with a different Windows 10 VM, restored from a Qubes R4.1 backup, which never had QWT installed, but it still does not allow access to the USB drive.
So the problem seems to come from the fact that these Windows VMs are restored from Qubes R4.1.
Can you create a fresh Windows 10 qube in Qubes OS 4.2 and check if USB attachment works there?
Just to make sure that it’s an issue with the qubes restored from Qubes OS 4.1 backup and not somewhere in your dom0.