yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install virt-manager xauth dejavu-lgc-sans-fonts
systemctl enable libvirtd && systemctl start libvirtd
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sysctl -w net.ipv4.ip_forward=1
systemctl stop firewalld
systemctl disable firewalld
sed -i '/SELINUX=enforcing/s/^/#/' /etc/selinux/config
sed -i '/#SELINUX=enforcing/a SELinux=disabled' /etc/selinux/config
nmcli c add type bridge autoconnect yes con-name br0 ifname br0
nmcli c modify br0 ipv4.addresses 192.168.127.4/24 ipv4.method manual
nmcli c modify br0 ipv4.gateway 192.168.127.254
nmcli c modify br0 ipv4.dns 192.168.127.254
nmcli c delete ens32
nmcli c add type bridge-slave autoconnect yes con-name ens32 ifname ens32 master br0
转载于:https://my.oschina.net/javaite/blog/1430997