[Ovirt-devel] [PATCH node] Checks for hardware support for virtualization.

Darryl L. Pierce
Thu, 26 Feb 2009 19:06:25 -0000

scripts/ovirt-post |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/scripts/ovirt-post b/scripts/ovirt-post
index 068c709..3c8cb13 100755
--- a/scripts/ovirt-post
+++ b/scripts/ovirt-post
@@ -11,6 +11,15 @@
 . /etc/init.d/ovirt-functions

 start() {
+    hwvirt=$(virsh capabilities)
+    if [[ $hwvirt =~ kvm ]]; then
+	log "Hardware virtualization detected"
+    else
+	log "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+	log "!!! No hardware virtualization detected. !!!"
+	log "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"