From 40536c75da526ce2b8a79aa29c0446f860cf6df9 Mon Sep 17 00:00:00 2001 From: Ming Xie Date: Tue, 31 Oct 2023 01:45:06 +0800 Subject: [PATCH] Convert guest with large disk to check performance Signed-off-by: Ming Xie --- v2v/tests/cfg/function_test_esx.cfg | 6 ++++++ v2v/tests/src/function_test_esx.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/v2v/tests/cfg/function_test_esx.cfg b/v2v/tests/cfg/function_test_esx.cfg index bf9d254eeb..1655fb5369 100644 --- a/v2v/tests/cfg/function_test_esx.cfg +++ b/v2v/tests/cfg/function_test_esx.cfg @@ -870,6 +870,12 @@ cmd_has_ip = 'no' msg_content = 'administrator@vsphere.local' expect_msg = yes + - with_large_disk: + only esx_70 + only it_vddk + main_vm = VM_NAME_LARGE_DISK_V2V_EXAMPLE + checkpoint = 'large_disk' + v2v_debug = false variants: - positive_test: status_error = 'no' diff --git a/v2v/tests/src/function_test_esx.py b/v2v/tests/src/function_test_esx.py index b5c863832f..03627df83d 100644 --- a/v2v/tests/src/function_test_esx.py +++ b/v2v/tests/src/function_test_esx.py @@ -620,6 +620,12 @@ def vm_check(status_error): V2V_FSTRIM_SUCESS_VER = "[virt-v2v-1.45.1-1.el9,)" if utils_v2v.multiple_versions_compare(V2V_FSTRIM_SUCESS_VER): params.update({'expect_msg': None}) + if 'large_disk' in checkpoint: + time_info = re.search(r'.*\d.*Finishing.*off', output).group(0) + usetime = re.search(r'\d+\.\d+', str(time_info)).group(0).split('.')[0] + LOG.info('use time is %s' % usetime) + if int(usetime) > 300: + test.fail("conversion time is too long, please check v2v performance") # Log checking log_check = utils_v2v.check_log(params, output) if log_check: