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.
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).
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.
Patch posted: https://github.com/libguestfs/libguestfs/commit/dfded7c94118e8888dec38f11c2af62d8156a59e
A further change is needed: using 'passwd=' instead of 'password=' in the output XML. In full, the following 3 commits are needed: https://github.com/libguestfs/libguestfs/commit/9c4af17add53b50ce0b6756c6216380862f10631 https://github.com/libguestfs/libguestfs/commit/dfded7c94118e8888dec38f11c2af62d8156a59e https://github.com/libguestfs/libguestfs/commit/7a218cbdf635af543479256593e448100406ea1e
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.
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
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