Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install KVM virtual machine in Linux system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to install the KVM virtual machine in the Linux system". In the daily operation, I believe that many people have doubts about how to install the KVM virtual machine in the Linux system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use operation method. I hope it will be helpful to answer the doubt of "how to install the KVM virtual machine in the Linux system". Next, please follow the editor to study!

KVM is a virtual machine, mainly used in Linux systems, so how to install KVM in Linux systems? The following editor takes CentOS5.5 as an example to introduce the installation method of KVM.

Steps:

1. To see if cpu supports virtualization, execute the command # cat / proc/cpuinfo | grep flags

The presence of vmx or svm indicates cpu support, where svm is for AMD platform and vmx is for Intel platform.

The 2.KVM installation package has been included in the installation package of the system disk. Mount the CD directly and set the yum source to the local CD.

Yum-- disablerepo=\ *-- enablerepo=c5-media groupinstall 'KVM' installation

Check to see if the system has loaded the kvm module:

Method 1: [root@mail ~] # lsmod | grep kvm

Kvm_intel 86920 0

Kvm 226208 2 ksm,kvm_intel if not displayed, restart the system will be displayed!

Method 2: [root@mail] # virsh-c qemu:///system list

Id Name State

-- No error message means that the installation is correct!

3. Restart the computer, enter BIOS, and turn on the virtualization function of CPU (depending on the bios, find it yourself! )

BIOS-- "Advanced--" Processor Configuration-- "Intel (R) Virtualization Technolog Select Enable

4. Create a bridge (no bridge-utils tools need to be installed, the system has been installed by default)

Cd / etc/sysconfig/network-scripts/

Cp ifcfg-eth0 ifcfg-br0

Vi ifcfg-eth0

DEVICE=eth0

# comment out BOOTPROTO=none

HWADDR=38:60:77:30:5a:16 comment out

ONBOOT=yes

# comment out TYPE=Ethernet

BRIDGE=br0 add

# comment out NETMASK=255.255.255.0

# comment out IPADDR=192.168.0.32

# comment out GATEWAY=192.168.0.1

Vi ifcfg-br0

DEVICE=br0

BOOTPROTO=none

HWADDR=38:60:77:30:5a:16 can not write.

ONBOOT=yes

TYPE=Bridge, this is very important.

NETMASK=255.255.255.0 is specified according to the actual situation

IPADDR=192.168.0.32 I specify ip manually, or you can get it automatically by dhcp!

GATEWAY=192.168.0.1 is specified according to the actual situation

Service network restart ifconfig to view relevant information

5. Enter the graphical interface of the system and click VirtualMachine Manager under Applications-"System Tools to open it."

6. Install the operating system in KVM, similar to the system installation method in VMware.

Choose NAT (bridging br0) when choosing the network connection mode!

The virtual system image path is: / var/lib/libvirt/images/, delete the corresponding .img file for the unneeded virtual system.

7. After setting up, wait for the system to be installed, because the network mode is to bridge br0, and the system can be restarted after installation.

At this point, the study on "how to install the KVM virtual machine in the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report