When installing a virtualized environment, first look at the hardware configuration and environment of the server, as follows:
(a) Check the hardware related situation:
1, view CPU model, number of physical CPUs,
[Email protected] ~]# Cat/proc/cpuinfo | grep name | Cut-d:-f2 | Uniq-c 2 Intel (R) Core (TM) i3-4150 CPU @ 3.50ghz[[email protected] ~]# Cat/proc/cpuinfo | grep Physical | Sort-n | Uniq-c 2 Address sizes:42 bits physical, bits virtual physical id:0 # #说明有一颗cpu, the number is from 0 starting from
2. View Memory
[Email protected] ~]# dmidecode|grep-a5 "Memory Device" |grep Size | Cut-d:-f2 | Sort-n | Uniq-c No Module installed 1 KB 1 8 GB 1 8192 MB # # #接了一根内存, per memory The size is 8G
3, see other relevant parameters:
[Email protected] ~]# Dmidecode | Grep-a16 "Memory Device" | grep Speed | Sort-n | Uniq-c Speed:unknown[[email protected] ~]# dmidecode|grep ' Maximum capacity ' Maximum capacity:1 Tb[[email protected] ~]#
(ii) Installation of KVM
1. See if the server supports virtualization
[Email protected] ~]# grep-e-o ' VMX|SVM '/proc/cpuinfo
Vmx
2. Installing the KVM Package
[Email protected] ~]# yum-y install KVM python-virtinst libvirt tunctl bridge-utils virt-manager qemu-kvm-tools Virt-vie Wer virt-v2v
3. Installing the KVM Virtualization Management Toolkit
[email protected] ~]# Yum install libguestfs-tools-y
4. View the relevant environment of the virtual machine
[[Email protected] ~]# /etc/init.d/libvirtd restartstopping libvirtd daemon: [ ok ]starting libvirtd daemon: [ ok ][[email protected] ~]# virsh -c qemu:///system list Id Name state---------------------------------------------------- 1 hadoop4 running[[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/qemu-kvm[[email protected] ~]# qemu-kvm -version QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2-2.479.el6_7.3), copyright (c) 2003-2008 fabrice bellard[[email protected] ~]#
5. Create the virtual bridge manually:
A, first NetworkManager service:
[Email protected] network-scripts]#/etc/init.d/networkmanager status
NetworkManager (PID 1132) is running ...
[[email protected] network-scripts]#/etc/init.d/networkmanager stop
Stopping NetworkManager daemon: [OK]
[Email protected] network-scripts]#/etc/init.d/networkmanager status
NetworkManager is stopped
[Email protected] network-scripts]# Chkconfig NetworkManager off
b, create the Br0 bridge:
[[email protected] network-scripts]# cp ifcfg-eth0 ifcfg-br0[[email protected] network-scripts]# vi ifcfg-eth0 device=eth0hwaddr= 00:0c:29:75:92:cftype=ethernetonboot=yesnm_controlled=nobootproto=staticbridge=br0defroute=yesname= systemeth0ipaddr=10.1.156.200netmask=255.255.255.0gateway=10.1.156.1dns1=10.1.156.1
[[Email protected] network-scripts]# vi ifcfg-br0 uuid= c12c5da8-e4dd-43e0-a5cb-2c5491d68affdevice=br0 ## #修改为:br0hwaddr=00:0c:29:75:92:cf ## #不变TYPE =bridge ## #把Ethernet变成BridgeONBOOT =yesnm_controlled= yesbootproto=staticipaddr=10.1.156.201 ## #修改下ipNETMASK =255.255.255.0gateway= 10.1.156.1dns1=10.1.156.1
C, after you close the NetworkManager service, you can manage the network through service Networkrestart
This article is from the "Breght Moon" blog, make sure to keep this source http://liqingbiao.blog.51cto.com/3044896/1740516
KVM Virtualization Notes (i)------KVM virtualized Environment installation