Unsure about network device attachment to VMs

54 views
Skip to first unread message

Anil Eklavya

unread,
Sep 14, 2019, 12:08:34 PM9/14/19
to qubes...@googlegroups.com
I am reinstalling Qubes, but I am not sure how to which devices to attach to sys-usb and which to sys-net. Earlier the network devices were directly attached to sys-usb and sys-usb was providing the network. This is the setting my new install started with. I am trying to avoid getting network directly from sys-usb. There seems to be some trivial thing that I am missing.

For context, my laptop (Dell XPS 13 9370) has two thunderbolt USB-C ports and one normal USB-C port. It is the third port which is practically the only port I can use as things are setup, since it seems to be unadvisable to attach thunderbolt devices to Qubes. So I mostly use a USB-C hub, which has the ethernet port as well other ports.

The laptop is not in the HCL list, but it seems to work fine with some issues.

The documentation for Qubes is pretty good, but one problem is that it is better for those who either have no technical knowledge or have deep technical knowledge of how Linux and OS work, along with networking. I fall somewhere in the middle, so both kinds of advised are not very useful. I think, given that the online threats come from network, there should be a more detailed, technically middle-grounded documentation for setting up network on Qubes, including where should VPN go (various options and their pros and cons).

Can someone help with this problem, right now just for getting my Qubes installation started, keeping ethernet and other USB devices separate, and with VPN installed somewhere. Detailed documentation can come later.

Regards,

Anil

Anil Eklavya

unread,
Sep 14, 2019, 12:44:58 PM9/14/19
to qubes...@googlegroups.com

> Can someone help with this problem, right now just for getting my Qubes installation started, keeping ethernet and other USB devices separate, and with VPN installed somewhere. Detailed documentation can come later.

Right now, I have the wireless device connected to sys-net, but I am trying to get ethernet through sys-usb. On installation, the list of services in sys-usb included network-manager, which was causing ethernet based networking to be connected directly in sys-usb and that was being used in sys-net (as far as I can understand). Now I have removed network-manager service from sys-usb and put it in sys-net. I then manually attach the LAN device to sys-net. However, this doesn’t seem to allow me to connect to network through ethernet. Running lsusb doesn’t show the LAN device in sys-net even after attaching. I am missing something basic here, it seems. When I try to create an ethernet connection in sys-net, there is no ethernet device to be connected to.

Regards,

Anil

Anil Eklavya

unread,
Sep 14, 2019, 1:51:59 PM9/14/19
to qubes...@googlegroups.com
The ethernet link is down in sys-net. I tried using ip and ifconfig and ifup commands to bring it up, but it is still down. On finally giving for now and pulling out the ethernet adapter, the system froze completely again, like it was doing before I reinstalled.

Regards,

Anil

Anil Eklavya

unread,
Sep 15, 2019, 6:07:05 AM9/15/19
to qubes...@googlegroups.com

> On 14-Sep-2019, at 11:21 PM, Anil Eklavya <anile...@gmail.com> wrote:
>
> The ethernet link is down in sys-net. I tried using ip and ifconfig and ifup commands to bring it up, but it is still down. On finally giving for now and pulling out the ethernet adapter, the system froze completely again, like it was doing before I reinstalled.

Following the documentation USB and PCI devices, I tried the following:

- lsusb in sys-usb to list USB devices

The ethernet device is listed as Bus 003 Device 002, but there is another device as Bus 003 Device 001 (Linux Foundation root hub)

- I then used the readlink for usb3

This gave the BDF as 00:06.0

- From dom0 terminal, I then tried:

qvm-pci attach sys-net sys-usb:00:06.0 —persistent

I get an error message saying sys-usb doesn’t expose the device 00:06.0

Anil Eklavya

unread,
Sep 15, 2019, 6:42:40 AM9/15/19
to qubes...@googlegroups.com

> On 15-Sep-2019, at 3:36 PM, Anil Eklavya <anile...@gmail.com> wrote:

