Windows support in Qubes

I built qubes-windows-tools in a standalone fedora 34 qube with the instruction at the repository.

The sha256sum is:

6cf317f99bd97c7af0e5a21b3f7a5f1fcf3779939211e711457486eabebe8139  qubes-windows-tools-4.1-65.noarch.rpm

Did anyone get the same sha256 sum?

Iā€™m afraid this is not reproducible build

Can I use the qubes-windows-tools package from Qubes OS 4.0 in the dom0 of Qubes OS 4.1?

Erh. The last build was at 18-Jul-2018 15:18 for fedora 25:
https://ftp.qubes-os.org/repo/yum/r4.0/current/dom0/fc25/rpm/

After building the rpm and iso, I install the rpm to dom0. I also start the Windows 10 HVM (restored from the backup) with the iso and install the new Qubes windows tools.

But copy and paste doesnā€™t work.

I use the iso file at chroot-dom0-fc32/mock/fedora-32-x86_64/root/builddir/build/BUILD/qubes-windows-tools-4.1/qubes-windows-tools-4.1.65.iso in the qube for building QWT.

The command does not work because QWT is not yet packaged and available
for 4.1
Youā€™ll need to comment out that line from the script.

The qubes-windows-tools package provides an iso image that can be
attached to the Windows qube at start up using qvm-start --install-windows-tools

The proposal here is to build an iso image yourself, and manually
transfer it in to dom0.
You can then use qvm-start --cdrom to start the Windows qube with the
iso attached.

Can you make a template this way? Also, it is Win7, so next step would require hacking ESU :-/ Also last time I checked qvm-create-windows-qube it required manual actions like ā€œpause installation, fix private volume issues and continueā€

Of course, no reason why you canā€™t have a Windows template.
If you donā€™t move the User directory from xvda, then your Windows
TemplateBasedVMs will be disposables. Neat.

I checked now this QWT version with the new Qubes R4.1 beta, and it behaves quite similar to the fully updated Qubes R4.1 alpha - not really surprising!

QWT works for both W7 and W10, and I can copy files to other VMs; so qrexec is working. Screen resolution is still restricted to the few values described above, and the start button of W7 is still missing if the VM is set to seamless mode.

For both W7 and W10, I could not start applications from the XFCE menu, and the trick with the re-creation and syncing of the appmenus did not work. Trying to start a command via qvm-run -p --service [windows-qube] qubes.StartApp+Accessories-Paint does not work either for W7 - this command just does not terminate, and it does not produce any output. For W10, the command starts the application.

For W10, qvm-features gui has to be set in order to make the window visible.

2 Likes

Iā€™'m afraid that is always was because of reasons I was told above. But window resizing with W7 should work with XFCE trick.

was qube menu completely removed after qvm-appmenus --remove?

If there is no qrexec connection problem this behavior looks like application was successfully started and working and command wait to it closing.

Soā€¦ to clarify for some of us who are illiterateā€¦(i.e. not software developers/coders/CS majors/etc)ā€¦

Are there Windows 10 install instructions somewhere that fix the usb and screen size problems we have had for years?

2 Likes

In my Windows HVM after installing QWT 4.1.65 and copying the 2 .dllā€™s to /bin, which were missing, I try to attach a USB device. I still get ā€œFailed to open data vchan connectionā€ in dom0 and this is a log file from the VM:

qrexec-agent-20210723-035105-3924.log

[20210723.035105.349-4020-E] XcOpen: XenIface handle: 00000000000001B0
[20210723.035125.162-4020-E] InterceptRPCRequest: CreateFile failed with error 2: The system cannot find the file specified.
[20210723.035125.162-4020-E] InterceptRPCRequest: Failed to open service 'qubes.USBAttach' configuration file (C:\Program Files\Invisible Things Lab\Qubes Tools\qubes-rpc\qubes.USBAttach)
[20210723.035125.162-4020-E] HandleExecCommon: InterceptRPCRequest failed

There is no C:\Program Files\Invisible Things Lab\Qubes Tools\qubes-rpc\qubes.USBAttach in my Qube.

Contents of /qubes-rpc:

