RHEL: configure QEMU to support TUN devices

This configuration is required to connect VM to the virtual network
using ethernet devices.

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi
2014-04-17 03:33:19 +02:00
parent f83cdc3a52
commit bb37642c34
2 changed files with 22 additions and 0 deletions

11
files/qemu/qemu.conf Normal file
View File

@@ -0,0 +1,11 @@
# Managed by Puppet
# Module cloud::compute::hypervisor
user = "root"
group = "root"
cgroup_device_acl = [
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc", "/dev/hpet", "/dev/net/tun",
]
clear_emulator_capabilities = 0

View File

@@ -93,6 +93,17 @@ Host *
}
if $::operatingsystem == 'RedHat' {
file { '/etc/libvirt/qemu.conf':
ensure => file,
source => 'puppet:///modules/cloud/qemu/qemu.conf',
owner => root,
group => root,
mode => '0644',
notify => Service['libvirtd']
}
}
if $::operatingsystem == 'Ubuntu' {
service { 'dbus':
ensure => running,