> Following the documentation USB and PCI devices, I tried the following:
>
> - lsusb in sys-usb to list USB devices
>
> The ethernet device is listed as Bus 003 Device 002, but there is another device as Bus 003 Device 001 (Linux Foundation root hub)
>
> - I then used the readlink for usb3
>
> This gave the BDF as 00:06.0
>
> - From dom0 terminal, I then tried:
>
> qvm-pci attach sys-net sys-usb:00:06.0 —persistent
>
> I get an error message saying sys-usb doesn’t expose the device 00:06.0

I have already tried attaching with qvm-usb as the Realtek adapter is listed by this command. It apparently gets attached with sys-net, but lsusb in sys-net doesn’t show it. Ifconfig also doesn’t list it.

Anil Eklavya

unread,
Sep 15, 2019, 7:01:39 AM9/15/19
to qubes...@googlegroups.com
> I have already tried attaching with qvm-usb as the Realtek adapter is listed by this command. It apparently gets attached with sys-net, but lsusb in sys-net doesn’t show it. Ifconfig also doesn’t list it.

The system froze again after I attached the ethernet usb device through qvm-usb, even though network did not connect and the adapter was not listed in sys-net by lsusb.

On rebooting, it froze twice while typing the disk passphrase. Third time it froze while typing the user passphrase. Each time the freezing occurs with a flash of the screen, the kind that occurs when we take a screenshot.

Also, I don’t know whether it is relevant here, but I get the error “Failed to start load kernel modules” while booting up, just am mentioned on a Qubes github forum.

Regards,

Anil

awokd

unread,
Sep 15, 2019, 7:03:24 AM9/15/19
to qubes...@googlegroups.com
Anil Eklavya:
>
>> Can someone help with this problem, right now just for getting my Qubes installation started, keeping ethernet and other USB devices separate, and with VPN installed somewhere. Detailed documentation can come later.
>
> Right now, I have the wireless device connected to sys-net, but I am trying to get ethernet through sys-usb. On installation, the list of services in sys-usb included network-manager, which was causing ethernet based networking to be connected directly in sys-usb and that was being used in sys-net (as far as I can understand). Now I have removed network-manager service from sys-usb and put it in sys-net. I then manually attach the LAN device to sys-net. However, this doesn’t seem to allow me to connect to network through ethernet. Running lsusb doesn’t show the LAN device in sys-net even after attaching. I am missing something basic here, it seems. When I try to create an ethernet connection in sys-net, there is no ethernet device to be connected to.
>

Can you diagram what you are trying to do? E.g. I think it's:

Ethernet---Realtek---USB3 hub---sys-usb---sys-net(for networking) ?


--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

Anil Eklavya

unread,
Sep 15, 2019, 7:09:32 AM9/15/19
to qubes...@googlegroups.com
On 15-Sep-2019, at 4:31 PM, Anil Eklavya <anile...@gmail.com> wrote:

> The system froze again after I attached the ethernet usb device through qvm-usb, even though network did not connect and the adapter was not listed in sys-net by lsusb.
>
> On rebooting, it froze twice while typing the disk passphrase. Third time it froze while typing the user passphrase. Each time the freezing occurs with a flash of the screen, the kind that occurs when we take a screenshot.
>
> Also, I don’t know whether it is relevant here, but I get the error “Failed to start load kernel modules” while booting up, just am mentioned on a Qubes github forum.

I should have mentioned that this time I have installed with UEFI, not with legacy mode.

Also, on this installation, I get a command line prompt for typing the disk passphrase and not the GUI textbox. Before that, there is a lot of what seems to be Xen related output (things that happen while booting up). These were not visible earlier when things were working fine. Even the last time, the system started freezing after this change occurred: the visible Xen output. I don’t know whether it is relevant, but ever since it started happening, the arbitrary freezing also started occurring.

I should emphasize that freezing is total. It doesn’t go away after any length of time. I simply have to physically restart the laptop.

Anil Eklavya

