1.kvm virt-manager管理工具
yum groupinstall GNOME Desktop -y
yum install dejavu-lgc-sans-fonts -y
yum install -y virt-manager -y
yum install -y libvirt -y
2.kvm删除默认桥接网卡
virsh net-destroy default
virsh net-undefine default
systemctl restart libvirtd
3.网卡配置
[root@linux-node2 network-scripts]# cat ifcfg-br0
DEVICE=br0
BOOTPROTO=none
ONBOOT=yes
TYPE=Bridge
IPADDR=192.168.56.12
NETMASK=255.255.255.0
GATEWAY=192.168.56.2
DEFROUTE=yes
PV4_FAILURE_FATAL=yes
IPV6INIT=no
DELAY=0
USERCTL=no
[root@linux-node2 network-scripts]# cat ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
NAME=eth0
DEVICE=eth0
ONBOOT=yes
GATEWAY=192.168.56.2
BRIDGE=br0
4.重启
ifdown br0
ifdown eth0
ifup br0
ifup eth0
5.kvm迁移
virsh shutdown vmsname
virsh dumpxml vmsname > vmsname.xml
virsh domblklis vmsname
scp disk newserver:/dir
scp vmsname.xml newserver:/etc/libvirt/qemu/
virsh define vmsname