Summary: The main introduction of KVM and Virt-manager on the server side and client installation deployment, easy to multiple virtualized physical host management.
1.KVM deployment on the server side (for RHEL6 systems, local update sources can be built)
KVM virtualization for servers first need to verify that the physical hardware of the server is supported
#cat/proc/cpuinfo | grep (VMX|SMV)
If the server has KVM support, you can install the KVM Module virtualization physical Host
Installing the KVM Module
#yum Install qemu-kvm.x86_64
Install the KVM Debugging tool (can not be installed)
#yum Install qemu-kvm-tools.x86_64
Install the Python component, which is used primarily to record XML files when you create a VM
#yum Install Python-virtinst.noarch
Install the QEMU component, use the QEMU command to create a disk, start a virtual machine, and so on
#yum Install qemu-img.x86_64
Installing Network Support Tools
#yum Install bridge-utils.x86_64
Install Virtual machine management tools, use Virsh to manage virtual machines
#yum Install Libvirt
Install the graphical interface Management virtual machine (for remote managed hosts, you may not install)
#yum Install Virt-manager
2. Check whether the KVM module is installed and complete
#lsmod | grep KVM
Two modules are displayed
Kvm_intel/kvm_amd
Kvm
3. Check physical host Virtualization completion
#virsh List
The following displays are available after the correct installation:
Id Name State
----------------------------------
5. Install Virt-manager at the local management end
#yum Install Virt-manager
Or
#apt-get Install Virt-manager
The above five steps can be summed up the following graphics
Server <------------------------------> Client
Qemu-kvm.x86_64 Virt-manager
Python-virtinst.noarch
Qemu-img.x86_64
Bridge-utils.x86_64
Libvirt
You can then access and control the server's virtual machines remotely.
6. Network Configuration
The Rhel configuration is as follows:
Create a ifcfg-br0 file path/etc/sysconfig/network-scripts/ifcfg-br0
Fill in the following content:
Device=br0
Type=bridge
Bootproto=static
ipaddr=192.168.1.213
netmask=255.255.255.0
gateway=192.168.1.10
Onboot=yes
Modify the contents of the eth0:/etc/sysconfig/network-scripts/ifcfg-eth0 into the following form:
Device=eth0
Onboot=yes
Bridge=br0
Nm_controlled=no
If it is a dual network card or multiple network card, follow this procedure to modify.
and restart the physical computer network.
#service Network Restart
Debian is configured as follows:
/etc/network/interfaces
Auto eth0--> changed into auto br0
Other changes are made in the following form:
Iface br0 inet DHCP
Bridge_ports eth0
BRIDGE_STP off
Bridge_maxwait 0
BRIDGE_FD 0
If there are more than one network card, the change can be.
Finally restart the network
#/etc/init.d/networking restart
7. Create an LVM storage pool to accommodate virtual machine mirroring while remotely connecting to the physical host for management.
The process of creating an LVM storage pool can refer to documentation about the use of LVM.
Remote connection host needs to be managed by the physical host to open the function of remote root, you can use RSA encryption to provide a password to improve security, but also the use of restricted access to IP to further ensure security.
Virt-manager---> Establish a new connection----> select SSH connection mode
Enter the user and IP to access the host as well as ports such as:
root@192.168.53.168:168
Then enter the password to connect to the remote host.
Because VNC is used to connect to a remote virtual machine, the graphical interface can be displayed, but is more affected by the network speed. Of course, you can use Redhat Open source Spice technology to get the effect of virtualization desktop, the latter can try.
8. For the above summary:
In the remote management of KVM virtualization physical host, can dynamically adjust the memory of the VM, clone, boot, shutdown, suspend the host operation. Dynamic migration can also be carried out in the relevant physical environment. Compared to Xen virtualization technology, KVM Technology can achieve remote installation of virtual machines, and because of Xen itself, the use of libvirt can not achieve this functionality.
The process of using LVM has found that it is not possible to dynamically expand the disk space allocated to the VM by using the dynamic extension technology of LVM. This is because the KVM uses QEMU as the reason for the disk simulator, the allocation of the LVM disk processing, adding additional factors cause the LVM disk block can not be recognized by the physical host. It seems that Xen and KVM have their pros and cons.