diff options
author | Dirk von Suchodoletz | 2009-02-19 02:08:23 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-02-19 02:08:23 +0100 |
commit | 9d974202af1ecd5c61df0982cbe4a206d26d5bed (patch) | |
tree | 8b03d29e3e8cb3ed8206ab0a57797c945fe8bc5b /os-plugins/plugins/qemukvm/XX_qemukvm.sh | |
parent | Next set of fixes and cleanups ... (diff) | |
download | core-9d974202af1ecd5c61df0982cbe4a206d26d5bed.tar.gz core-9d974202af1ecd5c61df0982cbe4a206d26d5bed.tar.xz core-9d974202af1ecd5c61df0982cbe4a206d26d5bed.zip |
Cleanup and fixes for the qemukvm plugin (but still not operable).
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2614 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 | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/os-plugins/plugins/qemukvm/XX_qemukvm.sh b/os-plugins/plugins/qemukvm/XX_qemukvm.sh index 98311d72..c2fa835b 100644 --- a/os-plugins/plugins/qemukvm/XX_qemukvm.sh +++ b/os-plugins/plugins/qemukvm/XX_qemukvm.sh @@ -15,6 +15,18 @@ # check if the configuration file is available 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" + 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 + exit 1 + fi + # load needed variables . /initramfs/plugin-conf/qemukvm.conf @@ -34,7 +46,7 @@ if [ -e /initramfs/plugin-conf/qemukvm.conf ]; then fi if [ -n "${qkimgserv}" ] ; then # directory where qemu images are expected in - testmkd /mnt/var/lib/qemukvm + testmkd /mnt/var/lib/virt/qemukvm case "${qkimgprot}" in *nbd) # TODO: to be filled in ... @@ -45,7 +57,7 @@ if [ -e /initramfs/plugin-conf/qemukvm.conf ]; then qkbdev=/dev/${qkimgserv} waitfor ${qkbdev} 20000 echo -e "ext2\nreiserfs\nvfat\nxfs" >/etc/filesystems - mount -o ro ${qkbdev} /mnt/var/lib/qemukvm || \ + mount -o ro ${qkbdev} /mnt/var/lib/virt/qemukvm || \ error "$scfg_evmlm" nonfatal ;; *) @@ -54,7 +66,7 @@ if [ -e /initramfs/plugin-conf/qemukvm.conf ]; then [ $proto = "fail" ] && { error "$scfg_nfs" nonfatal; noimg=yes; break;} mount -n -t nfs -o ro,nolock,$proto ${qkimgserv}:${qkimgpath} \ - /mnt/var/lib/qemukvm && break + /mnt/var/lib/virt/qemukvm && break done ;; esac |