QWT for Qubes R4 with Win10 almost works

57 views
Skip to first unread message

Neal Krawetz

unread,
May 24, 2021, 12:30:12 PM5/24/21
to qubes-devel
I think I'm really close to getting Win10 running with USB support under Qubes R4, but I need some help.

According to the official docs, Win10 HVM with QWT should have full USB support:
But as anyone who has ever tried to install it knows, the installation has problems.

As far as I can tell, the main problems are in the installation code for QWT on the Windows side.

Here's what I have working so far:
1. Install Win10 as an HVM.  (Baseline.)

2. Install 7-zip, since it will be needed to unpack tar files.

3. Go to https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1/.  This is needed to install QWT. (QWT requires .NET version 3.5, but doesn't wait for it to install. To make it work correctly, install .NET version 3.5 first!)

4. Go to https://xenbits.xenproject.org/pvdrivers/win/ and download the 9.0.0 tar files for xenbus, xenvkb, and xeniface.
Unpack the tar files.
Install xenbus/x64/ and xenvkb/x64/ but do NOT reboot.
No NOT install xeniface -- you'll need that later to fix a missing dll.
After it is installed, reboot.

5. Go to https://ftp.qubes-os.org/qubes-windows-tools/ and download qubes-tools-4.0.1.3.exe
Run it.
De-select pvdrivers and migrate user account.
Install.
When it's done, reboot.

6. The QWT exe failed to install everything it needs. As far as I can tell, the CAB file buried inside the EXE didn't install and the installer just ignored the error.  As a result, the Qubes services did not start.  (Go to the Start menu, type Services, and open the Services app. Jump down the Qubes in the services list and you'll see that they didn't start.)
I suspect that the installer worked under Win7 but does not work under Win10.
The problem for the missing services comes from two missing dll files: xencontrol.dll and libxenvchan.dll.

xencontrol.dll is in the xeniface.tar file (this is why I had you downloaded the tar). Copy the dll to "C:\Program Tools\Invisible Things Lab\Qubes Tools\bin\" and paste it right next to qubesdb-daemon.exe

libxenvchan.dll is buried inside the exe.  This takes a linux system to extract:
cabextract qubes-tools-4.0.1.3.exe  # lots of files, you want "a1". a1 is an exe that won't run under Win10
7z x a1 content.cab  # extract the cab file from a1
cabextract -Flibxen\* content.cab  # this extracts libxenvchan.UUID
mv libxenvchan.* libxenvchan.dll
Transfer this dll to some web site and then download it into the Windows VM.
Copy the dll to "C:\Program Tools\Invisible Things Lab\Qubes Tools\bin\" and paste it right next to qubesdb-daemon.exe

7. Reboot the Windows VM.  Now the services are running!
Confirm this: Go to the Start menu, type Services, and open the Services app. Jump down the Qubes in the services list and you'll see that they started.

At this point, things that work:
  + USB block devices, such as a thumb drive, can be attached to the WinVM.

Things that do not work:
  - USB character devices, like a webcam, yubikey, or smartcard reader, fail.  The error: "qrexec not connected"

I suspect the problem is that more files in the cab need to be installed but are missing. Does anyone know what files are needed, where they go, and what (if any) registry changes are needed?

Does anyone recognize the problem or have an idea about how to fix it?

Marek Marczykowski-Górecki

unread,
May 24, 2021, 7:57:18 PM5/24/21
to Neal Krawetz, qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Mon, May 24, 2021 at 09:30:12AM -0700, Neal Krawetz wrote:
> I think I'm really close to getting Win10 running with USB support under
> Qubes R4, but I need some help.
>
> According to the official docs, Win10 HVM with QWT should have full USB
> support:
> https://github.com/Qubes-Community/Contents/blob/master/docs/os/windows/windows-tools.md
> But as anyone who has ever tried to install it knows, the installation has
> problems.
>
> As far as I can tell, the main problems are in the installation code for
> QWT on the Windows side.
>
> Here's what I have working so far:
> 1. Install Win10 as an HVM. (Baseline.)
>
> 2. Install 7-zip, since it will be needed to unpack tar files.
>
> 3. Go to
> https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1/. This is
> needed to install QWT. (QWT requires .NET version 3.5, but doesn't wait for
> it to install. To make it work correctly, install .NET version 3.5 first!)
>
> 4. Go to https://xenbits.xenproject.org/pvdrivers/win/ and download the
> 9.0.0 tar files for xenbus, xenvkb, and xeniface.
> Unpack the tar files.
> Install xenbus/x64/ and xenvkb/x64/ but do NOT reboot.
> No NOT install xeniface -- you'll need that later to fix a missing dll.
> After it is installed, reboot.

Does installing xeniface here cause any issues?

> 5. Go to https://ftp.qubes-os.org/qubes-windows-tools/ and download
> qubes-tools-4.0.1.3.exe
> Run it.
> De-select pvdrivers and migrate user account.
> Install.
> When it's done, reboot.
>
> 6. The QWT exe failed to install everything it needs. As far as I can tell,
> the CAB file buried inside the EXE didn't install and the installer just
> ignored the error. As a result, the Qubes services did not start. (Go to
> the Start menu, type Services, and open the Services app. Jump down the
> Qubes in the services list and you'll see that they didn't start.)
> I suspect that the installer worked under Win7 but does not work under
> Win10.
> The problem for the missing services comes from two missing dll files:
> xencontrol.dll and libxenvchan.dll.

Those two are installed as part of "pvdrivers" option, that you
deselected in the step 5... But then, I think QWT ships older version of
pvdrivers, so selecting that is also not ideal.

> xencontrol.dll is in the xeniface.tar file (this is why I had you
> downloaded the tar). Copy the dll to "C:\Program Tools\Invisible Things
> Lab\Qubes Tools\bin\" and paste it right next to qubesdb-daemon.exe
>
> libxenvchan.dll is buried inside the exe. This takes a linux system to
> extract:
> cabextract qubes-tools-4.0.1.3.exe # lots of files, you want "a1". a1 is
> an exe that won't run under Win10
> 7z x a1 content.cab # extract the cab file from a1
> cabextract -Flibxen\* content.cab # this extracts libxenvchan.UUID
> mv libxenvchan.* libxenvchan.dll
> Transfer this dll to some web site and then download it into the Windows VM.
> Copy the dll to "C:\Program Tools\Invisible Things Lab\Qubes Tools\bin\"
> and paste it right next to qubesdb-daemon.exe
>
> 7. Reboot the Windows VM. Now the services are running!
> Confirm this: Go to the Start menu, type Services, and open the Services
> app. Jump down the Qubes in the services list and you'll see that they
> started.
>
> At this point, things that work:
> + USB block devices, such as a thumb drive, can be attached to the WinVM.
>
> Things that do not work:
> - USB character devices, like a webcam, yubikey, or smartcard reader,
> fail. The error: "qrexec not connected"

That is expected, I think. Full support for USB devices is in progress:
https://github.com/QubesOS/qubes-issues/issues/5802

> I suspect the problem is that more files in the cab need to be installed
> but are missing. Does anyone know what files are needed, where they go, and
> what (if any) registry changes are needed?
>
> Does anyone recognize the problem or have an idea about how to fix it?

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmCsPVkACgkQ24/THMrX
1yw/Iwf/c3KmhG/ezdR2xxcmHq4k3pDws8DqHjCn4rGTEIZlhaV3LWjluHBVB5rb
Qjp2Cm5nzbPGo4aDLdoh2fYPxd51aRyF0c0mZiRSldzO00qcOIJXMlrQriaciCIx
POP1CuTHbPJ3ZFWDhFQShKK5Y9RUom432VcRFUqIY5Wfc127c3gss8Nfod2jArqI
HiG19yMQq5cv5ytw+0FsWofC4hyARYrjZ/4PJD2zqdlJYvv6Fwembk6Ss/0a+8xU
mHQ8dBw6jAsjCCpYR2zl88Ly6ITXuKHGjtWaQ/mFBJZa9ZGdr6LhOM5Cg9E11t6P
RDFMkSdlhk6x5Xs1u52AupBJi6lLUQ==
=cDGZ
-----END PGP SIGNATURE-----

Neal Krawetz

unread,
May 24, 2021, 10:48:01 PM5/24/21
to qubes-devel
Hi Marek,

The link you provided includes a comment from user "easydozen" who claims to have a fork for working Win10 USB drivers.

I don't have a Windows build environment. Does anyone have pre-compiled binaries?

     -Neal

Reply all
Reply to author
Forward
0 new messages