Bug 815503

Summary: migration of rhel6.2.0 guest from RHEL6.3 host to RHEL6.2 host fails "error Unknown controller type 'usb'"
Product: Red Hat Enterprise Linux 6 Reporter: Laine Stump <laine>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: acathrow, ashoham, berrange, dallan, dyasny, dyuan, eblake, iheim, juzhang, jyang, michen, mzhan, pstehlik, qzhang, rwu, veillard, weizhan, zhpeng
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.9.10-17.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 06:57:26 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: 806633, 806975, 841379, 1015081    

Description Laine Stump 2012-04-23 18:17:36 UTC
Description of problem:

1) Prior to libvirt-0.9.10, libvirt would implicitly add a usb controller to the qemu commandline. Before libvirt-0.9.5 libvirt didn't support explicit specification of the USB controller in the domain's XML.

2) Starting with libvirt-0.9.5, libvirt recognized definition of a USB controller, e.g.:

  <controller type='usb' index='0'/>

(this was added as part of USB 2.0 support).

3) Starting with libvirt-0.9.10, any time a domain configuration is read by libvirt, the following line is added to the devices section:

  <controller type='usb' index='0'/>

4) RHEL6.2 libvirt is based on upstream 0.9.4, RHEL6.3 libvirt is based on 0.9.10.

The problem is that when a guest is started on a host running libvirt >= 0.9.10 (e.g. RHEL6.3), and then later migrated to a different host that is running libvirt < 0.9.5 (e.g. RHEL6.2), this migration will *always* fail with:

   error: internal error Unknown controller type 'usb'

(Note that the guest in question is otherwise compatible, e.g. it was created on a RHEL6.2 host and has machine type "rhel6.2.0".)

Version-Release number of selected component (if applicable): source libvirt-0.9.10-1 or later, destination libvirt-0.9.4-anything or earlier

How reproducible: 100%


Steps to Reproduce:
1. define and install a guest on a RHEL6.2 host
2. verify that it migrates to and from another RHEL6.2 host.
3. upgrade one host to RHEL6.3

4. migrate the guest from the RHEL6.2 host to RHEL6.3 (works)
5. attempt to migrate the guest from the RHEL6.3 host to RHEL6.2 (fails)
  
Actual results:

  Step 5 gives:

   error: internal error Unknown controller type 'usb'

Expected results:

   migration should be successful in both directions

Additional info:

An example of this failure is documented in https://bugzilla.redhat.com/show_bug.cgi?id=806633#c29

AFAIK, RHEL guarantees that migration back and forth between hosts running different minor releases of RHEL will work (as long as the config of the guest is unchanged). This bug breaks that guarantee.

Comment 6 Daniel Berrangé 2012-05-01 14:59:07 UTC
> The stable machine type interface should provide us the compatibility. 
>
> So if machine type = 6.2.0 then filter out the XML.

No, this problem is completely unrelated to the guest machine type version, and cannot be solved using that information.

Machine types relate to the QEMU guest hardware, not the libvirt version. If we did a fix based on the machine type == 6.2.0, then this would affect every future version of RHEL 6, ie  running a guest with machine type == 6.2.0 on a RHEL-6.5 host, trying to migrate to a RHEL-6.4 host. This is clearly wrong.

Any version check must be against the libvirt version number

Comment 19 errata-xmlrpc 2012-06-20 06:57:26 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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

Comment 20 weizhang 2012-09-10 03:20:08 UTC
Hi Jiri,

Do we also need to allow 6.1.z->6.4->6.1.z ? The same problem occurred when doing migration back from rhel6.4 to rhel6.1.z

Comment 21 Laine Stump 2012-09-12 14:46:28 UTC
We aren't yet sure if 6.1.z->6.4->6.1.z is supported, but after preliminary discussion decided you should open a new BZ that mentions this BZ in the description and we'll talk about it there. (the reason for this is that once a BZ has been marked as CLOSED ERRATA, it should never be re-opened).

Comment 22 weizhang 2012-09-13 03:50:59 UTC
Thanks for your reply. The new bug is Bug 856864