def check_vms(self, mig_data):
            """
            Check vms after migrate.

            @param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                if not utils_test.guest_active(vm):
                    raise error.TestFail("Guest not active after migration")

            logging.info("Migrated guest appears to be running")

            logging.info("Logging into migrated guest after migration...")
            for vm in mig_data.vms:
                vm.wait_for_login(timeout=self.login_timeout)
        def check_vms(self, mig_data):
            """
            Check vms after migrate.

            @param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                if not utils_test.guest_active(vm):
                    raise error.TestFail("Guest not active after migration")

            logging.info("Migrated guest appears to be running")

            logging.info("Logging into migrated guest after migration...")
            for vm in mig_data.vms:
                vm.wait_for_login(timeout=self.login_timeout)
        def check_vms_dst(self, mig_data):
            """
            Check vms after migrate.

            @param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                try:
                    vm.resume()
                    if utils_test.guest_active(vm):
                        raise error.TestFail("Guest can't be active after"
                                             " interrupted migration.")
                except (qemu_monitor.MonitorProtocolError,
                        qemu_monitor.MonitorLockError,
                        qemu_monitor.QMPCmdError):
                    pass
        def check_vms_dst(self, mig_data):
            """
            Check vms after migrate.

            :param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                try:
                    vm.resume()
                    if utils_test.guest_active(vm):
                        raise error.TestFail("Guest can't be active after"
                                             " interrupted migration.")
                except (qemu_monitor.MonitorProtocolError,
                        qemu_monitor.MonitorLockError,
                        qemu_monitor.QMPCmdError):
                    pass
        def check_vms(self, mig_data):
            """
            Check vms after migrate.

            @param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                vm.resume()
                if not utils_test.guest_active(vm):
                    raise error.TestFail("Guest not active after migration")

            logging.info("Migrated guest appears to be running")

            logging.info("Logging into migrated guest after migration...")
            for vm in mig_data.vms:
                session = vm.wait_for_login(timeout=self.login_timeout)

                run_error = []
                if self.stress_type in ["cpu_memory", "all"]:
                    if session.cmd_status("killall -s 0 cpuflags-test") != 0:
                        run_error.append("cpuflags-test")

                if self.stress_type in ["disk", "all"]:
                    if session.cmd_status("killall -s 0 disktest") != 0:
                        run_error.append("disktest")

                if run_error:
                    cpu_flags_out = ""
                    disk_out = ""
                    if "cpuflags-test" in run_error:
                        cpu_flags_out = (
                            "\ncpuflags_test_output: \n" +
                            session.cmd_output("cat %s" %
                                               (self.cpuflags_test_out)))
                    if "disktest" in run_error:
                        disk_out = ("\ndisk_test_output: \n" +
                                    session.cmd_output("cat %s" %
                                                       (self.disktest_out)))
                    raise error.TestFail("Something wrong happend"
                                         " during migration %s"
                                         " should be running all time"
                                         " during this test."
                                         " outputs%s%s" %
                                         (run_error, cpu_flags_out, disk_out))
        def check_vms(self, mig_data):
            """
            Check vms after migrate.

            @param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                vm.resume()
                if not utils_test.guest_active(vm):
                    raise error.TestFail("Guest not active after migration")

            logging.info("Migrated guest appears to be running")

            logging.info("Logging into migrated guest after migration...")
            for vm in mig_data.vms:
                session = vm.wait_for_login(timeout=self.login_timeout)

                run_error = []
                if self.stress_type in ["cpu_memory", "all"]:
                    if session.cmd_status("killall -s 0 cpuflags-test") != 0:
                        run_error.append("cpuflags-test")

                if self.stress_type in ["disk", "all"]:
                    if session.cmd_status("killall -s 0 disktest") != 0:
                        run_error.append("disktest")

                if run_error:
                    cpu_flags_out = ""
                    disk_out = ""
                    if "cpuflags-test" in run_error:
                        cpu_flags_out = ("\ncpuflags_test_output: \n" +
                                         session.cmd_output("cat %s" %
                                                 (self.cpuflags_test_out)))
                    if "disktest" in run_error:
                        disk_out = ("\ndisk_test_output: \n" +
                                          session.cmd_output("cat %s" %
                                                 (self.disktest_out)))
                    raise error.TestFail("Something wrong happend"
                                         " during migration %s"
                                         " should be running all time"
                                         " during this test."
                                         " outputs%s%s" %
                                         (run_error, cpu_flags_out,
                                          disk_out))
        def check_vms_src(self, mig_data):
            """
            Check vms after migrate.

            @param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                vm.resume()
                if not utils_test.guest_active(vm):
                    raise error.TestFail("Guest not active after migration")

            logging.info("Migrated guest appears to be running")

            logging.info("Logging into guest after interrupted migration...")
            for vm in mig_data.vms:
                vm.wait_for_serial_login(timeout=self.login_timeout)
                # There is sometime happen that system sends some message on
                # serial console and IP renew command block test. Because
                # there must be added "sleep" in IP renew command.
                vm.wait_for_login(timeout=self.login_timeout)
        def check_vms_src(self, mig_data):
            """
            Check vms after migrate.

            :param mig_data: object with migration data.
            """
            for vm in mig_data.vms:
                vm.resume()
                if not utils_test.guest_active(vm):
                    raise error.TestFail("Guest not active after migration")

            logging.info("Migrated guest appears to be running")

            logging.info("Logging into guest after interrupted migration...")
            for vm in mig_data.vms:
                vm.wait_for_serial_login(timeout=self.login_timeout)
                # There is sometime happen that system sends some message on
                # serial console and IP renew command block test. Because
                # there must be added "sleep" in IP renew command.
                vm.wait_for_login(timeout=self.login_timeout)