Libxenlight failed to start domain

Documenting a persistent and time consuming problem I had with Qubes 4.0.1-rc1 on my 15v4. After installing, updating, and restarting, I get this error message:
libxenlight failed to create new domain ‘sys-net’

If you get this message, turn off autostart for all VMs attached to PCI devices. This includes any VMs that will autostart networking VMs (like sys-whonix). My guess is that PCI devices are still being initialized during boot, when Qubes attempts to start the VMs to connect to them. Not sure if this is on Purism or Qubes end.

I wrote a little script to turn on my networking VMs at startup, and found I needed a minimum 5 second delay to prevent this error.

1 Like

This was super helpful for me. I had the same problem on my Librem 13v4 with Qubes-R4.0.3-x86_64 and couldn’t for the life of me figure out what was going on. systemctl status qubes-vm@sys-net.service and journalctl -xe were showing failures to start, all referencing Libxenlight failed to start domain.

Any chance you can share the script you ended up using?

sleep 5
qvm-start sys-firewall
qvm-start sys-usb

You can replace sys-firewall with any VM in the networked VM chain, like maybe sys-whonix. Go into “Session and Startup” , and you can add startup scripts there. Either create a new file with something like the script above (and then reference the script), or you can also just drop a 1-liner into the Session and Startup command
sleep 5; qvm-start sys-whonix; qvm-start sys-usb