Skip to content

Commit

Permalink
Merge pull request autotest#5742 from mxie91/convert-guest-from-vmx-w…
Browse files Browse the repository at this point in the history
…ithout-ssh-agent

Test converting a guest via vmx+ssh without ssh-agent
  • Loading branch information
xiaodwan authored Jul 1, 2024
2 parents 3ac46c5 + faf3d4b commit 5d54b1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions v2v/tests/cfg/convert_from_file.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@
checkpoint = 'special_character'
expect_msg = 'yes'
msg_content = 'nbd_connect_uri.*No such file or directory.*'
- no_ssh_agent:
only esx_80
version_required = "[virt-v2v-2.4.0-2.el9,)"
boottype = 3
main_vm = VM_NAME_RHEL9_V2V_EXAMPLE
expect_msg = 'no'
msg_content = 'scp -T.*source.vmx'
checkpoint = 'no_ssh_agent'
- vmx_default:
# Default
vmx_nfs_src = NFS_ESX70_VMX_V2V_EXAMPLE
Expand Down
6 changes: 6 additions & 0 deletions v2v/tests/src/convert_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ def vm_check():
if checkpoint == 'special_character':
v2v_result = utils_v2v.cmd_run(str(utils_v2v.v2v_cmd(v2v_params, cmd_only=True)).replace('.vmx', '.vm*'),
params.get('v2v_dirty_resources'))
elif checkpoint == 'no_ssh_agent':
esxi_passwd_file = "/tmp/v2v_esxi_passwd"
with open(esxi_passwd_file, 'w') as f:
f.write(esxi_password)
v2v_cmd = str(utils_v2v.v2v_cmd(v2v_params, cmd_only=True) + ' -ip %s' % esxi_passwd_file)
v2v_result = utils_v2v.cmd_run(v2v_cmd, params.get('v2v_dirty_resources'))
else:
v2v_result = utils_v2v.v2v_cmd(v2v_params)

Expand Down

0 comments on commit 5d54b1d

Please sign in to comment.