diff options
author | Dirk von Suchodoletz | 2009-02-24 17:27:00 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-02-24 17:27:00 +0100 |
commit | 30b8cc4c4d523ad47ddf7516fe62ea147a6003d6 (patch) | |
tree | 54ba030903f21dc342ae619906781538f9519911 /os-plugins/plugins/qemukvm/XX_qemukvm.sh | |
parent | Better use /dev/rtc0 instead of /dev/rtc (because distros would like to (diff) | |
download | core-30b8cc4c4d523ad47ddf7516fe62ea147a6003d6.tar.gz core-30b8cc4c4d523ad47ddf7516fe62ea147a6003d6.tar.xz core-30b8cc4c4d523ad47ddf7516fe62ea147a6003d6.zip |
More sensible module loading for qemu/kvm ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2633 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/qemukvm/XX_qemukvm.sh')
-rw-r--r-- | os-plugins/plugins/qemukvm/XX_qemukvm.sh | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh index c2fa835b..2d96d212 100644 --- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh +++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh @@ -16,14 +16,20 @@ if [ -e /initramfs/plugin-conf/qemukvm.conf ]; then # check for the virtualization CPU features - if grep -q "svm" /proc/cpuinfo ; then - modprobe -q kvm_amd || error " * Loading of kvm_amd failed" - elif grep -q "vmx" /proc/cpuinfo ; then - modprobe -q kvm_intel || error " * Loading of kvm_intel failed" + if grep -q "svm" /proc/cpuinfo && modprobe ${MODPRV} kvm_amd ; then + [ $DEBUGLEVEL -gt 0 ] && echo " * Loaded kvm_amd module" + elif grep -q "vmx" /proc/cpuinfo && modprobe ${MODPRV} kvm_intel ; then + [ $DEBUGLEVEL -gt 0 ] && echo " * Loaded kvm_intel module" + elif modprobe ${MODPRV} kqemu ; then + [ $DEBUGLEVEL -gt 0 ] && \ + error " * Successfully loaded the kqemu module, but loading of kvm_amd \ +or kvm_intel\n failed, because no virtualization extenstion found in this \ +CPU. Please\n enable the extension within your machines BIOS or get another \ +CPU." nonfatal else - error " * No virtualization extenstion found in this CPU. Thus using \ -qemu-kvm\n makes not much sense. Please enable the extension within your \ -machines\n BIOS or get another CPU." nonfatal + error " * All module loading failed including the kqemu module, which \ +was either\n not found or couldn't be loaded for other reasons. Thus using \ +qemu(-kvm)\n makes not much sense." exit 1 fi |