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 1035118 - stable guest ABI doesn't check rng device
Summary: stable guest ABI doesn't check rng device
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-27 06:29 UTC by tingting zheng
Modified: 2014-06-18 00:59 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.1.1-14.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:27:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description tingting zheng 2013-11-27 06:29:18 UTC
Description
Stable guest ABI doesn't check rng device,error shows when using option --xml to migrate guest with rng device

Version:
libvirt-1.1.1-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest,add rng device in xml file or add it from virt-manager GUI.
2.Boot the guest.
3.Use virsh dumpxml to get the xml of the guest.
# virsh dumpxml mig > mig.xml
……
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
……
4.Migrate the guest use --xml option.
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml
error: unsupported configuration: Target device address type none does not match source pci

5.Try to migrate the guest without --xml option,it will be migrated successfully.
# virsh migrate --live mig qemu+ssh://$ip/system


Actual results:
As step 4 describes.

Expected results:
No error shows in step 4 and the guest is migrated successfully.


Additional info:

Comment 1 Jiri Denemark 2013-11-27 14:17:45 UTC
Step 3 is wrong, instead of

virsh dumpxml mig > mig.xml

you should use

virsh dumpxml --migratable mig > mig.xml

Do you get the same error when you get the XML correctly?

Comment 2 tingting zheng 2013-11-28 02:32:36 UTC
(In reply to Jiri Denemark from comment #1)
> Step 3 is wrong, instead of
> 
> virsh dumpxml mig > mig.xml
> 
> you should use
> 
> virsh dumpxml --migratable mig > mig.xml
> 
> Do you get the same error when you get the XML correctly?


After I use the above command:
virsh dumpxml --migratable mig > mig.xml

Then do migration,I will get another error message:

# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml
error: unsupported configuration: Target controller type ide does not match source usb

Comment 3 Peter Krempa 2013-12-06 10:06:23 UTC
The original steps should be okay to reproduce the problem.

Fixed upstream with:

commit be904e4eeb83cb5513af8dad01fdfbb924f87bb1
Author: Peter Krempa <pkrempa>
Date:   Thu Dec 5 18:33:01 2013 +0100

    conf: Fix XML formatting of RNG device info
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1035118
    
    When outputting the XML for the RNG device, the code didn't format the
    PCI address info. Additionally the schema wasn't expecting the info
    although it was being parsed and used internally. Fix those mistakes and
    add test for the PCI info section.

Comment 6 tingting zheng 2013-12-11 05:46:09 UTC
Tested the bug with:
libvirt-1.1.1-14.el7.x86_64

Steps:
Scenario A:test rng device with random mode.
1.1.Prepare a guest,add rng device in xml file or add it from virt-manager GUI.
2.Boot the guest.

3.Use virsh dumpxml to get the xml of the guest.
# virsh dumpxml mig > mig.xml
……
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </rng>
……
4.Migrate the guest use --xml option,it can be migrated successfully.
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml

5.Update the xml to change pci address,will get expected error as:
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml
error: unsupported configuration: Target device PCI address 0000:00:03.01 does not match source 0000:00:03.00


Scenario B:test rng device with egd mode.
1.Prepare a guest with rng device,mode:Entropy Gathering Daemon,type:tcp,source mode as connect.

2.On host,run the below command:
#cat /dev/urandom | nc -l localhost 708

3.Boot the guest and dump the xml file of the guest,it will show as:
    <rng model='virtio'>
      <backend model='egd' type='tcp'>
        <source mode='connect' host='localhost' service='708'/>
        <protocol type='raw'/>
      </backend>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </rng>

4.Change tcp to udp in xml as:
    <rng model='virtio'>
      <backend model='egd' type='udp'>
        <source mode='connect' host='localhost' service='708'/>
        <protocol type='raw'/>
      </backend>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </rng>

5.Migrate the guest with the updated xml file,it can be migrated successfully.
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml

6.Change backend model from 'egd' to 'random' in xml from step3:
    <rng model='virtio'>
      <backend model='random' type='tcp'>
        <source mode='connect' host='localhost' service='1024'/>
        <protocol type='raw'/>
      </backend>
      <alias name='rng0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </rng>

7.Migrate the guest with the updated xml file,it can be migrated successfully.
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml


Refer to the above comments:
Scenario A works well.
Scenario B:step 5 and step 7,stable guest ABI doesn't check backend mode and type of rng device.

So move the bug back to ASSIGNED.

Comment 7 Peter Krempa 2013-12-16 17:08:26 UTC
Backend type, transport and source are not guest visible changes and thus don't change the ABI. They can and should be modifiable on migration thus are not checked in the ABI check.

Comment 8 tingting zheng 2013-12-17 02:36:03 UTC
(In reply to Peter Krempa from comment #7)
> Backend type, transport and source are not guest visible changes and thus
> don't change the ABI. They can and should be modifiable on migration thus
> are not checked in the ABI check.

Refer to the above comments and comment 6,move the bug to VERIFIED.

Comment 9 Ludek Smid 2014-06-13 10:27:16 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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