Bug 1057407

Summary: Migrate guest with Error starts the paused guest.
Product: Red Hat Enterprise Linux 7 Reporter: hyao <hyao>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, bili, codong, cwei, dyuan, juzhou, lcui, mzhan, shyu, tzheng, ydu, zpeng, zsong
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-23.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1057409 (view as bug list) Environment:
Last Closed: 2014-06-13 09:43:24 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: 1057409    

Description hyao@redhat.com 2014-01-24 02:48:31 UTC
Description of problem:
Migrate guest with Error starts the paused guest.

Version-Release number of selected component (if applicable):
# rpm -qa libvirt
libvirt-1.1.1-18.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
Use the tree http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL-7.0-20140116.1/compose/Server/x86_64/os/ to get two hosts A and B.
Prepare the guest on nfs pool do the following steps on host A and B.
1. On host A:
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     mig2                           running
 
Migrate the guest with --suspend option from A to B.
[root@4-116 ~]# virsh migrate mig2 --live qemu+ssh://hostb/system --verbose --suspend
root@hostb's password:
Migration: [100 %]
[root@4-116 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     mig2                           shut off

Starts the guest after the migration is done.
[root@4-116 ~]# virsh start mig2  ==> this step is not common.
Domain mig2 started


2. On hostB.

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 10    mig2                           paused

Try to migrate the guest back from B to A with --suspend option
[root@7-204 ~]# virsh migrate mig2 --live qemu+ssh://hosta/system --verbose --suspend
root@hosta's password:
error: Requested operation is not valid: domain is already active as 'mig2' ===> it's right we got the error here.

[root@7-204 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 10    mig2                           running   ==> it doesn't make sense that the error turn on the paused guest.

Comment 2 Martin Kletzander 2014-02-07 09:10:03 UTC
Fixed upstream with v1.2.1-136-g440a1aa:

commit 440a1aa508f7abec635a035158e9b37e179f2db2
Author: Martin Kletzander <mkletzan>
Date:   Thu Feb 6 14:30:59 2014 +0100

    qemu: keep pre-migration domain state after failed migration

Comment 5 zhe peng 2014-02-13 09:35:28 UTC
I can reproduce this with libvirt-1.1.1-22.el7.x86_64

verify with build :libvirt-1.1.1-23.el7.x86_64

step:
 1 same with bug description
 2 # virsh migrate rhel7 --live qemu+ssh://$source_IP/system --verbose --suspend
error: Requested operation is not valid: domain is already active as 'rhel7'

 on DST: # virsh list --all
 Id    Name                           State
----------------------------------------------------
 4     rhel7                          paused
 the guest state not changed, move to verified.

Comment 7 Ludek Smid 2014-06-13 09:43:24 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.