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 1174073 - The listen address for vnc is changed after conversion by virt-v2v
Summary: The listen address for vnc is changed after conversion by virt-v2v
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-15 05:01 UTC by tingting zheng
Modified: 2015-11-19 06:58 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.28.1-1.30.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:58:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2183 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-11-19 08:18:42 UTC

Description tingting zheng 2014-12-15 05:01:28 UTC
Description
When using virt-v2v to convert a guest with vnc,the listen address for vnc is changed after conversion,refer to rhel6 bug for old version of virt-v2v :bug 821730#c7

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 the VNC guest listen on all public network interfaces,namely the address:0.0.0.0
#virsh dumpxml rhel7
   <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'/>

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:the guest only listen from local host,namely the address:127.0.0.1
#virsh dumpxml rhel7 
        <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1' keymap='en-us'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>


Actual results:
When using virt-v2v to convert a guest with vnc,the listen address for vnc is changed after conversion.

Expected results:
When using virt-v2v to convert a guest with vnc,the listen address for vnc is kept the same after conversion.

Additional info:

Comment 1 Richard W.M. Jones 2014-12-15 10:25:42 UTC
Although it's a fairly simple change to make this work, I think
deferring it to RHEL >= 7.2 is the correct decision because:

 - old virt-v2v had the same missing feature

 - the listen address is more restrictive than before conversion, so
   it doesn't open any security holes

 - users can work around easily by adjusting the libvirt XML

 - it's risky to add new features just before RHEL 7.1 is released

Comment 2 Pino Toscano 2015-04-14 09:18:52 UTC
Fixed upstream with
https://github.com/libguestfs/libguestfs/commit/9360675dc244a8762e07a8a4289e7a30ca3e1eef
which is in libguestfs >= 1.29.34.

Comment 4 tingting zheng 2015-04-27 08:05:34 UTC
1.Prepare a guest with vnc graphics type,which listens to '0.0.0.0'
# virsh -c xen+ssh://10.66.106.64 dumpxml rhel7
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'/>

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

Domain rhel7-vncaddress-test defined from /tmp/v2vlibvirt13d108.xml

3.After conversion,check the xml of guest.
# virsh dumpxml rhel7-vncaddress-test
   <graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1' keymap='en-us'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>

Refer to comment 3,the listen address has been changed to '127.0.0.1'.

So the bug is not fixed yet,would you pls help to check it?thanks.

Comment 5 Pino Toscano 2015-04-27 08:16:47 UTC
(In reply to tingting zheng from comment #4)
> 1.Prepare a guest with vnc graphics type,which listens to '0.0.0.0'
> # virsh -c xen+ssh://10.66.106.64 dumpxml rhel7
>     <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'
> keymap='en-us'/>

The libvirt documentation [1] seems to recommend a separate <listen> child node rather than an address="" attribute in <graphics> though, as it is more detailed, and v2v supports that so far. I will add support for the old format as well in case <listen> is missing, but you should better use the new one.

[1] http://libvirt.org/formatdomain.html#elementsGraphics

Comment 6 tingting zheng 2015-04-27 08:32:40 UTC
(In reply to Pino Toscano from comment #5)
> (In reply to tingting zheng from comment #4)
> > 1.Prepare a guest with vnc graphics type,which listens to '0.0.0.0'
> > # virsh -c xen+ssh://10.66.106.64 dumpxml rhel7
> >     <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'
> > keymap='en-us'/>
> 
> The libvirt documentation [1] seems to recommend a separate <listen> child
> node rather than an address="" attribute in <graphics> though, as it is more
> detailed, and v2v supports that so far. I will add support for the old
> format as well in case <listen> is missing, but you should better use the
> new one.
> 
> [1] http://libvirt.org/formatdomain.html#elementsGraphics

The guest exist on xen server which is rhel5 system,and this is the default configuration.

Also tried the new way on xen server,it just ignores address line,so I think the new way on xen server is not supported as it's too old.

Comment 7 tingting zheng 2015-04-27 08:36:22 UTC
Refer to comment 4,5,6,move this bug back to ASSIGNED.

Comment 9 tingting zheng 2015-07-02 08:38:47 UTC
Tested with:
libvirt-1.2.16-1.el7.x86_64
virt-v2v-1.28.1-1.42.el7.x86_64
qemu-kvm-1.5.3-92.el7.x86_64

1.Prepare a guest with vnc graphics type,which listens to '0.0.0.0'
# virsh -c xen+ssh://10.66.106.64 dumpxml rhel7
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'/>

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

Domain rhel7-vncaddress-test defined from /tmp/v2vlibvirt23ff44.xml

[ 330.0] Finishing off

3.After conversion,check the listen address for guest,it is the same as before.
# virsh dumpxml rhel7-vncaddress-test
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

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

Comment 10 tingting zheng 2015-07-02 08:41:57 UTC
Miss this comment:
For the new format of graphics,it is not supported on xen server,as v2v supports conversion kvm guests running on rhel7 to RHEV,guests graphics defaults to spice on rhev,so I didn't test the new format of graphics.

Comment 12 errata-xmlrpc 2015-11-19 06:58:16 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-2183.html


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