使用桥接网络,需要修改本机网络配置

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
      address x.x.x.x
      netmask 255.255.255.0
      gateway x.x.x.x
      broadcast 10.8.235.255
      bridge_ports eth0
      bridge_stp off
      bridge_fd 0
      bridge_maxwait 0

使用 virsh edit vm,修改 vm 的网络配置

 <interface type='bridge'>
    <source bridge='br0'/>
    <mac address='00:16:3e:1a:b3:4a'/>
    <model type='virtio'/>   # try this if you experience problems with VLANs
 </interface>

在安装时就指定为桥接的话,参数为 --network bridge=br0。另外,-network network=default 为 nat 模式