1.网络桥接配置:
testhudson@Hudson:/var/lib/libvirt/images$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.107.15
netmask 255.255.255.0
broadcast 192.168.107.255
gateway 192.168.107.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
#auto eth1
#iface eth1 inet static
#address 192.168.8.15
#netmask 255.255.255.0
2.KVM平台安装:
1.安装kvm sudo apt-get -y install qemu-kvm --fix-missing
2.安装libvirt sudo apt-get -y install libvirt-bin --fix-missing
3.安装kvm-pxe sudo apt-get install kvm-pxe
4.检查kvm是否正确安装 sudo dmesg |grep kvm
5.检查虚拟化 egrep '^flags.*(vmx|svm)' /proc/cpuinfo | wc
6.在线安装KVM: # sudo apt-get install -y kvm kmod-kvm kvm-qemu-img libvirt python-virtinst virt-manager virt-viewer bridge-utils
安装完成后重启主机: # reboot 重启完成后,检查kvm模块是否加载:
# lsmod | grep kvm 显示结果如下表示kvm模块已经加载,如果没有输出信息,则表示没有加载成功:
kvm_amd 50452 0 kvm 109264 1 kvm_amd