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.
v1->v2
- replace exec of touch with open+write+close
1. libvirt commit hash 32f63e912d3bef42a7fa70a0f2d5b04b98afe936
Change-Id: Iffe19758171e3808e42ed50d309dc4be1f9492cc
Signed-off-by: Ryan Harper <[email protected]>
---
M vdsm_hooks/faqemu/vdsm-faqemu
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/7359/1
diff --git a/vdsm_hooks/faqemu/vdsm-faqemu b/vdsm_hooks/faqemu/vdsm-faqemu
index 218af7f..85822a9 100644
--- a/vdsm_hooks/faqemu/vdsm-faqemu
+++ b/vdsm_hooks/faqemu/vdsm-faqemu
@@ -19,4 +19,8 @@
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
+if not os.path.exists('/dev/kvm'):
+ open('/dev/kvm', 'w+').close()
os.execv(qemu_bin, qemu_argv)
--
To view, visit http://gerrit.ovirt.org/7359
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffe19758171e3808e42ed50d309dc4be1f9492cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches