All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
XenServer - Rebuilding Database
Hello all.
Seem to be in a little bit of a pickle. One of our nodes has a crashed XAPI and it would not restart. I copied the file /var/xapi/state.db file to /var/xapi/state.db.BACKUP and then XAPI restarted fine.
Finally able to access the server via XenCenter, but all data about the VMs and such are gone. This was expected as I renamed the state.db file. So i shut down XAPI, copy the file back with the original name, and restart XAPI again. XAPI comes up, and... oh dear, the DB still seems empty.
Accessing server via XenServer and all node info is gone! Cannot see any VMs, CRs or even network configuration.
I should point out that all VMs are actually still running on this node, but they cannot be seen or managed through Xen's tools.
I really don't want to have to manually rebuild this DB. Any ideas?
Comments
https://support.citrix.com/article/CTX136342
give this a try.
I've already read that but it seems not all that useful given the circumstances I am in. I'm trying to do this without affecting live VMs. Who knows.. maybe a reboot will resolve the problem on its own already, but that would result in VM downtime.
I am setting up a test machine to see what would happen if I just reboot the node after deleting the state.db file. If it all comes back ok, then it may well be the best plan. Otherwise, I think a manual rebuild would be necessary.
Anyone else experience this?
Looks like my original state.db file is actually gone... and have no choice but to rebuild manually.... shit.... an extra day of work created...
Hi Randvegeta,
This is very old post, but we are facing same issue can you please guide how you have manually configured the state.db file to make the VMs visible in xenserver console?
I don't remember exactly what I did to rebuild the state.db file, but it certainly seemed easier to simply create new VMs and just attach the old VHDs rather than manually rebuild by hand the state.db file.
Creating new VMs and attaching the VHDs is actually very quick and easy. But you do need a record of the VM's config (especially the MAC addresses) to make sure they all boot as if nothing went wrong at all.
Give that a try. Downtime is minimal this way.