Win7 Qubes windows-tools v3.2. attaching any device failsf

39 views
Skip to first unread message

xyzo

unread,
Mar 6, 2020, 5:31:28 PM3/6/20
to qubes-users
Qubes R4.0
Windows-tools v3.2.2-3

I recently installed a Win7 hvm with Window-tools v4.x. I initially had problems getting qrexec service to work on Win7. So I tried version 3.2.2-3 and It successefully installed all of the qubes-tools, qubes_core-agents, qubes-gui.etc. and now Win7 has a green dot state when it's powered on. I can copy files from other appvms to the windows Qubesincoming. The pv drivers installed are the same version bundled with windows-tools v3.2.2-3. I've been scratching my head with attaching USB devices like the internal webcam, audio, thumb drive on win7. I get an error msg "Qubes exception.failed. attach device failed".. with audio I know I have to have pulseaudio running on Windows? qvm-usb a Win7 sys-usb:xx: gives the same error. I am not sure what to do next at this point. thanks

xyzo

unread,
Mar 7, 2020, 10:42:06 AM3/7/20
to qubes-users
Quick update

I updated the pv drivers to 8.2.2 and now win 7 is running a lot smoother. If I attach the audio pci controller under devices in Qubes device manager. The audio will work and is recognized in win 7. That's great but Is there anyway I can get the audio to work with out attaching audio controller to only win 7? I'd like to have audio running in other appvms in parallel to hvm.

Also, attaching the USB controller pci to win7 will stop win 7 from booting. It will say "no bootable device was found" when I run it.  And if I try attaching  any USB device  through dom0 "qvm-usb attach Win7 sys-usb:2-7" I get "exception failed. Device failed to attach" I'm lost with this one. any help is appreciated thanks

Sven Semmler

unread,
Mar 7, 2020, 12:52:50 PM3/7/20
to xyzo, qubes-users
On Sat, Mar 07, 2020 at 07:42:06AM -0800, xyzo wrote:
> I updated the pv drivers to 8.2.2 and now win 7 is running a lot smoother.
> If I attach the audio pci controller under devices in Qubes device manager.
> The audio will work and is recognized in win 7. That's great but Is there
> anyway I can get the audio to work with out attaching audio controller to
> only win 7? I'd like to have audio running in other appvms in parallel to
> hvm.

I use a little USB audio in/out adapter [1] for $9.99

> Also, attaching the USB controller pci to win7 will stop win 7 from
> booting. It will say "no bootable device was found" when I run it. And if

I get this error if there is any storage media connected on USB when I
boot the Windows VM. Maybe try again and make sure nothing is connected
when you boot.

Also: for some strange reason I need to limit my VMs memory to 2048MB
when attaching the USB controller. Otherwise it'll crash. Your millage
might differ.

> I try attaching any USB device through dom0 "qvm-usb attach Win7
> sys-usb:2-7" I get "exception failed. Device failed to attach" I'm lost
> with this one. any help is appreciated thanks

It's my understanding that this functionality is simply not implemented
in the Qubes Windows drivers. The way this is implemented in Qubes is
using USBIP but instead of a network IP connection it uses the XEN
qrexec mechanism: https://github.com/QubesOS/qubes-app-linux-usb-proxy

So I tried to run USBIP in Windows and run an unchanged USPIP host in
sys-usb a couple years back and that worked for simple devices /
protocols (e.g. USB-to-serial interface but not more complex USB devices
like RealICE debuggger). So I gave up on that and instead have dom0
scripts to easily switch the controller between sys-usb, app-dev and
app-win.

/Sven

[1] TROND External USB Audio Adapter Sound Card with One 3.5mm Aux
TRRS Jack for Integrated Audio Out & Microphone in
https://www.amazon.com/gp/product/B07L56C28R/

--
public key: https://www.svensemmler.org/0x8F541FB6.asc
fingerprint: D7CA F2DB 658D 89BC 08D6 A7AA DA6E 167B 8F54 1FB6

signature.asc

xyzo

unread,
Mar 12, 2020, 2:07:18 PM3/12/20
to qubes-users
>I use a little USB audio in/out adapter [1] for $9.99

Thank you so much. +1 for the USB audio adapter suggestion.


>I get this error if there is any storage media connected on USB when I
>boot the Windows VM. Maybe try again and make sure nothing is connected
>when you boot.

that was it. Now it's boots up once I unplugged the storage media



>It's my understanding that this functionality is simply not implemented
>in the Qubes Windows drivers. The way this is implemented in Qubes is
>using USBIP but instead of a network IP connection it uses the XEN
>qrexec mechanism: https://github.com/QubesOS/qubes-app-linux-usb-proxy

>So I tried to run USBIP in Windows and run an unchanged USPIP host in
>sys-usb a couple years back and that worked for simple devices /
>protocols (e.g. USB-to-serial interface but not more complex USB devices
>like RealICE debuggger). So I gave up on that and instead have dom0
>scripts to easily switch the controller between sys-usb, app-dev and
>app-win.


