How to shutdown or reboot VM forcely in XEN?
Asked Answered
C

2

12

It happen to me to find a VM in XEN run out of memory, OS kill its shell tty so there is no way to input command in VM internally. The only way to fix is shutdown or reboot the VM.

"xm shutdown VM-name" and "xm reboot VM-name" have been tried, but not work. XEN is working fine, the rest VMs are all good, and xm command work for them too. only the ill VM out of control.

Is there any XEN command to shutdown or reboot its VM by force? e.g. some command with "--force" flag. "xm reboot" and "xm shutdown" are too grace in my case, I think.

The XEN version I used is xen-3.0-x86_64 (debian).

Claraclarabella answered 2/4, 2013 at 14:35 Comment(0)
T
10

The xmoption you probably want (although it should really be a last resort) is xm destroy.

xm destroy domain-id

Immediately terminate the domain domain-id. This doesn't give the domain OS any chance to react, and it the equivalent of ripping the power cord out on a physical machine. In most cases you will want to use the shutdown command instead.

Triumph answered 2/4, 2013 at 14:39 Comment(1)
It is a bit scared for me to use that command, but it is the only way to choose in my case.Claraclarabella
G
1

I had issue with "xm reboot", it will not effect and cause subsequence "xm shutdown" has no effect too. So I think the best approach is to "xm shutdown", check "xm uptime" the domain to see if it shutdown, or until timeout and call "xm destroy"

Gabi answered 18/5, 2013 at 19:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.