1、物理机的系统安装(硬盘为300G+300G):<pre class="lang:js decode:true ">centos6.5 64位,不安装桌面环境,默认运行级别为3分区:/boot 128Mswap 8G/ 20G/data1  第一块硬盘剩余空间/data2  第二块硬盘全部空间采用最小化安装+以下软件包:BaseSystem -- BaseDevelopment-- Development tools要配置好dns确定系统时间与北京时间同步服务器要允许命令重启(自动完成),若需要自检,人手按F1,请去掉机器自检)bios开启vt功能</pre>2、KVM环境安装:<pre class="lang:js decode:true ">yum -y install kvm python-virtinst libvirt tunctl bridge-utils virt-manager qemu-kvm-tools virt-viewer virt-v2v libguestfs-tools/sbin/service libvirtd restartln -s /usr/libexec/qemu-kvm /usr/bin/qemu-kvm</pre>创建网桥:cat /etc/sysconfig/network-scripts/ifcfg-br0<pre class="lang:js decode:true ">DEVICE=br0TYPE=BridgeONBOOT=yesBOOTPROTO=staticIPADDR=公网IPNETMASK=公网IP掩码GATEWAY=公网IP网关</pre>修改网卡信息,将网卡连接到网桥:cat /etc/sysconfig/network-scripts/ifcfg-em1<pre class="lang:js decode:true ">DEVICE=em1BRIDGE=br0ONBOOT=yesBOOTPROTO=none</pre>重启网卡:<pre class="lang:default decode:true ">service network restart</pre>查看网桥:<div class="line number1 index0 alt2"><pre class="lang:js decode:true ">[root@localhost data1]# brctl show  bridge name     bridge id               STP enabled     interfacesbr0             8000.d4ae526e935a       no              em1virbr0          8000.525400efec1a       yes             virbr0-nic</pre>至此KVM环境安装完成,接下来新建虚拟机安装操作系统3、上传ISO(略)4、创建虚拟机,可使用图形化或命令行进行安装(略)5、KVM的日常管理:<pre class="lang:c decode:true">设置KVM开机自动启动查看KVM列表:virsh  list --all启动KVM:virsh start centos01关闭KVM:virsh shutdown centos01强制关闭KVM:virsh destroy centos01暂停KVM:virsh suspend centos01恢复KVM:virsh resume centos01克隆KVM:virt-clone -o centos01 -n centos02 -f /data1/centos02.img编辑KVM配置:virsh edit centos01设置KVM开机自动启动:vrish autostart centos01</pre>&nbsp;<div class="line number1 index0 alt2"></div></div>