Xen Issue After Stubdom Update

The system was functioning correctly, including an operational sys-audio qube set up by following This Audio Qube Guide. However, after attempting to configure a non-Linux HVM as per instructions in the “Special cases of non-linux HVM” section of the guide the sys-usb, sys-net, sys-firewall, and sys-whonix qubes fail to boot with a ‘libxenlight’ error. This behavior happens even after I have detached all USB and PCI devices from all VMs

At the end of the HVM section it says “Redo the same things but for the file “stubdom-linux-full-rootfs”. So I deleted the stubroots (which was in my users home directory) folder and did a Find and replace in the bash scripts for linux-rootfs and changed to linux-full-rootfs and re-ran. I’m not sure if that is correct.

Here is the latest entries in the /var/log/libvirt/libxl/libxl-driver.log (please excuse the screenshot… computer isn’t working due to this error)

I don’t know if it’s helpful or even if I entered the command in the right place, but someone in a similar thread recommended running the command

systemctl status xendriverdomain

When I do that in dom0 I get the message

Unit xendriverdomain.service could not be found.

I’m curious about what scripts you are running, since I didn’t see a mention of scripts in the original post that you linked to.

Manual editting of stubdom rootfs is error-prone and can easily result in some glitches. Since the system is offline now, if you have a backup of the original 2 rootfs files, you can salvage the system by copying back. Unfortunately I cannot come up with a solution if it’s the other way.

I didn’t know if this was related to the guide so I didnt put this as a reply but I probably should have. It sounds like I messed up my stubdom folders (I don’t really know what those are). I Did take a backup of dom0 via the backup tool but I am guessing it only does the HOME folder of dom0?

In order to prevent from messing things up I copied the various scripts in bash scripts So

My Stubdom-linux-rootfs Procedure

I ran the following in my users dom0 HOME folder which has my Downloads, Documents folders etc.

Bash Script 1
#!/bin/bash
mkdir stubroot
cp /usr/libexec/xen/boot/qemu-stubdom-linux-rootfs stubroot/qemu-stubdom-linux-rootfs.gz
cd stubroot
gunzip qemu-stubdom-linux-rootfs.gz
cpio -i -d -H newc --no-absolute-filenames < qemu-stubdom-linux-rootfs
rm qemu-stubdom-linux-rootfs
nano init

Which makes a stubroot folder

Edit the Stubdom-linux-rootfs

After the line starting by “audio_model=”, add:

# Extract network parameters and remove them from dm_args
audio_args=$(echo "$dm_args" | sed -n '/^-qubes-audio:/p')
dm_args=$(echo "$dm_args" | sed '/^-qubes-audio:/d')

get_audio_arg() {
    echo "$audio_args" | sed -n 's/^.*[:,]'$1'=\([^,]\+\).*$/\1/p'
}

And in the rest of the file, replace

module-vchan-sink domid=0

by

module-vchan-sink domid=$(get_audio_arg 'audiovm_xid')

Save and close the file. Then run:

Bash Script 2
#!/bin/bash
find . -print0 | cpio --null -ov \
--format=newc | gzip -9 > ../qemu-stubdom-linux-rootfs
sudo mv ../qemu-stubdom-linux-rootfs /usr/libexec/xen/boot/

Then it said

Redo the same things but for the file “stubdom-linux-full-rootfs”

So I deleted the stubroot folder out of my home directory and then I took the exact same Bash scripts and changed them to add the word FULL in like so:

My Stubdom-linux-full-rootfs Procedure

Bash Script 1 FULL
#!/bin/bash
mkdir stubroot
cp /usr/libexec/xen/boot/qemu-stubdom-linux-full-rootfs stubroot/qemu-stubdom-linux-full-rootfs.gz
cd stubroot
gunzip qemu-stubdom-linux-full-rootfs.gz
cpio -i -d -H newc --no-absolute-filenames < qemu-stubdom-linux-full-rootfs
rm qemu-stubdom-linux-full-rootfs
nano init
Edit the Stubdom-linux-full-rootfs

After the line starting by “audio_model=”, add:

# Extract network parameters and remove them from dm_args
audio_args=$(echo "$dm_args" | sed -n '/^-qubes-audio:/p')
dm_args=$(echo "$dm_args" | sed '/^-qubes-audio:/d')

get_audio_arg() {
    echo "$audio_args" | sed -n 's/^.*[:,]'$1'=\([^,]\+\).*$/\1/p'
}

And in the rest of the file, replace

module-vchan-sink domid=0

by

module-vchan-sink domid=$(get_audio_arg 'audiovm_xid')

Save and close the file. Then run:

Bash Script 2 FULL
#!/bin/bash
find . -print0 | cpio --null -ov \
--format=newc | gzip -9 > ../qemu-stubdom-linux-full-rootfs
sudo mv ../qemu-stubdom-linux-full-rootfs /usr/libexec/xen/boot/

Ok well it seems like I hosed stubdom and don’t have a backup I’m going to format and install fresh but if anyone can tell me what I did wrong in the process I would appreciate it so I don’t do it again.

Did you change xen template as well?
Maybe something was changed in new stubdoms and the instructions must to be corrected as well.
You can check the sys-net/sys-usb stubdom logs in dom0 to search for the possible errors:

/var/log/xen/console/guest-sys-net-dm.log
/var/log/xen/console/guest-sys-usb-dm.log

Yes I did change.that as well. I have formatted it and done a clean install.

Did you reboot your computer. I’ve had that error several times with Xen updates. Shut down all VMs, and reboot your computer.

That fixed it for me.

Yes many many times. I tried different grub configurations PCI and USB device attachments, etc.

I formatted the computer and reinstalled Qubes OS which fixed it for now. I will try to figure out what I did wrong in the HVM section.