Learning notes for installing KVM on Centos 5.8

Source: Internet
Author: User


Introduction to KVM virtual machines
KVM (Kernel-based Virtual Machine) is an open-source full-virtualization solution. Since Linux2.6.20 and later integrated into various releases of Linux, KVM virtualization runs in x86 architecture and requires hardware (Intel VT or AMD-V) support, which is managed using the Linux scheduler, the following describes how to install a Kvm VM on centos.
Www.2cto.com
1. Check whether the host machine's cpu supports KVM. vmx indicates that the CPU supports Intel VT technology, and svm indicates that the CPU supports AMD-v technology. 2. Install the KVM package, yum groupinstall KVM. 3. install the bridge management tool yum install bridge-utils tunctl. 4. Set the configuration file for the bridge Nic. Back up the original configuration file first. 4.1 edit the ifcfg-eth0 file.
Edit the ifcfg-br0 file at www.2cto.com 4.2. 5. install the gui management tool, yum install virt-manager virt-viewer. 6.1 check whether the server configuration takes effect. After KVM is installed, you must restart the (reboot) server before it can be loaded by the kernel. 6.2 check whether the configuration of the bridge Nic takes effect. 6.3 check whether the kernel is loaded with the KVM module. 7. Install vncserver on the server to install virtual machines through vncerver.
7.1the KDE or GNOME environment needs to be installed in the VNC environment. The production environment servers are installed with minimal installation. You can use yum grouplist to check the components installed in the system. Here, the KDE environment is installed.
Install vnc_server and yum install vnc-server on www.2cto.com 7.2. 7.3 run vncserver to add the password required to log on to the client VNC. 7.4 modify the configuration file/root/. vnc/xstartup. startkde & indicates that the KDE component is supported. 7.5 modify the vncserver configuration file/etc/sysconfig/vncservers and add the following two lines. 7.6 restart the VNC service and/etc/init. d/vncserver restart. 8.1 connect the client to the server with VNC_viewer. Start the terminal with-System-terminal and enter virt-manager to call up the virtual System manager to create a virtual machine. 8.2KVM supports full virtualization. Select the CPU architecture and KVM management program. 8.3 select the installation media as the local ISO file. 8.4 select the ISO file path. This method uploads the ISO file to the server. 8.5 select the disk space of the KVM Virtual Machine and automatically generate the. imgfile when creating the new virtual machine. You can use qemu-img to create the file. 8.6 select the network as the shared physical device, that is, bridging. 8.7 select the memory size and number of virtual CPUs of the created virtual machine. 8.8 after the VM is created, the system installation part is omitted, which is exactly the same as that of vmware. 9) after the system is installed, use virsh to start the virtual machine. 10) then, you can remotely manage virtual machines through VNC or SSH. Conclusion: 1) KVM virtual machines not only require CPU support, but also require enabling the VT option in BOIS.
2) use virsh list on the terminal to view the currently running virtual machines.
3) In virsh # mode, you can use the start machine name to enable the Virtual Machine and use the shutdown Virtual Machine name to disable the virtual machine.
 

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.