vim /etc/libvirt/qemu/networks/private1.xml ##自动创建虚拟交换机,虚拟网卡 <network> <name>private1</name> <uuid>d0c73469-bf25-494a-8257-abcd3c7954ae</uuid> <bridge name='private1' stp='on' delay='0'/> <mac address='52:54:01:b2:30:f1'/> <domain name='private1'/> <ip address='192.168.1.254' netmask='255.255.255.0'> </ip> </network>

cd /etc/libvirt/qemu/networks/autostart ###创建软连接,开启自启虚拟网卡 ln -s /etc/libvirt/qemu/networks/private1.xml /etc/libvirt/qemu/networks/autostart/private1.xml systemctl restart NetworkManager ##重启服务 reboot ##重启电脑,生成桥接的虚拟网卡private1,不用手动创建虚拟网卡 ########################################################################
private1(真机虚拟网卡) ----------- 虚拟交换机------------------虚拟机网卡