Open marmarek opened 1 year ago
I did some tests with different configurations, showing vastly different results:
--install-windows-tools
option! And after booting, the QWT CDROM was accessible!??? Booting again with this option lead to an error about a dom0 loop device being double. Booting again with and without the option alternated between errors about missing or double loop device, so this VM was dead, too.All very confusing.
One more observation which may be connected with this situation:
qubes-windows-tools-4.1.68.1.iso
.qubes-windows-tools.iso
.Both are in /usr/bib/qubes
, but I am not sure wthether they were installed in the same way.
Under Qubes R4.1, the QWT CDROM is called
qubes-windows-tools-4.1.68.1.iso
.
There ought to be a symlink there with qubes-windows-tools.iso
name too (and that is what is used by qvm-start --install-windows-tools
).
I tried now with a new instance of Windows 11 21H2 under Qubes R4.2. Booting with the QWT installation option showed again the CDROM error, but the QWT media was accessible, and QWT could be installed. This installation worked, as long as the optional PV drivers were not installed. If they were installed, the VM crashed after the next boot with the message 'Critical process died', and the Qube was dead.
Now I upgraded an instance of my Windows 10 21H2 VM to 22H2 and repeated the tests. The results are somewhat different and a bit amazing:
qubes-windows-tools.iso
, the CDROM is not found in the Windows explorer; so the VM does not see it..msi
file containing the installer is brought otherwise to the VM, e.g. via a network connection, QWT can be installed. The outcome depends on selecting the optional PV drivers or not:
So the disappearance of the CDROM does indeed depend on the Windows version.
I was able to see the cause of the ominous message 'CDROM not found'. It has no significance here: The boot process just tries to boot from the CDROM, finds that it is not bootable, and switches to booting from the hard disk.
Found this issue doing a search, and noted that I am having issues with R4.1 as described installing Windows 10 22H2 as well.
Neither "qvm-start --install-windows-tools" nor the similar functionality in qvm-create-windows-qube provide an actual cdrom device, which causes the qvm-create-windows-qube script to leave Windows at the logged-in desktop while the script is still saying "Completing setup of Qubes Windows Tools...". It never installs QWT.
Attempting to do it manually after shutting down the Windows vm using either of these:
qvm-start --cdrom "windows-mgmt:/user/home/Documents/qvm-create-windows-qube/tools-media/auto-qwt.iso" Win10Qube qvm-start --install-windows-tools Win10Qube
will launch the vm, and it says it can't boot off the cdrom (ofc), but then tries the hdd and boots into Windows normally. However, there is no cdrom device.
"qvm-block list Win10Qube" shows the cdrom device still connected to the vm with the correct backend file, but Windows either doesn't or can't recognize it.
The one difference is that I used an answer file which formatted the D: drive and moved the User profile dir to D: (which is the vm-Win10Qube-private-snap volume). I don't know if the cdrom absolutely has to be assigned to the D: drive, but I don't know why it would. Something to check, maybe.
The prior test Windows 10 Qube I created worked perfectly with qvm-create-windows-qube, using the default win10x64 answer file, but that was a couple weeks ago or more.
Device manager does not show the cdrom device anywhere.
I found this, and I presume you all already know this, but just in case: https://github.com/Qubes-Community/Contents/blob/master/docs/os/windows/windows-vm41.md
"From the Windows command line, disable hibernation in order to avoid incomplete Windows shutdown, which could lead to corruption of the VM's disk.
powercfg -H off
Also, recent versions of Windows won’t show the CD-ROM drive after starting the qube with qvm-start vm --cdrom ... (or using the GUI). The solution is to disable hibernation in Windows with this command. (That command is included in QWT’s setup but it’s necessary to run it manually in order to be able to open QWT’s setup ISO/CD-ROM in Windows)."<<<
I ran that, and voila! cdrom now shows up and QWT installs from it no problem.
I hope it is something as simple for you all. :)
That's the solution: Whether Windows shows the CDROM drive is strictly dependent on the state of hibernation: If and only if hibernation is disabled, the CDROM is shown and usable. This is independent of the Windows version. Even for 22H2, the CDROM is shown whenever hibernation is disabled.
The state of hibernation may be checked via the command powercfg -a
, which must show something like hibernation not available
. Otherwise, the command powercfg -H off
has to be used in order to disable hibernation and make the CDROM available after the next boot.
The confusion may arise if the upgrade from Windows 21H2 to 22H2 re-enables hibernation without telling so. (I really love it that Windows updates and upgrades silently change the configuration! Grrr...)
How to file a helpful issue
Qubes OS release
R4.2
Brief summary
When using
qvm-start --install-windows-tools
, Windows doesn't detect the CDROM, making it impossible to install QWT this way. The same setup worked on R4.1 (same QWT version, same Windows version).Steps to reproduce
qvm-start --install-windows-tools
to install QWT (due to https://github.com/QubesOS/qubes-issues/issues/8048, requires copyingqubes-windows-tools.iso
from R4.1).Expected behavior
Windows starts and see the CDROM with QWT.
Actual behavior
No CDROM detected. There is some (I think) related message from seabios on boot, but I haven't managed to capture it yet. CDROM works fine for installing Windows VM.