RHEL6.4 KVM虚拟化网卡桥接,PXE无人值守安装虚拟机

实验需求:在Vmware里面安装KVM虚拟机,PXE引导无人值守安装虚拟机

--------------------------------------分割线 --------------------------------------

推荐相关阅读:

--------------------------------------分割线 --------------------------------------

1.在Vmware里面安装RHEL6.4

2.安装vmtools
过程略...
关闭防火墙与Selinux

[root@server ~]# service iptables stop

[root@server ~]# chkconfig iptables off

[root@server ~]# setenforce 0

[root@server ~]# vim /etc/sysconfig/selinux

                    SELINUX=disabled

3.配置IP地址为192.168.100.1

4.关闭NetworkManager  //不关闭会影响网卡设置

[root@server ~]# service NetworkManager stop

[root@server ~]# chkconfig NetworkManager off

[root@server ~]# shutdown -h now

5.调整vmware的设置
关机状态下,点击处理器。然后在右边窗口虚拟化引擎中勾选虚拟化Inter  VT-x/EPT或AMD-V/rvi(V),确定

找到RedHat6.4安装目录,鼠标右键选择记事本方式打开Redhat6.4 64位.vmx 文件,在下面添加apic.xapic.enable = "FALSE"

6.配置YUM

7.安装KVM

[root@server ~]# yum -y groupinstall "Virtualization" "Virtualization Client" "Virtualization Platform" "Virtualization Tools"
[root@server ~]# /etc/init.d/libvirtd start

[root@server ~]# chkconfig libvirtd on

8.配置PXE

过程略

9.设置HOST主机桥接网络


[root@server ~]# cd /etc/sysconfig/network-scripts/

[root@server network-scripts]# cp ifcfg-eth0 ifcfg-br0

[root@server network-scripts]# vim ifcfg-br0

DEVICE="br0"

HWADDR=00:0C:29:D7:31:92

NM_CONTROLLED="yes"

ONBOOT="yes"

TYPE="Bridge"

IPADDR=192.168.100.1

PREFIX=24

[root@server network-scripts]# vim ifcfg-eth0

DEVICE="eth0"

HWADDR=00:0C:29:D7:31:92

IPV6INIT="yes"

NM_CONTROLLED="yes"

ONBOOT="yes"

TYPE="Ethernet"

BRIDGE=br0

9.可创建KVM虚拟机存储文件

[root@server ~]# mkdir -p /data/image

[root@server ~]# dd if=/dev/zero  of=/data/image/vt1.img bs=10M count=1000

10.安装KVM虚拟机

[root@server network-scripts]# virt-manager

相关推荐