Mark Wu has uploaded a new change for review.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
faqemu: use domain type 'qemu' instead of the emulator wrapper
Engine always set kvmEnabled' to 'true' when staring a VM. Then vdsm will set domain type to 'kvm'. It will cause the following libivrt error on a host without kvm support:
"libvirtError: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules."
This patch sets domain type to 'qemu' in faqemu hook to override what set by vdsm core. Since libvirt can choose default emulator (qemu-system- x86_64 for x86_64,qemu) according to the domain type, we don't need use the emulator wrapper.
Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com --- M vdsm.spec.in M vdsm_hooks/faqemu/Makefile.am M vdsm_hooks/faqemu/before_vm_start.py D vdsm_hooks/faqemu/vdsm-faqemu 4 files changed, 2 insertions(+), 34 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/6391/1 -- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
Patch Set 1:
Build Started http://localhost:8080/jenkins/job/vdsm_autobuild/6/
-- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
Patch Set 1:
Oops. Seems my Jenkins is triggered and posted a message to the patch. I didn't let it do this. Sorry. Now I turn it down to silent mode.
-- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
Patch Set 1:
Build Failed
http://localhost:8080/jenkins/job/vdsm_autobuild/6/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
Patch Set 1: I would prefer that you didn't submit this
I think we used to have problem with this on el6. Have you tried it there, Mark?
And I'm pretty sure current code worked fine with former versions of libvirt.
Can someone dig a little further?
-- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Mark Wu has posted comments on this change.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
Patch Set 1:
The kvm availability checking was added in recent libvirt vesion(tags/v0.9.10-rc1~225). That doesn't exist in rhel6. That's why no problem found when you run it on rhel6 host. I am not sure what problem my patch will cause on rhel6 host. I will give it a try when I have a rhel6 setup.
BTW, I am impressed by the high quality of libvirt commit message again. I am going to read the doc http://berrange.com/posts/2012/06/27/thoughts-on-improving-openstack-git-com... again.
Please see the details:
commit 32f63e912d3bef42a7fa70a0f2d5b04b98afe936 Author: Laine Stump laine@laine.org Date: Mon Jan 9 14:54:14 2012 -0500
qemu: check for kvm availability before starting kvm guests
This *kind of* addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=772395
(it doesn't eliminate the failure to start, but causes libvirt to give a better idea about the cause of the failure).
If a guest uses a kvm emulator (e.g. /usr/bin/qemu-kvm) and the guest is started when kvm isn't available (either because virtualization is unavailable / has been disabled in the BIOS, or the kvm modules haven't been loaded for some reason), a semi-cryptic error message is logged:
libvirtError: internal error Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status unexpected: exit status 1
This patch notices at process start that a guest needs kvm, and checks for the presence of /dev/kvm (a reasonable indicator that kvm is available) before trying to execute the qemu binary. If kvm isn't available, a more useful (too verbose??) error is logged.
git name-rev 32f63e912d3bef42a7fa70a0f2d5b04b98afe936 32f63e912d3bef42a7fa70a0f2d5b04b98afe936 tags/v0.9.10-rc1~225
-- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Mark Wu has abandoned this change.
Change subject: faqemu: use domain type 'qemu' instead of the emulator wrapper ......................................................................
Patch Set 1: Abandoned
It's resolved in http://gerrit.ovirt.org/#/c/7359/
-- To view, visit http://gerrit.ovirt.org/6391 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: Ibd732d58a81977c1a2473485db92cd1787260e08 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org