On Wednesday, March 23rd, 2022 at 12:51 AM, Dan <anonymous....@pm.me> wrote:

> I implemented my idea, but I also stopped using the USB keyboard and mouse.
>
> Now I have sys-usb with the USB controller PCI device attached and sys-net 
> with the USB-Ethernet device attached from sys-usb. The only glitch is that 
> on boot up, sys-net will not start at all if the USB-Ethernet device is not 
> available, but sys-usb starts after sys-net when they are both set to 
> autostart. I think the autostart ordering for VMs is essentially arbitrary 
> (possibly alphabetical).
>
> How can I specify an ordering for VM startup or a dependency on a USB device?

I'll document how I solved this. First, I tried creating:
/etc/systemd/system/qubes-vm@sys-net.service.d/60_afterusb.conf
with content:
[Unit]
Requires=qubes-vm@sys-usb.service
After=qubes-vm@sys-usb.service

For reasons I didn't investigate, this wasn't sufficient. sys-net still failed 
to autostart. Then I added:
/etc/systemd/system/qubes-vm@sys-usb.service.d/60_beforenet.conf
with content:
[Unit]
Before=qubes-vm@sys-net.service

This caused sys-net to autostart, but sys-firewall still failed to autostart. 
Then I added:
/etc/systemd/system/qubes-vm@sys-firewall.service.d/50_autostart.conf
with content:
[Unit]
Before=systemd-user-sessions.service
After=qubes-vm@sys-net.service

and then I finally had a system that would boot up to a running sys-usb, 
sys-net, and sys-firewall.

As a reminder, all the systemd configuration came after doing:
qvm-usb attach --persistent sys-net sys-usb:<ethernet-device>

Bare minimum requirements to get a
1. working system
2. with a USB Ethernet device
3. with separate sys-net and sys-usb

If there is any value in having separate sys-net and sys-usb with USB Ethernet 
devices, I recommend fixing this in future releases/installers, as USB Ethernet 
is probably the second most common way to connect to the internet from laptops, 
after WiFi. Laptops don't come with PCI based Ethernet devices anymore.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/FPlm-oKmNq9OH6btLvWXS0fXK2HvW9s5TGPajrgAZxRJkY5TsLVbfYobKbI4GlWmjvBhD1lt4jC2EnrI1K1ErNvNO8Gc6ZW0p0nBH1oZDxs%3D%40pm.me.

Reply via email to