Bug 744967
| Summary: | vm will not boot up when migration during vm reboot | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | zhpeng |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2 | CC: | cwei, dyuan, jdenemar, mshao, mzhan, rbalakri, weizhan, ydu, zhwang, zpeng |
| Target Milestone: | rc | Keywords: | Upstream |
| Target Release: | 6.2 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.10.2-33.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-10-14 04:13:33 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: | |||
|
Description
zhpeng
2011-10-11 02:16:46 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 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. patch sent upstream https://www.redhat.com/archives/libvir-list/2012-June/msg00734.html 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 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
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. 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 |