Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


XenServer - Rebuilding Database
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

XenServer - Rebuilding Database

randvegetarandvegeta Member, Host Rep

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

  • randvegetarandvegeta Member, Host Rep

    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?

  • randvegetarandvegeta Member, Host Rep

    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?

  • randvegetarandvegeta Member, Host Rep

    @abhishek2b4u said:
    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.

Sign In or Register to comment.