一、环境
系统:centos 6.4x64最小化安装
IP: 192.168.3.45
二、虚拟化环境配置
查看是否支持kvm虚拟化
[[email protected] ~]# egrep "vmx|svm" --color=always /proc/cpuinfo #命令执行有结果返回,标尺支持kvm虚拟化 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt xsave avx f16c hypervisor lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi ept vpid fsgsbase smep
三、安装kvm
#安装kvm软件包 [[email protected] ~]# yum -y install kvm python-virtinst libvirt tunctl bridge-utils virt-manager qemu-kvm-tools virt-viewer virt-v2v #安装kvm管理工具包 [[email protected] ~]# yum -y install libguestfs-tools
查看虚拟化环境
[[email protected] ~]# service libvirtd restart Stopping libvirtd daemon: [ OK ] Starting libvirtd daemon: [ OK ]
查看kvm模块支持
[[email protected] ~]# lsmod |grep kvm kvm_intel 53484 0 kvm 316506 1 kvm_intel
查看工具版本
[[email protected] ~]# virsh --version 0.10.2 [[email protected] ~]# virt-install --version 0.600.0 [[email protected] ~]# ln -s /usr/libexec/qemu-kvm /usr/bin/ [[email protected] ~]# qemu-kvm -version QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2-2.448.el6_6.4), Copyright (c) 2003-2008 Fabrice Bellard
手动配置虚拟网桥
#创建br0网桥 [[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-br0 DEVICE=br0 BOOTPROTO=static ONBOOT=yes TYPE=Bridge IPADDR=192.168.3.46 NETMASK=255.255.255.0 #启动网桥 [[email protected] ~]# ifup br0 [[email protected] ~]# ip a |grep br0 12: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN inet 192.168.3.46/24 brd 192.168.3.255 scope global br0 #查看网桥 [[email protected] ~]# brctl show bridge name bridge id STP enabled interfaces br0 8000.000000000000 no
时间: 2024-11-04 20:15:43