diff options
| author | Sam Yaple <sam@yaple.net> | 2015-03-31 10:45:57 -0500 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-04-01 08:35:34 -0500 |
| commit | 2f0f37f97b575fe7b863d086b00f8f5c470d362a (patch) | |
| tree | 52bd9564e580da9c1280a2c00891a49b8afbea7e /docker/nova-compute | |
| parent | 309d363d458028b5fee650df54bd2d9c34052a41 (diff) | |
| download | kolla-2f0f37f97b575fe7b863d086b00f8f5c470d362a.tar.gz kolla-2f0f37f97b575fe7b863d086b00f8f5c470d362a.zip | |
Load appropriate modules for libvirt
Loads ebtable_nat, ip6_tables, ip_tables, and the appropriate kvm module
if the cpu supports it.
Change-Id: I69995b06da6da4169a2f0d207608543820d8a89e
Diffstat (limited to 'docker/nova-compute')
| -rwxr-xr-x | docker/nova-compute/nova-libvirt/start.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docker/nova-compute/nova-libvirt/start.sh b/docker/nova-compute/nova-libvirt/start.sh index 8d45070b5..04e5f9792 100755 --- a/docker/nova-compute/nova-libvirt/start.sh +++ b/docker/nova-compute/nova-libvirt/start.sh @@ -1,5 +1,16 @@ #!/bin/sh +if [[ $(cat /proc/cpuinfo | grep vmx) ]]; then + modprobe kvm_intel +elif [[ $(cat /proc/cpuinfo | grep svm) ]]; then + modprobe kvm_amd +else + echo "WARNING: Your hardware does not support hardware virtualization -" \ + "using qemu software virtualization instead" +fi + +modprobe ip6_tables ip_tables ebtable_nat + # If libvirt is not installed on the host permissions need to be set # If running in qemu, we don't need to set anything as /dev/kvm won't exist if [[ -c /dev/kvm ]]; then |
