Ryan Harper has uploaded a new change for review.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Fix vdsm-faqemu VM launch failure on hosts with newer libvirt
Since January 2012, libvirt now checks[1] for the presence of /dev/kvm before starting a VM to generate better error messages when a VM doesn't start. This breaks faqemu running in a VM (non-nested) or a host which doesn't have KVM modules loaded. Work around this by touching the device node.
1. libvirt commit hash 32f63e912d3bef42a7fa70a0f2d5b04b98afe936
Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Signed-off-by: Ryan Harper ryanh@us.ibm.com --- M vdsm_hooks/faqemu/vdsm-faqemu 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/7223/1
diff --git a/vdsm_hooks/faqemu/vdsm-faqemu b/vdsm_hooks/faqemu/vdsm-faqemu index 218af7f..a36a87c 100644 --- a/vdsm_hooks/faqemu/vdsm-faqemu +++ b/vdsm_hooks/faqemu/vdsm-faqemu @@ -19,4 +19,7 @@ qemu_argv += [ "-no-kvm" ]
qemu_argv += filter(lambda x: x != "-enable-kvm", sys.argv[1:]) +# libvirt 0.9.10+ checks for the presence of /dev/kvm to provide +# better error messages, but this breaks this hook, fake it out +os.system("touch /dev/kvm") os.execv(qemu_bin, qemu_argv)
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/462/ : ABORTED
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ryan Harper has posted comments on this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1: Verified
Created and launched a VM under ovirt 3.1 setup with F17 system.
Prior to this patch, engine would send an error like this:
VM vm1 is down. Exit message: 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..
after updating the hook, I can now launch the VM.
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1:
Ryan, I submit a fix for it before: http://gerrit.ovirt.org/#/c/6391/
But I haven't verified on rhel6 yet.
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ryan Harper has posted comments on this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1:
My patch is a one-liner and I expect it to work no matter where since it's a trivial touch command.
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
Agree. but nested kvm should be better than fake kvm because we needn't do any extra configuration and it's more close to real host.
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm_hooks/faqemu/vdsm-faqemu Line 20: Line 21: qemu_argv += filter(lambda x: x != "-enable-kvm", sys.argv[1:]) Line 22: # libvirt 0.9.10+ checks for the presence of /dev/kvm to provide Line 23: # better error messages, but this breaks this hook, fake it out Line 24: os.system("touch /dev/kvm") how can this work? this script runs as vdsm.
also, there are less expensive ways to create a file - how about shipping it in this hook's rpm ?
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ryan Harper has abandoned this change.
Change subject: Fix vdsm-faqemu VM launch failure on hosts with newer libvirt ......................................................................
Patch Set 1: Abandoned
resubmitted under another topic (accident): See http://gerrit.ovirt.org/7359
-- To view, visit http://gerrit.ovirt.org/7223 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: I1dc88f2931e8f716c1732a51d9f65f600f4fd1ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org