How can I recover a borked in-place upgrade of a fedora 36 standalone VM?

I had a fedora 36 based standalone VM on R4.2 and I decided to upgrade it to fedora 40. To do the in-place upgrade I used the dnf --releasever= distro-sync --best --allowerasing command 4 times. After upgrading to fedora 38 I decided to restart and everything was functioning correctly. The problem came after I did the 38->39->40 upgrades, after a reboot the VM would fail to boot. Decided to try different kernels on the Qube Manager settings but that didn’t make any difference. Tried a volume backup revert but I guess that was too late as the VM was restarted many times before I found out about it.

Is there anyway by which I can recover from this situation and fix the VM?

Also in general what would be the optimal strategy for doing these kinds of in-place upgrades of standalone VMs such that data is safe other than cloning the VM (which I should’ve done)?

1 Like

Cloning isn’t very efficient, but is the easiest way to do this.

How does it fail to boot? Try reading and posting logs from /var/log/xen/console/guest-VMNAME.log.

1 Like
  • Increasing the number of rollbacks so you can use the backup revert
  • make a backup
  • make a clone

That’s 3 different ways to recover.

Without a clear error of what you have during the upgrade, it’s hard to tell how to recover. Maybe using a clean fedora template would be easier and the opportunity for a fresh start, and less time consuming than fixing the current template.

1 Like