So the script would basically be something like "qvm-pci attach app-win dom0:bdf_usb_controller_address"?

I will look into the usbip thanks..

There's something else with windows hvm, not sure if you have experienced it yet. But have you ever tethered into Win7 while USB controller attached to win7. Usually the way I tether into any appvm. The sys-usb will have networkmanager service enabled. And then I will just change sys-firewall netvm to sys-usb instead of sys-net. so any appvm with sys-firewall as netvm I can tether into it and access the internet.. however now detaching USB controller from sys-usb to attach it to win7 you can't tether in windows. I tried changing win7 netvm to none as sys-usb and add networkmanager service in Qubes manager as sys-usb but that didn't work..the only way to access internet while having usb pci attached to win7 is to have sys-net connected to Internet with sys-firwall as the win7 netvm and sys-firewall netvm as sys-net.. sometimes I don't have access to an internet to connect to sys-net. So I usually tether through sys-usb. Are you aware of a way to have USB pci attached to win7 and still be able to tether in win7. I think it's possible it's just a matter of configuring your win7 net adapter correctly..

Sven Semmler

unread,
Mar 12, 2020, 5:46:47 PM3/12/20
to xyzo, qubes-users
On Thu, Mar 12, 2020 at 11:07:18AM -0700, xyzo wrote:
> So the script would basically be something like "qvm-pci attach app-win dom0:bdf_usb_controller_address"?

I always do this while the hvm is shutdown in which case you need to add
the --persistent parameter. Also some (including my) USB controller
don't support PCI resets so you need an additional parameter dealing
with that...

qvm-pci attach win --persistent --option no-strict-reset=True
dom0:xx_xx.x

> I will look into the usbip thanks..

Don't hold your breath. It won't work for more complex devices.

> But have you ever tethered into Win7 while USB controller attached to win7. [...] I think it's possible it's just a matter of configuring your win7 net adapter correctly..

Well I've seen it happen by accident ;-) My normal setup is to enable
the hotspot function on my iPhone and have sys-net connect to it via
WiFi.

Then I assign the USB controller to Windows and start it while my iPhone
is also connected to the PC to charge. In Windows I have iTunes
installed and with it the USB-Ethernet drivers. So as soon as Windows
sees my iPhone it uses it as primary network interface.

Basically I agree if you only thether then assigning the USB controller
to Windows will have the rest of Qubes offline (since now obviously
sys-usb doesn't have it anymore). But Windows should be able to use the
conntection if the right drivers are installed.

Side note: my old MacBookPro which I used with Qubes R3.2 had two USB
controllers. So I could keep one connected to sys-usb while the other
one was connected to Windows. Just had to figure out which port connects
to which controller. You might be lucky and also have two controllers.

/Sven
signature.asc

xyzo

unread,
Mar 12, 2020, 10:54:04 PM3/12/20
to qubes-users

>I always do this while the hvm is shutdown in which case you need to add
>the --persistent parameter. Also some (including my) USB controller
>don't support PCI resets so you need an additional parameter dealing
>with that...

>qvm-pci attach win --persistent --option no-strict-reset=True
>dom0:xx_xx.x

Thanks

>Don't hold your breath. It won't work for more complex devices.

I honestly only care about connecting only the webcam for proctorU for schools exams sigh. Unfortunately ProctorU can only run on win or Mac and I only run Qubes on my daily driver. I can install win7 on another SSD but I would really hate to reboot back & forth between win7 and Qubes. It's much more practical to have the win appvm running along with the rest of my other appvms. But at least USB works when attaching the USB controller. I think there's a special USBIP driver for windows that must be installed first with USBIP

https://github.com/QubesOS/qubes-issues/issues/2335


>Well I've seen it happen by accident ;-) My normal setup is to enable
>the hotspot function on my iPhone and have sys-net connect to it via
>WiFi.

Big thumbs up for the hotspot suggestion. I just tested it and it works. I am always anti-wifi without a VPN unless it's my home wifi. I always tether into any machine when I am outside..

>Basically I agree if you only thether then assigning the USB controller
>to Windows will have the rest of Qubes offline (since now obviously
>sys-usb doesn't have it anymore). But Windows should be able to use the
>conntection if the right drivers are installed.

It should and I have an Android. I installed the Android drivers. The tether network adapter just stays as "identifying network" and never actually connects through. But I definitely didn't think of using the hotspot.

>Side note: my old MacBookPro which I used with Qubes R3.2 had two USB
>controllers. So I could keep one connected to sys-usb while the other
>one was connected to Windows. Just had to figure out which port connects
>to which controller. You might be lucky and also have two controllers.

Wow just the right hardware setup for any Qubes hvm. My daily driver is a Lenovo E5 model. No 2usb controllers for me unfortunately.. I appreciate your feedback and your great help.

Reply all
Reply to author
Forward
0 new messages