Long VM boot and shutdown times

I have a VM that I run based on a cloned fedora-40-minimal template in PVH. I’m not sure what I did but it takes ~2 minutes to start with a normal shutdown time (a few seconds). The appVM takes about ~2 minutes to start and ~7 minutes to shutdown.

The startup delay seems to be related to these lines from journalctl -b (startup, cloned template):

Nov 21 11:48:57 fedora systemd[1]: Finished qubes-mount-dirs.service - Initialize and mount /rw and /home.
Nov 21 11:48:57 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-mount-dirs comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 21 11:48:57 fedora systemd[1]: qubes-relabel-rw.service - Relabel /rw and /home was skipped because of an unmet condition check (ConditionSecurity=selinux).
Nov 21 11:49:56 fedora (udev-worker)[423]: eth0: Spawned process '/usr/bin/systemctl restart --job-mode=replace qubes-network-uplink@eth0.service' [491] is taking longer than 59s to complete
Nov 21 11:49:56 fedora systemd-udevd[351]: eth0: Worker [423] processing SEQNUM=1757 is taking a long time
Nov 21 11:50:56 fedora udevadm[479]: Timed out for waiting the udev queue being empty.
Nov 21 11:50:56 fedora systemd[1]: qubes-rootfs-resize.service: Main process exited, code=exited, status=1/FAILURE
Nov 21 11:50:56 fedora systemd[1]: qubes-rootfs-resize.service: Failed with result 'exit-code'.
Nov 21 11:50:56 fedora systemd[1]: Failed to start qubes-rootfs-resize.service - Adjust root filesystem size.
Nov 21 11:50:56 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-rootfs-resize comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Nov 21 11:50:56 fedora systemd[1]: Reached target local-fs.target - Local File Systems.
Nov 21 11:50:56 fedora kernel: kauditd_printk_skb: 7 callbacks suppressed
Nov 21 11:50:56 fedora kernel: audit: type=1130 audit(1732207856.965:18): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-rootfs-resize comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Nov 21 11:50:56 fedora systemd[1]: Listening on systemd-sysext.socket - System Extension Image Management (Varlink).
Nov 21 11:50:56 fedora systemd[1]: ldconfig.service - Rebuild Dynamic Linker Cache was skipped because no trigger condition checks were met.
Nov 21 11:50:57 fedora systemd[1]: Starting qubes-early-vm-config.service - Early Qubes VM settings...

And these lines in the appVM journalctl -b (seems to be the same issues as above):

Nov 21 12:02:10 fedora systemd[1]: Finished qubes-mount-dirs.service - Initialize and mount /rw and /home.
Nov 21 12:02:10 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-mount-dirs comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 21 12:02:10 fedora systemd[1]: qubes-relabel-rw.service - Relabel /rw and /home was skipped because of an unmet condition check (ConditionSecurity=selinux).
Nov 21 12:03:10 fedora (udev-worker)[497]: eth0: Spawned process '/usr/bin/systemctl restart --job-mode=replace qubes-network-uplink@eth0.service' [613] is taking longer than 59s to complete
Nov 21 12:03:10 fedora systemd-udevd[447]: eth0: Worker [497] processing SEQNUM=2647 is taking a long time
Nov 21 12:04:10 fedora udevadm[651]: Timed out for waiting the udev queue being empty.
Nov 21 12:04:10 fedora systemd[1]: qubes-rootfs-resize.service: Main process exited, code=exited, status=1/FAILURE
Nov 21 12:04:10 fedora systemd[1]: qubes-rootfs-resize.service: Failed with result 'exit-code'.
Nov 21 12:04:10 fedora systemd[1]: Failed to start qubes-rootfs-resize.service - Adjust root filesystem size.
Nov 21 12:04:10 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-rootfs-resize comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Nov 21 12:04:10 fedora systemd[1]: Reached target local-fs.target - Local File Systems.
Nov 21 12:04:10 fedora kernel: kauditd_printk_skb: 9 callbacks suppressed
Nov 21 12:04:10 fedora kernel: audit: type=1130 audit(1732208650.967:20): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-rootfs-resize comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Nov 21 12:04:10 fedora systemd[1]: Listening on systemd-sysext.socket - System Extension Image Management (Varlink).
Nov 21 12:04:10 fedora systemd[1]: ldconfig.service - Rebuild Dynamic Linker Cache was skipped because no trigger condition checks were met.
Nov 21 12:04:10 fedora systemd[1]: Starting qubes-early-vm-config.service - Early Qubes VM settings...
Nov 21 12:04:10 fedora systemd[1]: selinux-autorelabel-mark.service - Mark the need to relabel after reboot was skipped because of an unmet condition check (ConditionPathExists=!/.autorelabel).
Nov 21 12:04:10 fedora systemd[1]: systemd-binfmt.service - Set Up Additional Binary Formats was skipped because no trigger condition checks were met.
Nov 21 12:04:10 fedora systemd[1]: systemd-boot-random-seed.service - Update Boot Loader Random Seed was skipped because no trigger condition checks were met.
Nov 21 12:04:10 fedora systemd[1]: systemd-confext.service - Merge System Configuration Images into /etc/ was skipped because no trigger condition checks were met.
Nov 21 12:04:10 fedora systemd[1]: systemd-sysext.service - Merge System Extension Images into /usr/ and /opt/ was skipped because no trigger condition checks were met.
Nov 21 12:04:10 fedora systemd[1]: Starting systemd-tmpfiles-setup.service - Create System Files and Directories...
Nov 21 12:04:11 code systemd[1]: Finished qubes-early-vm-config.service - Early Qubes VM settings.

Full log from template VM journalctbl -b is too long to post here: https://pastebin.com/raw/20BC4qtA

Unsure how to fix these and address the long shutdown times. There also seems to be some errors related to starting xdg-desktop-portal-gtk service that doesn’t cause a slowdown in the template but does in the appVM.

Not sure precisely what fixed it, but I increased the systemd service timeout for the qubes-rootfs-resize service then rebooted. The service failed again at startup (ignored the new timeout). I then ran systemctl start qubes-rootfs-resize and also ran sudo sh -x /usr/lib/qubes/resize-rootfs. Now it starts up in a timely manner, but I still have long shutdown times in the appVM.