Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1353070

Summary: Migration is failed from host RHEL7.2.z to host RHEL7.3 with "-M rhel6.6.0 -device e1000-82540em"
Product: Red Hat Enterprise Linux 7 Reporter: huiqingding <huding>
Component: qemu-kvm-rhevAssignee: Dr. David Alan Gilbert <dgilbert>
Status: CLOSED ERRATA QA Contact: huiqingding <huding>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: chayang, dgilbert, huding, juzhang, knoel, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.6.0-13.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 21:21:29 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:
Bug Depends On:    
Bug Blocks: 1289197    

Description huiqingding 2016-07-06 01:57:25 UTC
Description of problem:
Migration is failed from host RHEL7.2.z to host RHEL7.3 with "-M rhel6.6.0 -device e1000-82540em"

Version-Release number of selected component (if applicable):

Host RHEL7.2.z:
kernel-3.10.0-327.28.2.el7.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.16.x86_64

Host RHEL7.3:
kernel-3.10.0-445.el7.x86_64
qemu-kvm-rhev-2.6.0-11.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. boot vm on src host RHEL7.2.z:
#  /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.6.0 -netdev tap,id=hostnet3,vhost=on,script=/etc/qemu-ifup -device e1000-82540em,netdev=hostnet3,id=virtio-net-pci3,mac=4e:63:28:bc:c1:35,bus=pci.0,addr=0x1e,multifunction=off -monitor stdio
2.  boot vm on dst host RHEL7.3:
#  /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.6.0 -netdev tap,id=hostnet3,vhost=on,script=/etc/qemu-ifup -device e1000-82540em,netdev=hostnet3,id=virtio-net-pci3,mac=4e:63:28:bc:c1:35,bus=pci.0,addr=0x1e,multifunction=off -monitor stdio -incoming tcp:0:5800
3. do migration from src host to dst host
(qemu) migrate -d tcp:{dst_ip}:5800

Actual results:
qemu-kvm of dst host quits with error:
qemu-kvm: Length mismatch: 0000:00:1e.0/e1000.rom: 0x40000 in != 0x20000: Invalid argument
qemu-kvm: error while loading state for instance 0x0 of device 'ram'
copying E and F segments from pc.bios to pc.ram
copying C and D segments from pc.rom to pc.ram
qemu-kvm: load of migration failed: Invalid argument

Expected results:
Migration can be finished normally.

Additional info:

Comment 2 Dr. David Alan Gilbert 2016-07-06 09:33:03 UTC
OK, this needs fixing; I need to think about the best way.

rhel6 has the e1000 device
rhel7.x.x have both e1000 and e1000-82540em
     e1000-82540em is exactly the same as e1000 

in rhel 7.2.x e1000 is a subclass of e1000-82540em
in rhel 7.3.x e1000-82540em is an alias of e1000

in 7.x.x We've got a compat rule that says for rhel6.6.0 to use the RHEL6 ROM for e1000
In 7.2.x because e1000-82540em is a separate device class it doesn't use this rule, so e1000-82540em uses the rhel7 rom, while e1000 uses rhel6 rom
In 7.3.x because it's actually an alias, both devices hit the rule and so both use the rhel6 rom.

Could this affect a real customer?   Since rhel6 doesn't have e1000-82540em they'd haver hit it purely on a machine created on rhel6; however if they created a VM on rhel6, and kept that machine description and added a new net interface then they could hit it, so yes it needs fixing.

Comment 3 Dr. David Alan Gilbert 2016-07-06 11:09:36 UTC
fix posted to list.

Comment 4 Miroslav Rezanina 2016-07-12 08:49:13 UTC
Fix included in qemu-kvm-rhev-2.6.0-13.el7

Comment 6 huiqingding 2016-08-25 08:59:08 UTC
Reproduce this bug using the version:
RHEL7.2.z host:
kernel-3.10.0-327.37.1.el7.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.21.x86_64
RHEL7.3 host:
kernel-3.10.0-493.el7.x86_64
qemu-kvm-rhev-2.6.0-18.el7.x86_64

Steps to Reproduce:
1. boot vm on src host RHEL7.2.z:
#  /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.6.0 -netdev tap,id=hostnet3,vhost=on,script=/etc/qemu-ifup -device e1000-82540em,netdev=hostnet3,id=virtio-net-pci3,mac=4e:63:28:bc:c1:35,bus=pci.0,addr=0x1e,multifunction=off -monitor stdio
2.  boot vm on dst host RHEL7.3:
#  /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.6.0 -netdev tap,id=hostnet3,vhost=on,script=/etc/qemu-ifup -device e1000-82540em,netdev=hostnet3,id=virtio-net-pci3,mac=4e:63:28:bc:c1:35,bus=pci.0,addr=0x1e,multifunction=off -monitor stdio -incoming tcp:0:5800
3. do migration from src host to dst host
(qemu) migrate -d tcp:{dst_ip}:5800

Actual results:
qemu-kvm of dst host quits with error:
qemu-kvm: Length mismatch: 0000:00:1e.0/e1000.rom: 0x40000 in != 0x20000: Invalid argument
qemu-kvm: error while loading state for instance 0x0 of device 'ram'
copying E and F segments from pc.bios to pc.ram
copying C and D segments from pc.rom to pc.ram
qemu-kvm: load of migration failed: Invalid argument

Verify this bug using the version:
RHEL7.2.z host:
kernel-3.10.0-327.37.1.el7.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.21.x86_64
RHEL7.3 host:
kernel-3.10.0-493.el7.x86_64
qemu-kvm-rhev-2.6.0-21.el7.x86_64

Test the above steps, migration can be finished normally.

Comment 7 huiqingding 2016-09-08 10:24:58 UTC
Based on comment #6, set this bug to be verified.

Comment 9 errata-xmlrpc 2016-11-07 21:21:29 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-2016-2673.html