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

Deploy KVM Virtualization platform

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

Share

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

KVM Virtualization Architecture KVM module is directly integrated into the Linux kernel

KVM composition

1.KVM Driver

Virtual machine creation

Virtual machine memory allocation

Virtual CPU register read and write

Virtual CPU running

2.QEMU (simplified and modified)

User control components that simulate PC hardware

Provide Icano device model and access to peripherals

Three modes of KVM Virtualization: customer Mode, user Mode (tool layer) Kernel Mode

How KVM works

KVM basic functions Management View commands help to view the configuration file storage directory of KVM to view virtual machine status virtual machine shutdown and boot force instance system power off through configuration file startup virtual machine system instance suspend virtual machine recovery virtual machine configuration virtual machine instance with host automatic startup export virtual machine configuration virtual machine delete and add-modify virtual machine configuration information deployment real Check the environment step 1: insert a new hard disk And enable the virtualization function

Step 2: format and mount the hard drive # View hard disk information fdisk-l# partition hard disk fdisk / dev/sdb# format hard disk mkfs / dev/sdb1# create mount directory mkdir / data# mount hard disk mount / dev/sdb1 / data# remotely mount the image on the Microsoft host Then use mount.cifs / / 192.168.142.1/ISO / mnt step 3: install KVM# install desktop environment component package yum groupinstall "GNOME Desktop"-y # install KVM module yum install qemu-kvm- y # install KVM debug tool yum install qemu-kvm-tools-y # install command line tool yum install virt-install-y # to build virtual machine install qemu component Create disk Start the virtual machine yum install qemu-img-y # install the network support tool yum install bridge-utils-y # install the virtual machine management tool yum install libvirt-y # install the image management virtual machine yum install virt-manager-y # check whether CPU supports virtualization egrep'(vmx | svm)'/ proc/cpuinfo# check whether the kvm module installs lsmod | grep kvm# enable libvirtd service systemctl start libvirtd# view libvirtd service status systemctl status libvirtd# boot Self-starting libvirtd service systemctl enable libvirtd step 4: deploy linux virtual machine environment # switch to mount point cd / data# to create backup directory mkdir vdisk viso# background replication image to backup directory cp-r / mnt/CentOS-7-x86_64-DVD-1708.iso / data/viso/ & # switch network card configuration directory cd / etc/sysconfig/network-scripts/# copy ens33 network card configuration file as template cp-p for bridge network card Ifcfg-ens33 ifcfg-br0# edit ens33 network card configuration file vim ifcfg-ens33# tail append bridge module BRIDGE=br0# edit bridge network card configuration file vim ifcfg-br0# replacement type for bridge bridge mode TYPE=bridge# modified to static mode BOOTPROTO=static# renamed NAME=br0# renamed driver name DEVICE=br0# append IP address Mask and Gateway IPADDR=192.168.142.153NETMASK=255.255.255.0GATEWAY=192.168.142.1# restart Network Services service network restart step 5: KVM graphical Management

1. Open the terminal and enter the command as root to switch the graphical management interface.

Virt-manager

Create a storage pool, double-click QEMU/KVM, select the Storage tab, and then click the + button to create a new storage pool. Click the "forward" button, enter or browse according to the prompts to set the storage directory, such as / data_kvm/store, and finally click the "finish" button

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