Xen CLI
Translation of the original in Catalan. Read it in: CatalàCastellano
This week I have had an X file with the oriolrius.cat server that I have virtualised on a Xen server. The point is that according to Xen the machine was running normally but I couldn't access either the console or anywhere else. Since the machine was not in the system process list. So, after more than 1 year I have had to learn some Xen CLI command in order to solve the problem.
To get the list of virtual machines the system has:
xe vm-list
with this command we can get the uuid, this identifier will be useful to be able to force the machine to stop. We can do this like this:
xe vm-reset-powerstate uuid=XXXXXXXXXXXXXXX force=true
In case the command fails, for example, with an error of:
The operation could not be performed because a domain still exists for the specified VM.
vm: XXXXXXXXXXXXXXX (nom_servidor)
domid: 1
Then we can remove the domain that causes us problems like this:
/opt/xensource/debug/destroy_domain -domid 1
If the command does not return an error it means that we have been able to remove the domain and we can run the xe vm-reset-powerstate command again.
Thanks to this I have been able to make the Xen server understand that the machine was stopped and from the GUI I have started the machine again without problems. In my case this anomaly had occurred because the system had run out of memory, in other words, I understand that there would be some part of the hypervisor that would have memory leaks.