OPNsense Forum

English Forums => 24.1 Production Series => Topic started by: jonm on May 03, 2024, 09:38:47 am

Title: [Solved] Restoring config - boot failure
Post by: jonm on May 03, 2024, 09:38:47 am
I'm trying to restore the config from my live system into a VM and whenever I do this I'm hitting an issue.
The VM is working fine and is at the exact same release level as the live system.

The restore works as expected, and the system automatically reboots. Everything looks to be in order.

But if I then power off and re-start, after the system boots I get dropped to a mountroot prompt.
Issuing "?" at the mountroot prompt lists no devices.

I don't know how to debug this, any help would be appreciated please...

I can re-create this behaviour every time by reverting the VM using a snapshot.
Title: Re: Restoring config - boot failure
Post by: Patrick M. Hausen on May 03, 2024, 09:51:06 am
Which hypervisor? There's an issue with virtual box and host cacheing of virtual disks that leads to data corruption.

Also do you really mean "power off" instead of "properly shut down"? If you just power off any machine running, you have a good chance of file system damage.
Title: Re: Restoring config - boot failure
Post by: jonm on May 03, 2024, 10:00:34 am
Thanks for the reply. This is qemu on Fedora. And I’m powering off from the web gui.
Title: Re: Restoring config - boot failure
Post by: jonm on May 03, 2024, 10:05:00 am
To clarify, I am shutting down properly via the Opnsense web gui.

But I am pretty sure I can start up/shut down repeatedly without issue until I restore the config…
Title: Re: Restoring config - boot failure
Post by: Patrick M. Hausen on May 03, 2024, 10:08:55 am
Any tunables in the live system that might apply to the root mount?
Title: Re: Restoring config - boot failure
Post by: jonm on May 03, 2024, 10:29:24 am
I just checked and it looks like the only tunables I have set are:

hw.pci.enable_msix 0
hw.bce.tso_enable 0

No idea if these could be an issue?
Title: Re: Restoring config - boot failure
Post by: Patrick M. Hausen on May 03, 2024, 10:34:15 am
You can try - remove the tunables from the exported XML with an editor before import.
Title: Re: Restoring config - boot failure
Post by: jonm on May 03, 2024, 10:39:10 am
OK, I will give that a go. I have reverted the VM to an earlier snapshot and I'm just going through a few power on/off cycles to make absolutely sure it's OK before I restore the config again.
Title: Re: Restoring config - boot failure
Post by: jonm on May 03, 2024, 10:59:07 am
It looks like removing those tunables has done the trick! I have a restored system that is working properly now.

Many thanks  :)
Title: Re: Restoring config - boot failure
Post by: Patrick M. Hausen on May 03, 2024, 11:00:29 am
I suspect hw.pci.enable_msix somehow applies to the virtual disk controller, too.
Title: Re: Restoring config - boot failure
Post by: jonm on May 03, 2024, 11:14:13 am
What does it do? I must admit, I don't really know why I have it in the live config.
Title: Re: [Solved] Restoring config - boot failure
Post by: Patrick M. Hausen on May 03, 2024, 11:53:56 am
MSI-X, Message Signaled Interrupts (https://en.wikipedia.org/wiki/Message_Signaled_Interrupts), is a more modern interrupt mechanism compared to traditional "interrupt lines".

Disabling it can help work around some bugs in some network drivers or the respective hardware.