Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v2v case about virt-v2v-in-place #5896

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions v2v/tests/cfg/convert_from_file.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
output_method = "rhev"
- local:
only dest_local
- none:
only dest_none
variants:
- input_mode:
variants:
Expand All @@ -50,6 +52,14 @@
- latest8:
boottype = 3
image_url = "LATEST_RHEL8_IMAGE_URL_V2V_EXAMPLE"
- virt_v2v_in_place:
only output_mode.none
boottype = 3
image_url = "LATEST_RHEL9_IMAGE_URL_V2V_EXAMPLE"
checkpoint = 'virt_v2v_in_place'
msg_content = 'virt-v2v-in-place: warning: virt-v2v-in-place is NOT SUPPORTED .*? use virt-v2v instead of this tool.'
expect_msg = yes
skip_vm_check = yes
- libvirtxml:
only source_none
input_mode = "libvirtxml"
Expand Down
9 changes: 7 additions & 2 deletions v2v/tests/src/convert_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ def vm_check():
log_fail('fail to download guest image from libvirt-ci resource')
image_name = re.search(r'RHEL-\S*\w*.qcow2', params.get('image_url')).group()
v2v_params.update({'input_file': os.path.join(tmp_path, image_name)})
if checkpoint == 'virt_v2v_in_place':
output = utils_v2v.cmd_run('/usr/libexec/virt-v2v-in-place -i disk %s/%s' % (tmp_path, image_name))
log_check = utils_v2v.check_log(params, output.stdout_text)
if log_check:
log_fail(log_check)
if output_format:
v2v_params.update({'of_format': output_format})
# Create libvirt dir pool
Expand Down Expand Up @@ -331,8 +336,8 @@ def vm_check():

if 'new_name' in v2v_params:
vm_name = params['main_vm'] = v2v_params['new_name']

check_result(v2v_result, status_error)
if checkpoint != 'virt_v2v_in_place':
check_result(v2v_result, status_error)
finally:
# Cleanup constant files
utils_v2v.cleanup_constant_files(params)
Expand Down
Loading