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 744967 - vm will not boot up when migration during vm reboot
Summary: vm will not boot up when migration during vm reboot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 6.2
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-11 02:16 UTC by zhpeng
Modified: 2016-04-26 14:14 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.10.2-33.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 04:13:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1374 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2014-10-14 08:11:54 UTC

Description zhpeng 2011-10-11 02:16:46 UTC
Description of problem:
When guest is in shutdown process of reboot on source and then do live migration, on target, guest does not start, just shutdown and disappear. If the migration process is in start process of reboot, then it is normal .

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.195.el6.x86_64
libvirt-0.9.4-16.el6.x86_64
kernel-2.6.32-206.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. prepare a shared nfs with vm image
2. start a vm with the image
3. reboot the vm
   # virsh list
   # virsh reboot vm  (pls do not run command "reboot" in the guest)
4. migrated the vm before it halted
   # virsh  migrate --live   kvm2  qemu+ssh://10.66.7.230/system
5.check the remote host and vm. the vm should finish shutdown in remote machine.but it will not boot up.
  So the at first it's running then it will disappear
#virsh list --all
 Id Name               Status
----------------------------------
  3 vm                 running
#virsh list --all
 Id Name               Status
----------------------------------

Actual results:
vm will not boot up when migration during vm reboot 

Expected results:
vm will boot up 

Additional info:

Comment 4 Jiri Denemark 2012-06-01 10:09:01 UTC
This is trivial to implement, we just need to transfer the value of priv->fakeReboot through migration cookie to destination to make the destination deamon do the right thing when the domain shuts down

Comment 5 Gunannan Ren 2012-06-18 13:56:10 UTC
When the guest is rebooting, there are two situations to consider.
If the guest rebooting finished after migration job, we implement
the fakeReboot in cookie passed into target libvirtd server in Prepare
phase. The qemu monitor callback will handle it automatically.
If the guest rebooting finished before migration job, we stop the
guest bootup on the source, and inform the target libvirtd server
in the Perfrom phase and let target libvirtd do the bootup work instead.

Comment 6 Gunannan Ren 2012-06-18 13:56:39 UTC
patch sent upstream
https://www.redhat.com/archives/libvir-list/2012-June/msg00734.html

Comment 12 Michal Privoznik 2013-11-21 14:28:19 UTC
I think we should just forbid this corner case instead of implementing fakeReboot transfer to destination. I've proposed a patch upstream for that:

https://www.redhat.com/archives/libvir-list/2013-November/msg00847.html

Comment 13 Michal Privoznik 2013-11-22 08:01:50 UTC
I've just pushed patch upstream:

commit cc38d68dc1d580fd9acc648e11057b1903ddb247
Author:     Michal Privoznik <mprivozn>
AuthorDate: Thu Nov 21 16:34:40 2013 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Fri Nov 22 08:17:30 2013 +0100

    virDomainReboot: Document that migration might be unsafe
    
    https://bugzilla.redhat.com/show_bug.cgi?id=744967
    
    If a domain is rebooting and a migrate API is called meanwhile we would
    have to transfer the fakeReboot attribute to the destination in order to
    prevent domain doing plain shutdown over there. We shouldn't try to do
    anything clever about it other than documenting this as a known
    limitation.
    
    Signed-off-by: Michal Privoznik <mprivozn>

v1.1.4-137-gcc38d68

Comment 18 zhe peng 2014-04-17 06:55:05 UTC
verify with build:
 libvirt-0.10.2-33.el6.x86_64

step:
1. prepare a shared nfs with vm image
2. start a vm with the image(install qemu-guest-agent)
3. reboot the vm
   # virsh list
   # virsh reboot vm  (pls do not run command "reboot" in the guest)
4. migrated the vm before it halted
   #virsh migrate --live rhel6 qemu+ssh://$target_IP/system --verbose
5.check the target host vm.
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     rhel6                          shut off

[root@intel-i72600-03 33]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     rhel6                          paused

[root@intel-i72600-03 33]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 3     rhel6                          running

migration will succeed. guest worked well.

Check source code,the documentation patch already in build, move to verified.

Comment 20 errata-xmlrpc 2014-10-14 04:13:33 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/RHBA-2014-1374.html


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