Citrix Xen: How to show vm information via command line

root's picture

I was forced the other day to shutdown a machine via command line and my surprise was to get an error during the execution: VM didn't acknowledge the need to shutdown.
The error is quite convincing and full of useful stuff (NOT) but it's there and you cannot get past it without some extra parameters.
Read on for the solution.

[root@xengz ~]# xe vm-list params=all name-label=gzvirt64 | egrep "name-label|power-state"
                    name-label ( RW): gzvirt64
                   power-state ( RO): running
The machine won't shutdown and brigs this error:
[root@xengz ~]# xe vm-shutdown vm=gzvirt64
VM didn't acknowledge the need to shutdown.
If you are sure this machine must be off, follow what's next:
[root@xengz ~]# xe vm-list params=uuid name-label=gzvrit64
uuid ( RO)    : aa1fca03-d5bb-6b08-a449-7f79c28dd7e8
[root@xengz ~]# xe vm-shutdown uuid=aa1fca03-d5bb-6b08-a449-7f79c28dd7e8 force=true
[root@Xengz ~]# xe vm-list params=all name-label=gzvirt64 | egrep "name-label|power-state"
                    name-label ( RW): gzvirt64
                   power-state ( RO): halted

END!

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root