unread,
Sep 15, 2019, 8:22:45 AM9/15/19
to awokd, Qubes Users Google Group
> On 15-Sep-2019, at 5:32 PM, awokd <aw...@danwin1210.me> wrote:
>
> Anil Eklavya:
>>> Can you diagram what you are trying to do? E.g. I think it's:
>>>
>>> Ethernet---Realtek---USB3 hub---sys-usb---sys-net(for networking) ?
> I am simply trying to connect the ethernet adapter to sys-net, instead of having network directly in sys-usb (which seems to be against the design of Qubes, I think). I tried with qvm-sub, but it didn’t work, so I tried with qvm-pci, but that also doesn’t work (it is not even supposed to, I think, if the adapter is listed as a USB device).
>
> So, yes, the above diagram is basically correct, except that it is USB 3.1 (type C) hub. The laptop has no ethernet port.
>
> About freezing, it also coincided with upgrading to a larger nvme drive from a different company. That is why I had asked earlier if the drive can cause the freezing, or perhaps the firmware in the drive is not reliable. Should I go back to previous drive and see it freezing still happens. I don’t know exactly what is happening, but given the fact that I have been using computers of various kinds with different OS’s since 1994 as a power user (at least), my instinctive response is that it is something malicious. At what level it is occurring, that I don’t know.
>
> This is a costly laptop (with costly upgrades) and I can’t afford to buy another laptop right now and to dispose of this one. I would like to try to make it work if it can be made to work with Qubes.
>
> It was working (without freezing) earlier, but with legacy boot and with a different drive, but I am not sure if it was compromised even then. More importantly, it was working with sys-usb and sys-net combined.
>
> As an aside, the pen drive (HP class 10) I had use earlier after upgrading to this larger nvme to update the BIOS, got bricked apparently for no reason, without being attached to anything else. I noticed that only when I tried to use it again for updating the BIOS again.


>> I am simply trying to connect the ethernet adapter to sys-net, instead of having network directly in sys-usb (which seems to be against the design of Qubes, I think). I tried with qvm-sub, but it didn’t work, so I tried with qvm-pci, but that also doesn’t work (it is not even supposed to, I think, if the adapter is listed as a USB device).
>>
>> So, yes, the above diagram is basically correct, except that it is USB 3.1 (type C) hub. The laptop has no ethernet port.
>
> The freezing might have been caused by the PCI device changes you made.
> Try to undo them, so your USB controllers (only) are in sys-usb, and
> wifi controller (only) is in sys-net.
>
> Then, verify the Realtek is listed in dom0 under qvm-usb. You _may_ then
> be able to map it to sys-net with qvm-usb a sys-net [Realtek].
>

I will try that out.

>> About freezing, it also coincided with upgrading to a larger nvme drive from a different company. That is why I had asked earlier if the drive can cause the freezing, or perhaps the firmware in the drive is not reliable. Should I go back to previous drive and see it freezing still happens. I don’t know exactly what is happening, but given the fact that I have been using computers of various kinds with different OS’s since 1994 as a power user (at least), my instinctive response is that it is something malicious. At what level it is occurring, that I don’t know.
>
> You shouldn't have to go back to the previous drive.
>
> PS Did you mean to drop the list from your reply?

No, I just replied in the mail client and forgot to include to list mail id. I have added the missing part in the quote above for reference.

Anil Eklavya

unread,
Sep 15, 2019, 8:30:28 AM9/15/19
to awokd, Qubes Users Google Group
>>
>> The freezing might have been caused by the PCI device changes you made.
>> Try to undo them, so your USB controllers (only) are in sys-usb, and
>> wifi controller (only) is in sys-net.
>>
>> Then, verify the Realtek is listed in dom0 under qvm-usb. You _may_ then
>> be able to map it to sys-net with qvm-usb a sys-net [Realtek].
>>
>
> I will try that out.

But how will I undo the changes when the changes (actually only one attempt) did not succeed?

awokd

unread,
Sep 15, 2019, 8:51:55 AM9/15/19
to qubes...@googlegroups.com
Anil Eklavya:
In dom0, do qvm-pci. Check the USED BY column to make sure the
appropriate devices are in the appropriate qubes.

Next, ISTR others saying USB-C devices are twitchy in Qubes. Try
powering everything off, then attaching the Realtek to the hub, hub to
laptop, and only then powering on the laptop.

Anil Eklavya

unread,
Sep 15, 2019, 9:44:07 AM9/15/19
to awokd, Qubes Users Google Group

> In dom0, do qvm-pci. Check the USED BY column to make sure the
> appropriate devices are in the appropriate qubes.
>
I tried that. There is no PCI device used by a VM, except wireless adapter (sys-net) and USB controller (sys-usb).

> Next, ISTR others saying USB-C devices are twitchy in Qubes. Try
> powering everything off, then attaching the Realtek to the hub, hub to
> laptop, and only then powering on the laptop.

I did that. The device apparently gets attached to sys-net, but it is still not listed by lsusb in sys-net and network still doesn’t connect by ethernet.

There may be a problem with USB-C devices in Qubes. (I don’t really know what you mean exactly by doing ISTR to other: ISTR seems to stand for It Stands To Reason. Do I have to send a separate mail at some other forum?).

I haven’t tried Qubes so far on any other laptop without using USB-C ports.

Is it normal to sometimes get GUI textbox for device passphrase and sometimes command line prompt?

awokd

unread,
Sep 15, 2019, 10:15:16 AM9/15/19
to qubes...@googlegroups.com
Anil Eklavya:

>> Next, ISTR others saying USB-C devices are twitchy in Qubes. Try
>> powering everything off, then attaching the Realtek to the hub, hub to
>> laptop, and only then powering on the laptop.
>
> I did that. The device apparently gets attached to sys-net, but it is still not listed by lsusb in sys-net and network still doesn’t connect by ethernet.

Run qvm-pci again with Realtek attached. Copy & paste the corresponding
line of output here, if you don't mind. Use the Qubes Clipboard widget
(top right) to perform equivalent of ctrl-shift-c from dom0.

>
> There may be a problem with USB-C devices in Qubes. (I don’t really know what you mean exactly by doing ISTR to other: ISTR seems to stand for It Stands To Reason. Do I have to send a separate mail at some other forum?).

Apologies, it's shorthand for I Seem To Recall (people saying USB-C
devices were twitchy).

> I haven’t tried Qubes so far on any other laptop without using USB-C ports.
>
> Is it normal to sometimes get GUI textbox for device passphrase and sometimes command line prompt?
>
I have one machine that is always GUI and another on same version of
Qubes almost always text. The last one randomly displayed the GUI for a
couple boots last week. Think there's some bug somewhere, but wasn't
worried about it.

awokd

unread,
Sep 16, 2019, 6:05:08 AM9/16/19
to qubes...@googlegroups.com
'awokd' via qubes-users:

> Run qvm-pci again with Realtek attached. Copy & paste the corresponding
> line of output here, if you don't mind. Use the Qubes Clipboard widget
> (top right) to perform equivalent of ctrl-shift-c from dom0.

Your system intermittently freezing sounds like it could be
https://github.com/QubesOS/qubes-issues/issues/5272 too.

Anil Eklavya

unread,
Sep 16, 2019, 11:31:29 AM9/16/19
to awokd, Qubes Users Google Group
> Your system intermittently freezing sounds like it could be
> https://github.com/QubesOS/qubes-issues/issues/5272 too.

It does seem like it, but one difference is that this time I haven’t even updated dom0 yet. I have not connected to internet at all, as I was first trying to connect through ethernet.

Anil Eklavya

unread,
Sep 19, 2019, 2:58:25 PM9/19/19
to awokd, Qubes Users Google Group
>> Your system intermittently freezing sounds like it could be
>> https://github.com/QubesOS/qubes-issues/issues/5272 too.
>
> It does seem like it, but one difference is that this time I haven’t even updated dom0 yet. I have not connected to internet at all, as I was first trying to connect through ethernet.

