Bug 1174123

Summary: Graphics password disappear after conversion of virt-v2v
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: agkesos, codong, dyuan, juzhou, mbooth, mzhan, ptoscano, rjones
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.28.1-1.18.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:47:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description tingting zheng 2014-12-15 08:24:33 UTC
Description
Graphics password disappear after conversion of virt-v2v
Old version of virt-v2v keeps vnc or spice password after conversion.

Version:
virt-v2v-1.28.1-1.17.el7.x86_64
libguestfs-1.28.1-1.17.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Before conversion:set a vnc or spice guest with graphics password.

2.Use virt-v2v to convert the guest:
# virt-v2v -ic xen+ssh://10.66.106.64 -os default -n virbr0 rhel7 -of raw
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 rhel7
[  17.0] Creating an overlay to protect the source from being modified
[  31.0] Opening the overlay
[ 241.0] Initializing the target -o libvirt -os default
[ 241.0] Inspecting the overlay
[ 251.0] Checking for sufficient free disk space in the guest
[ 251.0] Estimating space required on target for each disk
[ 251.0] Converting Red Hat Enterprise Linux Server release 7.0 Beta (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 315.0] Mapping filesystem data to avoid copying unused and blank areas
[ 316.0] Closing the overlay
[ 316.0] Copying disk 1/1 to /var/lib/libvirt/images/rhel7-sda (raw)
    (100.00/100%)
[ 393.0] Creating output metadata
Pool default refreshed

Domain rhel7 defined from /tmp/v2vlibvirt01d9a1.xml

[ 394.0] Finishing off

3.After conversion,try to boot the guest,no graphics password asked before login.

Actual results:
Graphics password disappear after conversion of virt-v2v

Expected results:
Graphics password is kept there after conversion of virt-v2v as old version of virt-v2v does.

Additional info:
After conversion by old version of virt-v2v,vnc or spice password will be asked before login.

Comment 2 Richard W.M. Jones 2014-12-15 08:42:03 UTC
It turns out we need to use virDomainGetXMLDesc with the
VIR_DOMAIN_XML_SECURE flag, otherwise passwords are not included
in the output.

https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainGetXMLDesc

This also requires that we use a r/w connection.

As this should be simple to fix, I'll have a go at fixing this
for RHEL 7.1 (if there is time).

Comment 3 Richard W.M. Jones 2014-12-15 08:45:32 UTC
Old virt-v2v did pass this flag:

    my $dom = new XML::DOM::Parser->parse($domain->get_xml_description(1));

but as you can see it's not exactly clear(!) since Matt used
the value '1' instead of the defined constant.

Comment 8 tingting zheng 2014-12-16 03:14:16 UTC
Tested with:
libguestfs-1.28.1-1.18.el7.x86_64
virt-v2v-1.28.1-1.18.el7.x86_64

1.Prepare a guest with vnc passowrd set on xen server.
2.Use virt-v2v to convert it.
3.After conversion,the password is kept there.

Refer to the above comments,move the bug to VERIFIED.

Comment 10 errata-xmlrpc 2015-03-05 13:47:46 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.

https://rhn.redhat.com/errata/RHBA-2015-0303.html

Comment 11 Alexandros Gkesos 2015-04-30 10:21:43 UTC
Hello,

I have installed the latest libguestfs-1.28.1-1.18.el7.x86_64 and there is no virt-v2v binary inside.
Shall i open a new bug for this? 


# rpm -q libguestfs
libguestfs-1.28.1-1.18.el7.x86_64

# yum provides *virt-v2v*
Loaded plugins: langpacks, product-id, subscription-manager
No matches found


# rpm -q --filesbypkg libguestfs
libguestfs                /usr/bin/libguestfs-test-tool
libguestfs                /usr/lib64/guestfs
libguestfs                /usr/lib64/guestfs/supermin.d
libguestfs                /usr/lib64/guestfs/supermin.d/base.tar.gz
libguestfs                /usr/lib64/guestfs/supermin.d/daemon.tar.gz
libguestfs                /usr/lib64/guestfs/supermin.d/excludefiles
libguestfs                /usr/lib64/guestfs/supermin.d/hostfiles
libguestfs                /usr/lib64/guestfs/supermin.d/init.tar.gz
libguestfs                /usr/lib64/guestfs/supermin.d/packages
libguestfs                /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz
libguestfs                /usr/lib64/libguestfs.so.0
libguestfs                /usr/lib64/libguestfs.so.0.423.0
libguestfs                /usr/share/doc/libguestfs-1.28.1
libguestfs                /usr/share/doc/libguestfs-1.28.1/COPYING
libguestfs                /usr/share/doc/libguestfs-1.28.1/README
libguestfs                /usr/share/locale/en_GB/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/es/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/gu/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/hi/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/kn/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/ml/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/mr/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/nl/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/or/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/pa/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/pl/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/ta/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/te/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/locale/uk/LC_MESSAGES/libguestfs.mo
libguestfs                /usr/share/man/man1/guestfs-faq.1.gz
libguestfs                /usr/share/man/man1/guestfs-performance.1.gz
libguestfs                /usr/share/man/man1/guestfs-recipes.1.gz
libguestfs                /usr/share/man/man1/guestfs-release-notes.1.gz
libguestfs                /usr/share/man/man1/guestfs-testing.1.gz
libguestfs                /usr/share/man/man1/libguestfs-test-tool.1.gz