[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] hardShutdown V.S. destroy control domain


  • To: xen-api@xxxxxxxxxxxxx
  • From: George Shuklin <george.shuklin@xxxxxxxxx>
  • Date: Mon, 22 Apr 2013 10:47:54 +0400
  • Delivery-date: Mon, 22 Apr 2013 06:48:11 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

xc is low-level library.

For python:

#!/usr/bin/python
import xen.lowlevel.xc
xc=xen.lowlevel.xc.xc()
xc.shutdown_domain(666,1)

Note: This is _NOT_ XCP but a dirty hack around xapi directly to the Xen. Use at your own risk.

22.04.2013 06:12, Werdna Cht пишет:
We are now using XCP, it seems that xc.shutdown_domain(domid,X) is not a XCP command?
I've tried /opt/xensource/debug/shutdown_domain -domid 9 in XCP,
but get an error: "no shutdown reason specified" argument is not valid. 
using something like this is not working, neither:
/opt/xensource/debug/shutdown_domain -domid 9 X(X - 0,1 or 2)
So how can I use the shutdown domain function is XCP?

Note again that when I need this, I'm facing following situation:
VM doing an operation A (using java sdk) -> stucked,
Making a force shutdown (using java sdk) -> not working, maybe blocked by operation A or xapi problems.
the VM is now Pending so we need to shut it down forcely.
Will the shutdown domain function works here? or it will still be blocked by the previous fucntion?

Any method (SDK or XCP command line) is OK, thanks.

---
If you destroy domain it will disappear or going to zombie state (no memory, endless dying status). xapi will not able to detect this, so destroying domain is very bad thing.

If you want to shutdown domain forcefully without waiting xapi to get through it long task list, just send xc.shutdown_domain(domid,X) (X - 0,1 or 2). xenopsd will detect this and reacts accordingly.

---
Hello all,
I'm using XenServer 6.1 Java SDK to manage XCP 1.6. 
When shutdowning a VM, I can use hardShutdown or cleanShutdown.
I known the differences of the two.

Following this article, I found there's another way to shutdown the Pending VM.

My question is: what's the difference of hardShutdown and destroy the control domain?
Are there any side effects or risks to destroy the control domain?
Both the pending and normal state.
If there're no risks, why doesn't XCP use this to implement the hardshutdown function, since destroying the control domain won't be stucked.
Any suggestions for use or not use destroying control domain to force shutdown the VM?

Thanks.


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.