Fix: Qemu wait_until_vm_boot 40/4440/1
authorpmikus <pmikus@cisco.com>
Wed, 21 Dec 2016 08:51:47 +0000 (09:51 +0100)
committerpmikus <pmikus@cisco.com>
Wed, 21 Dec 2016 08:51:47 +0000 (09:51 +0100)
There is an issue that booting Nested VM is successful but
QGA guest-ping or flush returns partial response. This fix suppose
to do checking until an error or timeout occurs. In case of QGA
returns correct response it is success. In case of partial
response it will log an error and continue in checking.

Change-Id: Idb2c5e5ea54bfc1e118ff62dd15696a1797dfdd9
Signed-off-by: pmikus <pmikus@cisco.com>
resources/libraries/python/QemuUtils.py

index 8ee9725..37a8863 100644 (file)
@@ -292,8 +292,8 @@ class QemuUtils(object):
             if time() - start > timeout:
                 raise RuntimeError('timeout, VM {0} not booted on {1}'.format(
                     self._qemu_opt['disk_image'], self._node['host']))
-            self._qemu_qga_flush()
             try:
+                self._qemu_qga_flush()
                 out = self._qemu_qga_exec('guest-ping')
             except ValueError:
                 logger.trace('QGA guest-ping unexpected output {}'.format(out))