Created a new Windows 7 SP1 HVM by using an .iso as I've done many times successfully in the past on Qubes 3.2. Everything works fine, HVM is created and runs correctly, internet connection is intact and functioning as expected.
Downloaded Qubes Windows Tools 4.0 and installed them into the HVM as per documentation. Installation of QWT 4.0 completely *breaks* HVM and places it into a totally irrecoverable state, as detailed here near the top:
https://github.com/QubesOS/qubes-issues/issues/3585
"at the following reboot, windows fails to boot and tries to repair files, which as usual doesn't fix anything (the VM might boot at some point, without the tools installed)"
Deleted the HVM, and started over from scratch by creating a new one. This time, I installed Qubes Windows Tools version 3.2.2.3 instead of 4.0. That worked perfectly fine, and the usual QWT-enhanced Windows HVM appeared with full screen resolution, mouse pointer integration etc. Except, the internet connection suddenly completely went offline and stopped functioning.
As per Issue 1 again from the same source, I tried the following instructions:
https://github.com/QubesOS/qubes-issues/issues/3585
--------
Issue 1 - Networking isn't set up properly
The PV adapter's status is stuck at "Identifying"; pinging an ip works but pinging a host fails, indicating a problem with DNS resolution. A tcpdump on sys-firewall indeed shows that DNS requests are sent to the gateway's ip and are rejected. The reason is that in R4 VMs are now using the exposed "/qubes-{primary,secondary}-dns" values, while R3.2's Windows Tools still use /qubes-gateway (whose IP in R4 is different from /qubes-primary-dns).
Workaround: disable the "Qubes Network Setup" service (with gui/msconfig, or sc config "QubesNetworkSetup" start= disabled in a command prompt) and configure the network manually.
Settings:
DNS{1,2}: 10.139.1.1, 10.139.1.2
Subnet: 255.255.255.0
IP: in dom0, qvm-prefs vmname ip will output the VM's ip. Caveat: a cloned/restored/... VM will likely have its IP changed so you'll have to remember to update your network settings.
----
Implementing this attempted fix did *NOT* solve the problem, and the lack of internet connectivity persists despite doing everything suggested. All other VMs on the system have their internet connections working perfectly fine.
What are the next suggested steps to try? Should that fix have worked regardless of using QWT 3.2.2.3 rather than 4.0, as long as the base system is Qubes 4 instead of 3.2? If not, what options should I be using for my specific situation? What do I do from here to get internet connectivity back?
I'll give this a try, thanks. So far in the Windows HVM I have not put any value under "gateway" because that is not mentioned in the instructions from Issue3585 above. Only IP address, Subnet mask, and DNS server fields are filled out. Default gateway is left empty.
What value, if anything, should go under Gateway in the VM? The ip address shown by Qubes as belonging to the network-providing VM itself, ie Sys-Net or Sys-Firewall, namely 10.137.0.6 ? Or something else?
Also, I am presuming the values listed for DNS servers are universal constants at the moment in Qubes 4, meaning 10.139.1.1 and 10.139.1.2 are absolute values for all installations and not dynamically dependent on specific configuration?
I've also added a note about QWT 4 breaking *new* HVMs (I thought thebreakage was only when updating from QWT3 to QWT4). It seems it's ahit-or-miss process, IIRC some users managed to have QWT4 running.
What value, if anything, should go under Gateway in the VM? The ip address shown by Qubes as belonging to the network-providing VM itself, ie Sys-Net or Sys-Firewall, namely 10.137.0.6 ? Or something else?The ip output by `qvm-prefs vmname visible_gateway` ; if you don't havea fancy vpn/firewall setup, it's likely 10.137.0.6.
Thanks - I added the sys-firewall gateway value and that seemed to do the trick in restoring connectivity (which is of course, entirely obvious in hindsight). A couple of oddities I noticed though:
With everything manually configured and working, I can successfully ping the VM's own ip address and the gateway from within the VM, however I can *NOT* ping the DNS servers at all.
Attempting to ping 10.139.1.1 or 10.139.1.2 results in:
Response from 10.128.100.62: Destination net unreachable
I have no idea what that IP address above is. Obviously DNS resolution is working since I can lookup websites correctly as expected, but the ping attempt either fails with that reply or times out completely, every single time.
Also, if I delete the DNS entries from adapter IPv4 config completely and then do "ipconfig /all" from command line, they seem to get magically filled in by themselves, with one slight change:
10.138.1.1 <-- (note the 138 instead of 139)
10.139.1.2
..And everything continues to work fine in terms of connectivity. The Qubes Network Setup service is definitely disabled and stopped, so I am not quite sure how that auto-fill is occurring.
I can also use other externally operated DNS like:
8.8.8.8
4.4.4.4
1.1.1.1
And it gets saved correctly in ipconfig and also produces full connectivity. I am going to try garbage values and see what happens, but it almost seems like the HVM is somehow routing its DNS queries automatically regardless of entered values, but maybe not.
> I've also added a note about QWT 4 breaking *new* HVMs (I thought the
> breakage was only when updating from QWT3 to QWT4). It seems it's a
> hit-or-miss process, IIRC some users managed to have QWT4 running.
Hit or miss, yes... possibly partially related to the state of updates in Windows 7 at the time QWT4 is installed. Those reporting success (in this thread and issue 3585) seem to have installed updates into Win7 first before installing the guest tools. In my case I tried installing QWT4 into a fresh Win7 SP1 with no updates applied yet, and it broke completely. So that might be the crux, though it's just a hypothesis.
At some point if I have the 2-3 days needed to fully update Windows 7, I may try removing QWT3 and installing QWT4 to see what happens. Of course I will try this in a clone, since I have no idea how easy or difficult it actually is to uninstall QWT3223 cleanly, and it's far more likely I'll break something in the attempt. Is it just a question of selecting "Remove" from the internal Win7 "Add/Remove Programs", and then installing QWT4 anew? Or is there a more elaborate procedure required?