HVM qemu-pid in xm-test output log
PATCH 1/1 HVM qemu-pid in xm-test output log
This patch creates a new entry in "xenstored" under "/local/domain/<id>/" called "qemu-pid" containing the actual pid number for the HVM-domain created.
Then, xm-test probes that entry to include it in it's output log. This is usefull for debugging purposes.
Signed-off-by Rick Gonzalez <[email protected]>
tools/python/xen/xend/image.py +5 -0
@@ -357,6 +357,11 @@ self.pid = os.spawnve(os.P_NOWAIT, self.device_model, args, env) log.info("device model pid: %d", self.pid) + # put the new qemu pid number in a list and store it + # in the domain information dir. + store = ["qemu-pid", str(self.pid)] + self.vm.writeDom(store) + def vncParams(self): # see if a vncviewer was specified # XXX RN: bit of a hack. should unify this, maybe stick in config space
tools/xm-test/lib/XmTestLib/Test.py +11 -1
@@ -89,7 +89,7 @@ raise TimeoutError("Command execution time exceeded %i seconds" % timeout, outputSoFar=output) -def traceCommand(command, timeout=None, logOutput=True): +def traceCommand(command, timeout=None, logOutput=True, dom=""): if verbose: print "[dom0] Running `%s'" % command
@@ -98,8 +98,18 @@ else: status, output = commands.getstatusoutput(command) + # Get HVM domain pid number + if dom != "": + cmd = "xenstore-read /local/domain/%s/qemu-pid" % dom.getId() + # read qemu-pid from xenstored + s, dpid = commands.getstatusoutput(cmd) + dname = dom.getName() + if logOutput and verbose: print output + #print HVM pid number on to xm-test output + if (dom != "") and (s == 0): + print "[%s] domain qemu pid: %s" % (dname,dpid) return status, output
tools/xm-test/lib/XmTestLib/XenDomain.py +1 -1
@@ -208,7 +208,7 @@ def start(self, noConsole=False): - ret, output = traceCommand("xm create %s" % self.config) + ret, output = traceCommand("xm create %s" % self.config, dom=self) if ret != 0: raise DomainError("Failed to create domain",
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel