Record vhost_net threads ID and vcpus threads ID to vm object after creating VM. Signed-off-by: Amos Kong <akong@xxxxxxxxxx> --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py index c5dba08..b2d6088 100644 --- a/client/virt/kvm_vm.py +++ b/client/virt/kvm_vm.py @@ -54,6 +54,8 @@ class VM(virt_vm.BaseVM): self.device_id = [] self.tapfds = [] self.uuid = None + self.vcpu_threads = [] + self.vhost_threads = [] self.spice_port = 8000 @@ -1008,6 +1010,12 @@ class VM(virt_vm.BaseVM): logging.debug("VM appears to be alive with PID %s", self.get_pid()) + o = self.monitor.info("cpus") + self.vcpu_threads = re.findall("thread_id=(\d+)", o) + o = commands.getoutput("ps aux") + self.vhost_threads = re.findall("\w+\s+(\d+)\s.*\[vhost-%s\]" % + self.get_pid(), o) + # Establish a session with the serial console -- requires a version # of netcat that supports -U self.serial_console = aexpect.ShellSession( -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html