----                 -------------         ------ ----
-a----        14.07.2021     00:26             19 qubes.ClipboardCopy
-a----        14.07.2021     00:26             20 qubes.ClipboardPaste
-a----        14.07.2021     00:26             18 qubes.Filecopy
-a----        14.07.2021     00:26            161 qubes.GetAppMenus
-a----        14.07.2021     00:26             19 qubes.GetImageRGBA
-a----        14.07.2021     00:26             19 qubes.OpenInVM
-a----        14.07.2021     00:26             13 qubes.OpenURL
-a----        14.07.2021     00:26            157 qubes.SetDateTime
-a----        14.07.2021     00:26             17 qubes.SetGuiMode
-a----        14.07.2021     00:26            164 qubes.StartApp
-a----        14.07.2021     00:26             28 qubes.VMShell
-a----        14.07.2021     00:26             19 qubes.WaitForSession

These seem to work. Clipboard copy/paste and GetAppMenus definitely work.
Inspecting the files, some of them are pretty short, e.g. qubes.FileCopy only contains file-receiver.exe.
I tried to create a qubes.USBAttach and inputting usb-attach.exe but no luck so far.

Ah, a missing file. Perhaps thatā€™s why I couldnā€™t get it to work.

Iā€™ve been having a great experience with Qubes 4.1[beta] with the Windows qrexec fix. No QWT or special windows configuration needed. See: Windows USB integration with R4.1

What files were missing and what for?..

As far as I can tell, the drivers seem to work. However, the install code does not. qubes-tools-4.0.1.3.exe fails to copy or install the DLL files under Windows 10. I manually copied xencontrol.dll and libxenvchan.dll to ā€œC:\Program Files\Invisible Things Lab\Qubes Tools\binā€ and then the Windows services for Qubes started up. Thatā€™s how I got thumb drives working.

The xencontrol.dll comes from Xen Tools 9.0.0 iface.

Getting libxenvchan.dll is a little more difficult:

In qubes-tools-4.0.1.3.exe, use cabextract to find the internal files. File ā€œa1ā€ is an executable.
Use 7z to extract the file named ā€œcontent.cabā€: 7z x a1 content.cab
Then use cabextract again to find the DLL file: cabextract -F libxenvchan* content.cab

libxenvchan.dll and xencontrol.dll are missing in QWT 4.1.65 too.
Check C:\Program Files\Invisible Things Lab\Qubes Tools\bin. I added them according to the instructions.

@hackerfactor I couldnā€™t get the stubdom-qrexec thingy to work for me consistently. I actually got it working the first time around, but now after a lot of fiddling I messed up that VM and I canā€™t explain why I cannot make it work again on subsequent VMā€™s.
I troubleshot a lot in the thread you linked, let me know if you can make sense of it.

The installer transfers these DLLs to the system folder (windows\System32). You donā€™t need to copy.

Sorry it took some time until I was able to test again ā€¦

The situation is now better for Windows 10, but unchanged for Windows 7:

  • For W10, display size can be changed via the Windows control center, selecting ā€œDisplayā€. While there are ony the few resolutions offered, other resolutions can be selected by choosing the Extended Display Options. The properties window for the montior and display adapter then shows an option List All Modes, and there you can select other resolutions, like, for instance, 1280 x 1024. The resolution is then set, and remains across reboots.

  • For W7, only the few resolutions are offered, even if all modes are selected in the Extended Display Options. Trying to select another resolution freezes the VM. If the VM is set to seamless mode via the Qubes Manager, it disappears completely. Disabling seamless mode after this crahes the Qube Manager, and the VM stays invisible (and probably still in seamless mode) and has to be rebooted. If I try to disable seamless mode from the XFCE menu, using the Qube Settings command I get the following error:
    Bildschirmfoto_2021-07-24_12-14-21

  • Starting applications from the XFCE menu now works for W10 and W7.

1 Like

If in Windows 7 the Qubes video drivers qvmini.sys and qvgdi.dll installed with QWT are replaced by the drivers of QWT 4.0.1.3, the VM does not freeze when trying to change the screen resolution, and the Qube manager does not crash when switching seamless mode on and off. Screen resolution, however, is still restricted to the few values and cannot be changed by selecting on of the smaller values. The start button is still not displayed in seamless mode.

So it seems that for W7, the older driver is still a little bit better, while for W10, the newer driver solves the problems for this version of Windows.

This sounds like a consequence of cross-compiling Windows drivers from Linux :frowning: @jevank have you noticed similar issue before?

Iā€™m afraid @GWeck is keep trying to change resolution via system adapter settings, which as I remember not implemented at all. Did you mean such tests or with window resizing? My advices to change it with window size by Alt+right clicking and dragging were unsuccessful.