Error getting virtual machine [#] info

After upgrading OpenNebula from 5.2 to 5.4.1 I get error when trying to access the vm info


I’m running oned with log level 3, and the only line i see is ,

Wed Sep 27 17:11:47 2017 [Z0][ReM][E]: Req:7648 UID:0 result FAILURE [] Error getting virtual machine [11].

Any idea how to resolve/debug this problem ?

I only know this screen from accessing a vm that no longer exists and was cleaned. Did you maybe run ‘onedb purge-done’ or anything like that?

The VM exists, and I have access to it’s storage.
when I upgrade, based on the documentation for upgrading from 5.2 to 5.4 I run the onedb upgrade command, no other onedb command was issued.

also, after this problem showed, I tried to run the onedb fsck to see if something was wrong with the DB, and there was just a small issue with the history table, which I fixed manually,

just to make sure I connected to the host with virt-manager and created a new VM and attached the DISK to it, and the VM started normally.
so I guess the problem is with the METADATA which OpenNebula is managing.

Hi @rabin,

after updating from 5.2 to 5.4 I have the same problem but just for a few VMs. Did you find why happened that? I think is something related with the attribute body of the table vm_pool of DB but I can’t find the point to solve it.



I was able to fix this, but this is not something I recommend doing on a machine without a backup.

I basicly opened the SQlite DB file and start digging for all references to the bad machine (id=11), and start removing them or editing them as needed.

eventually I run onedb fsck -s one.db to fix the DB and it found some problems, and solved them for me.

this is how I recovered from this bad upgrade