RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1158526 - Use password file instead of process interaction
Summary: Use password file instead of process interaction
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 7.2
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Whiteboard: V2V
Depends On:
TreeView+ depends on / blocked
Reported: 2014-10-29 14:50 UTC by Shahar Havivi
Modified: 2015-03-05 13:46 UTC (History)
10 users (show)

Fixed In Version: libguestfs-1.28.1-1.7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-03-05 13:46:59 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Internal Links: 1250715

Description Shahar Havivi 2014-10-29 14:50:57 UTC
The need to enter password in interactive way raise the possibility for deadlock in inter-process communication.

By using a password file we can limit the interaction to one way, ie parsing the virt-v2v output only.

Comment 1 Richard W.M. Jones 2014-10-30 13:42:26 UTC
Patches posted:

A bit complex & risky for 7.1 however ...

Comment 3 zhoujunqin 2014-11-07 07:27:01 UTC
Hi rjones,
i try to test this option "--password-file" with latest build:

1. Prepare a file including esx server password:
# cat /tmp/passwd 
aaa---------------->>(for example)
# ll /tmp/passwd 
-rw-------. 1 root root 18 Nov  7 14:34 /tmp/passwd

2. Use virt-v2v convert a guest from esx server:

#  virt-v2v -ic vpx://root.111.25/tzheng-demo/ test-rhel7.0-released-gui --password-file /tmp/passwd  -v -x 
virt-v2v: libguestfs 1.28.1 (x86_64)
[   0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/ test-rhel7.0-released-gui
input_libvirt_vcenter_https: source: scheme vpx server
libvirt: ESX Driver error : internal error: HTTP response code 500 for call to 'Login'. Fault: ServerFaultCode - Cannot complete login due to an incorrect user name or password.
virt-v2v: error: internal error: invalid argument: cannot open libvirt 
connection 'vpx://root.111.25/tzheng-demo/'

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

My result failed.

You know we have to input password twice, and i also tried with following way but failed.
# cat /tmp/passwd

so please help check whether the format for password file is right or not, thanks.

Comment 4 Richard W.M. Jones 2014-11-07 08:38:29 UTC
You need to make sure the password does not end with '\n'.

To prepare the password file do:

  echo -n password > /tmp/password

The password only needs to appear in the file once.

Comment 5 zhoujunqin 2014-11-07 09:06:28 UTC
Hi rjones,
thanks for you reply, i tried again:
# echo -n aaa >/tmp/passwd2
#  virt-v2v -ic vpx://root.111.25/tzheng-demo/ test-vmtools-bug1151610 -on test-vmtools-bug1151610-2 --password-file /tmp/passwd2
[   0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/ test-vmtools-bug1151610
[   1.0] Creating an overlay to protect the source from being modified
[   2.0] Opening the overlay
[  10.0] Initializing the target -o libvirt -os default
[  10.0] Inspecting the overlay
[  78.0] Checking for sufficient free disk space in the guest
[  78.0] Estimating space required on target for each disk
[  78.0] Converting Red Hat Enterprise Linux Server release 6.5 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 462.0] Mapping filesystem data to avoid copying unused and blank areas
[ 462.0] Closing the overlay
[ 462.0] Copying disk 1/1 to /var/lib/libvirt/images/test-vmtools-bug1151610-2-sda (raw)
[ 617.0] Creating output metadata
Pool default refreshed

Domain test-vmtools-bug1151610-2 defined from /tmp/v2vlibvirt3290a0.xml

[ 618.0] Finishing off

Result: Conversion successfully and boot up with no error.
so move this bug from ON_QA to VERIFIED.

Comment 7 errata-xmlrpc 2015-03-05 13:46:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.