I recently had to install Open Nebula and use CentOS 5.5 as a host machine.
CentOS is quite old, and it made difficult the kvm setup. There are no such issues with CentOS 6. To make it work with Open Nebula (very nice cloud manager), here what I had to do:
- Update kernel to latest release. KVM will not work correctly with old versions, and make sure to load kvm and kvm_intel (or amd) in the modules (you can check with modls, and add them with mod_probe
- If kvm_intel fails to install, even after kernel upgrade, it could be related to multiple kernel instances still on the system. Check the path in the error message. If it shows a path to an older kernel release, uninstall packages of older kernels, then reinstall modules with modprobe. A reboot does not hurt…
- Symlink /usr/libexec/qemu-kvm binary to /usr/bin/kvm
- Configure KVM,… (qemu install, bridge setup etc…)
- Add oneadmin to the kvm group
- CentOS 5.5 does not provide setcap feature (package libcap2) to change capabilities for programs. As Open Nebula does not run as root by default (and this is better this way), the oneadmin user need to be able to modify a bridge (add a tap in bridge). To do so, he needs the net_cap capability on kvm. As it is available from CentOS 6 only, oneadmin must run the commands with root priviledges. To so so, add oneadmin to sudoers with no password.
- In Open Nebula remote scripts (those installed on remote servers), update the commands in function exec_and_log (common scripts) as well as in deploy script, to add a sudo in front of the command.