Bug 491473

Summary: guest migration between Intel and AMD fail to start listening VM when they both use Snap5.2
Product: Red Hat Enterprise Linux 6 Reporter: Vivian Bian <vbian>
Component: qemu-kvmAssignee: Amit Shah <amit.shah>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: berrange, cpelland, llim, ovirt-maint, Rhev-m-bugs, shuang, tburke, virt-maint, xen-maint, ykaul
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-05 12:44:52 UTC Type: ---
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: 488489    
Bug Blocks:    
Attachments:
Description Flags
rhel5u3 log
none
rhel5u3 guest definition file
none
after migration ,the log in the Intel box
none
the win2k8 guest definition file
none
AMD win2k8 guest log
none
win2k8 guest log in Intel box
none
cpuinfo in 10.66.65.167 ,the source box
none
cpuinfo in 10.66.70.52.the destination box none

Description Vivian Bian 2009-03-21 14:01:57 UTC
Description of problem:
Install snap5.2 both in Intel and AMD boxes,and then did a migration between the two boxes.Got a libvir:QEMU error: fail to start listening VM,but between a snap4 AMD and snap5.2 Intel migration will be ok. snap4 Intel and snap5 AMD will still be ok.

Version-Release number of selected component (if applicable):
ovirt-node-image-1.0-1.snap5.2.el5ovirt

How reproducible:
Always

Steps to Reproduce:
1.install two snap5.2 in Intel and AMD boxes
2.create a guest on any of the above two boxes
3.# virsh migrate --live $domain_id qemu+tcp://IP/system
  
Actual results:
libvir:QEMU error: fail to start listening VM

Expected results:
the migration will be ok

Additional info:

Comment 1 Vivian Bian 2009-03-22 12:25:20 UTC
(In reply to comment #0)
> Description of problem:
> Install snap5.2 both in Intel and AMD boxes,and then did a migration between
> the two boxes.Got a libvir:QEMU error: fail to start listening VM,but between a
> snap4 AMD and snap5.2 Intel migration will be ok. snap4 Intel and snap5 AMD
> will still be ok.
> 

  the ok guest is an empty one without any system installed.And now I installed win2k3_x86_64(R2).But this guest could not be migrated between the two boxes (both Intel and AMD installed Snap5.2)

  and for the win2k8 system I could migrate it between two AMD boxes,but failed in Intel and AMD

Comment 2 Vivian Bian 2009-03-22 12:27:13 UTC
fail to start listening VM at the first time 
libvir: Remote error :socket closed unexpectedly at the second time

Comment 3 Dor Laor 2009-03-22 12:41:37 UTC
Cross vendor migration is not supported.
Actually it should be forbidden by libvirt.

Comment 4 Lawrence Lim 2009-03-22 14:39:41 UTC
Could you please confirm if its supported on the kvm level?

Comment 5 Daniel Berrangé 2009-03-23 09:32:41 UTC
While cross-vendor migration is not supported, I don't believe vbian should be seeing the error messages mentioned in comments 1 or 2.

vbian, can you attach the two files /var/log/libvirt/qemu/$DOMNAME.log  from both the source and destination hosts.

Comment 6 Daniel Berrangé 2009-03-23 09:34:16 UTC
Dor, libvirt explicitly restricts its scope to providing 'mechanism', and not 'policy'. As such any restrictions on migration between different CPU types should be enforced by the management application using libvirt, not libvirt itself.

Comment 7 Vivian Bian 2009-03-23 10:36:38 UTC
(In reply to comment #5)
> While cross-vendor migration is not supported, I don't believe vbian should be
> seeing the error messages mentioned in comments 1 or 2.
> 
> vbian, can you attach the two files /var/log/libvirt/qemu/$DOMNAME.log  from
> both the source and destination hosts.  

  migrated win2k8 from AMD to Intel,a running guest hang in the Intel boxes.And I could see no error output.
 
  But please try the attached rhel5u3.xml to define a guest,and then try to migrate it from AMD to Intel.The error referred in comment 2 will be seen.

  Steps:
  # iscsiadm --mode discovery --type sendtargets --portal 10.66.70.7
  # iscsiadm --mode node --targetname dhcp-65-108.nay.redhat.com:storage-pool --portal 10.66.70.7 --login
  # virsh pool-define storage-pool.xml
  # virsh define rhel5u3.xml
  # virsh start rhel5u3
  # virsh migrate --live rhel5u3 qemu+tcp://10.66.70.52/system
    libvir: QEMU error: operation failed: failed to start listening VM
  # virsh migrate --live rhel5u3 qemu+tcp://10.66.70.52/system
    libvir: Remote error: socket closed unexpectedly
    libvir: Remote error: socket closed unexpectedly

Comment 8 Vivian Bian 2009-03-23 10:37:20 UTC
Created attachment 336263 [details]
rhel5u3 log

Comment 9 Vivian Bian 2009-03-23 10:37:52 UTC
Created attachment 336264 [details]
rhel5u3 guest definition file

Comment 10 Vivian Bian 2009-03-23 10:38:40 UTC
Created attachment 336265 [details]
after migration ,the log in the Intel box

Comment 11 Vivian Bian 2009-03-23 10:41:20 UTC
Created attachment 336266 [details]
the win2k8 guest definition file

Comment 12 Vivian Bian 2009-03-23 10:42:37 UTC
Created attachment 336267 [details]
AMD win2k8 guest log

Comment 13 Vivian Bian 2009-03-23 10:43:09 UTC
Created attachment 336268 [details]
win2k8 guest log in Intel box

Comment 14 Daniel Berrangé 2009-03-23 10:56:52 UTC
> migrated win2k8 from AMD to Intel,a running guest hang in the Intel boxes.
> And I could see no error output.

Ok, the log shows the libvirt migration option completed successfully. So the resulting hang must just be due to the incompatibility in instruction set between the AMD & Intel CPUs.  

>  But please try the attached rhel5u3.xml to define a guest,and then try to
> migrate it from AMD to Intel.The error referred in comment 2 will be seen.

The log file for this VM contains 

/usr/bin/qemu-kvm -S -M pc -m 3906 -smp 1 [snip more args] -incoming tcp:0.0.0.0:49154 
madvise: Cannot allocate memory
Could not allocate physical memory


So KVM on the destination was unable to allocate memory to start the VM for incoming migration. This is why libvirt gave back the error message for rhel5u3 VM. This is also not a libvirt bug - either the host is OOM, or there is some problem in KVM allocating memory.

Comment 15 Daniel Berrangé 2009-03-23 10:57:50 UTC
Re-assigning to KVM to verify whether the 'cannot allocate memory' problem is a real bug or not. If not, can just close this WONTFIX, since cross-vendor migration is expected to not work reliably

Comment 16 Vivian Bian 2009-03-23 11:02:51 UTC
Created attachment 336270 [details]
cpuinfo in 10.66.65.167 ,the source box

Comment 17 Vivian Bian 2009-03-23 11:03:28 UTC
Created attachment 336271 [details]
cpuinfo in 10.66.70.52.the destination box

Comment 18 Vivian Bian 2009-03-23 11:05:06 UTC
worth mentioned I have migrated the win2k8 guest successfully between AMD and Intel ,and it is living now .

Comment 19 Vivian Bian 2009-03-23 13:32:54 UTC
In addition, the win2k8 mentioned in this bug is just a core ,not a full installation,and after I reinstalled a full one,it could not be migrated,and the error is the same with the comment 2

Comment 20 Dor Laor 2009-04-12 14:53:31 UTC

*** This bug has been marked as a duplicate of bug 488489 ***

Comment 21 Eduardo Habkost 2009-04-15 19:15:43 UTC
Moving back to NEW, that was the status before the bug was closed as duplicate.

Comment 22 Dor Laor 2009-04-16 07:53:34 UTC
Since amd-intel is not supported at all I'm closing the bug.
Even if it works it is not supported so please don't try it.

Comment 23 Eduardo Habkost 2009-04-16 12:02:46 UTC
There is a cross-vendor migration bug (bug #488489), proposed for rhev-1.1. Proposing this one for rhev-1.1 too.

Comment 24 RHEL Program Management 2009-06-22 18:47:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 25 Eduardo Habkost 2010-01-20 11:52:24 UTC
On RHEL-6, the KVM userspace package is named "qemu-kvm". Moving bug to the right component.