diff options
| author | Steven Dake <stdake@cisco.com> | 2015-03-27 13:38:10 -0700 |
|---|---|---|
| committer | Martin André <martin.andre@kvhasia.com> | 2015-03-31 00:12:42 +0000 |
| commit | 93e164d97317bb4ca56bc734d95764777c838e68 (patch) | |
| tree | 40285a30a203cfeb1f459b551f79a7c836f36dc8 /docker | |
| parent | fe380064bfe8fa5d6e43f277c3e3e2f7e5077d84 (diff) | |
| download | kolla-93e164d97317bb4ca56bc734d95764777c838e68.tar.gz kolla-93e164d97317bb4ca56bc734d95764777c838e68.zip | |
Test for presence of /dev/kvm before setting permissions
In a native QEMU environment there is no /dev/kvm.
Change-Id: I4d0eb32fd6fad3a4c9c15c7c2b12430b2e4db154
Diffstat (limited to 'docker')
| -rwxr-xr-x | docker/nova-compute/nova-libvirt/start.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docker/nova-compute/nova-libvirt/start.sh b/docker/nova-compute/nova-libvirt/start.sh index d92f52ab0..8d45070b5 100755 --- a/docker/nova-compute/nova-libvirt/start.sh +++ b/docker/nova-compute/nova-libvirt/start.sh @@ -1,8 +1,11 @@ #!/bin/sh # If libvirt is not installed on the host permissions need to be set -chmod 660 /dev/kvm -chown root:kvm /dev/kvm +# If running in qemu, we don't need to set anything as /dev/kvm won't exist +if [[ -c /dev/kvm ]]; then + chmod 660 /dev/kvm + chown root:kvm /dev/kvm +fi echo "Starting libvirtd." exec /usr/sbin/libvirtd |
