Displaying 1 result from an estimated 1 matches for "get_domain_path".
2007 Jan 10
1
xenstore watch for domU shutdown
...#####################BEGIN CODE##############################
from xen.xend.xenstore.xsutil import *
from xen.xend.xenstore.xswatch import *
from sys import argv
from xen.xend.xenstore.xstransact import xstransact
#domid of the domU guest
domid = int(argv[1])
xs = xshandle()
path = xs.get_domain_path(domid)
def myHandleShutdownWatch(_):
f = open("/scratch/TEST", "w")
f.write("Shutdown called")
f.close()
return True
mywatch = xswatch(path+"/control/shutdown",myHandleShutdownWatch)
_______________________________________________...