Centos Installation KVM

Source: Internet
Author: User
Tags svm

First, prepare the environment:

1. Check whether virtualization is supported

centos6.2_x864

KVM requires CPU support (Intel VMX or AMD SVM) to check if the CPU provides support for virtual technology before installing KVM:

Egrep ' ^flags.* (VMX|SVM) '/proc/cpuinfo
There is a display indicating that the processor has the VT function

2. Check if BIOSs is turned on for virtualization

Second, the installation of KVM-related software

1, copy can (first confirm Yum configuration is normal)

Yum Install KVM KMOD-KVM qemu kvm-qemu-img virt-viewer virt-manager libvirt Libvirt-python python-virtinst

2. Check if the KVM module is installed

[Email protected] ~]# lsmod |grep KVM

Kvm_intel 55496 32

KVM 337772 1 Kvm_intel

Third, start the service and start the boot

/etc/init.d/libvirtd

Chkconfig LIBVIRTD on


#以上就是KVM的安装, it's simple. But we need to install the system and the occasional configuration through the desktop. So you need to install the desktop on the server side:Gnome


Iv. Install the Gonme desktop and configure the VNC desktop to connect to the Virtual-server server

1. Install Virtual-server Desktop

Yum-y groupinstall "Gnome" "Desktop"

If you do not install the desktop, you will get an error when using SVN login server:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/F4/wKioL1Xw8TejI7unAADHPd-56Fc164.jpg "title=" 123. PNG "alt=" wkiol1xw8teji7unaadhpd-56fc164.jpg "/>

2. Install vnc-server-end software

Yum-y Install VNC *vnc-server*

3. Modify the Vncserver master configuration file

Vim/etc/sysconfig/vncservers

Skip to the end and remove the penultimate line of the comment, and then change to

Vncservers= "1:root"

4. Use VNCPASSWD to set the VNC login password

As follows: Enter the password two times

[Email protected] ~]# VNCPASSWD

Password:

Verify:

[Email protected] ~]#

The password is created under the root host directory. The hidden directory at the beginning of VNC, which is the root user's VNC desktop configuration file. Open Xstartup Configure desktop

#vim/root/.vnc/xstartup

Change the last line to

Gnome & #这将启用gnome桌面

6. Start the Vncserver service and set it to boot

/etc/init.d/vncserver start

Chkconfig Vncserver on

7. Connect via VNC client Virtual-server

Download a small VNC client, such as:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/F4/wKioL1Xw9ZfDA1-MAAEpiLhyo7k375.jpg "title=" 1231. PNG "alt=" wkiol1xw9zfda1-maaepilhyo7k375.jpg "/>

Enter the IP and port, which was set when Vnc-server was set at that time!

The results are as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/F4/wKioL1Xw9ijyYRKeAAInfB9jGpQ973.jpg "title=" 4444. PNG "alt=" wkiol1xw9ijyyrkeaainfb9jgpq973.jpg "/>

V. Configuring bridging

This can be used after installation, but the virtual machine cannot communicate with the outside, only with the virtual machine within the virtual-server.

Configuring bridging is simple if you need to communicate with outside servers.

Temporary:
Setting up bridged network adapters: KVM
#设置br0与eth0桥接
Brctl addif br0 eth0
#清空eth0IP地址
Ifconfig eth0 0.0.0.0
#设置br0地址
Ifconfig br0 192.168.7.241 255.255.252.0 up

Permanent:

Permanent settings
Device=br0
Onboot=yes
Bootproto=static
Type=bridge
ipaddr=192.168.9.47
netmask=255.255.248.0
gateway=192.168.8.1


Device=eth0
Onboot=yes
Bootproto=static
Type=ethernet
Bridge=br0

Ipv6init=no

Note:

In the bridge network card settings are required note:Type=bridge

In the House. Nic to specify the bridged NIC name :bridge=br0

This article is from the "Vibrating Heartstrings" blog, please be sure to keep this source http://shuainotebook.blog.51cto.com/1271282/1693372

Centos Installation KVM

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.