Since at that time USB-C seemed to be the problem, I decided it was not possible to use Qubes with Dell XPS 9370. So I reintalled Windows 10. Before that I updated the latest BIOS driver from pen drive. Everything went well till the installation was finished and Windows activated and some other applications installed. I was trying to update drivers and Windows, when the system started freezing in the same way: after a flicker. At one point I must have rebooted at least 20 times within 1 hour or so.

I finally decided to call Dell Customer Service, as the laptop is still under warranty. After several attempts (as the calls also sort of froze in the middle of my telling what was wrong), I was able to get through to someone at Dell India. There was a long session that involved running diagnostics at bootup, then checking that the graphics driver was installed or not. The graphics driver had to be downloaded and installed. Strangely, the system didn’t freeze once during the more than one hour session with the Dell representative. Since it seemed to be working well, I thought the problem was related to graphics driver. Several online forums also mentioned Dell XPS 9370 freezes due to graphics card driver problem, but in my case freeze often happens even during the bootup, before the OS starts. Still, I updated the drivers suggested by Dell Update tool and also updated Windows. All seem to be going well when the freezing started again.

This time it was even worse. It once froze during typing the boot password, which I have had setup for several months now. There were many freezes and restarts, but one was particularly strange. The system restarted automatically in the middle of my typing the boot password (I had typed only part of the password) and then it rebooted without asking me for boot password. On this occasion, every key press was accompanied by a flicker. I was able to reboot again several times (the boot password is not deleted, as the system is asking for it, but it flickers at every key press while typing the boot password).

I did Dell bootup diagnostics again and it said everything was fine. Still, the system is freezing so frequently now that it is again practically unusable.

So, I am not sure whether it is a problem related to Qubes, or the graphics card or with BIOS. My hunch is still that it is with BIOS, unless the hardware itself is compromised.

Anil Eklavya

unread,
Sep 19, 2019, 3:00:07 PM9/19/19
to awokd, Qubes Users Google Group
> So, I am not sure whether it is a problem related to Qubes, or the graphics card or with BIOS. My hunch is still that it is with BIOS, unless the hardware itself is compromised.

At this point (that is since I reinstalled Windows 10), I have don’t have any Qubes on my system, but the laptop is still freezing.

Anil Eklavya

unread,
Sep 21, 2019, 10:08:00 AM9/21/19
to awokd, Qubes Users Google Group

> Dropping Qubes mailing list since it's not a Qubes issue any more.
> Recommend calling Dell again and telling them the above paragraph.
> Sounds like a hardware problem with the laptop to me. Get them to
> replace it.

I understand it no longer seems to be directly a Qubes issue, but I am updating because it may indirectly be of interest to Qubes users and developers.

I will be contacting Dell on Monday. They are unlikely to replace it, but if they think it’s a hardware issue, they may repair it.

Right after my last post, during the last attempt, there was a notification from Quick Heal about a suspicious file.

I tried today when I booted up the laptop again, it worked without any problem for several hours. I updated all the drivers and checked that the Windows updates were up to date. Everything went well. Finally when I started to proceed with changing login options, it froze again. And then it started freezing repeatedly.

The part which may be relevant to the Qubes community is about the fact that today it started freezing when I restarted the NordVPN app, which I had to disable earlier, because the network just won’t work properly.

Earlier also I think the problems started after I logged in to NordVPN. But again, it may be a problem specific to NordVPN. About two years ago, I had subscribed to IPVanish and I had to give up using it with a few weeks as it just won’t get connected to the Internet. Years earlier, when the Tor Project was relatively new and I tried to use it, it also just won’t connect to the Internet. However, later on it started working. Still, my problems on laptops might have something to do with the use of Tor or VPNs. In the university where I work, the users who use a VPN have their internet access disabled.

Since Qubes and Tor are about privacy and that is what I have been arguing for for years openly, even in official settings, I think the problems might have something to do with trying to maintain privacy online. Besides laptop, there are other reasons why I think this may be one of the causes.

I mention it here so that Qubes users and developers may be aware of this possibility, in case they are not (I think many already are).
Reply all
Reply to author
Forward
0 new messages