Installation guide
Dell Inc.
KVM Virtualization in RHEL 6 Made Easy
7
BOOTPROTO="dhcp"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Bridge"
DELAY="0"
4. Create a FORWARD firewall rule for the bridge br0 so that VM network traffic can be forwarded
through it. This rule works for all bridge devices:
# iptables -A FORWARD -m physdev --physdev-is-bridged -j ACCEPT
# service iptables save
5. Enable forwarding. Edit /etc/sysctl.conf:
inet.ipv4.ip_forward = 1
And read the file:
# sysctl -p /etc/sysctl.conf
6. Restart the „network‟ service so that the network bridge you just created can get an IP address:
# service network restart
2.7 SELinux
If you are using SELinux in Enforcing mode, then there are some things to consider. The most common
issue is when you use a non-default directory for your VM images. If you use a directory other than
/var/lib/libvirt/images, then you must change the security context for that directory. For example,
let‟s say you select /vm-images to place your VM images:
1. Create the directory:
# mkdir /vm-images
2. Install the policycoreutils-python package (which contains the semanage SELinux utility):
# yum -y install policycoreutils-python
3. Set the security context for the directory and everything under it:
# semanage fcontext --add -t virt_image_t '/vm-images(/.*)?'
Verify it:
# semanage fcontext -l | grep virt_image_t
4. Restore the security context. This will effectively change the context to virt_image_t: