In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Case Overview
The utilization rate of some Linux services of the company is not high. In order to make full use of these Linux servers, KVM can be deployed to run multiple business systems on physical machines.
KVM Virtualization Architecture KVM module is directly integrated into the Linux kernel
KVM is composed of KVM Driver (core kernel) virtual machine to create virtual machine memory allocation virtual CPU register read and write virtual CPU run QEMU (simplified and modified) tool simulates PC hardware user control components provide three modes of KVM virtualization client mode user mode kernel mode
How KVM works
Install KVM
Setting up KVM network KVM network includes: user mode and bridge mode KVM graphical management using bridge mode in this lab
KVM basic functions Management View commands help to view the configuration file storage directory of KVM to view the 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 guide virtual machine configuration virtual machine deletion and addition modification virtual machine configuration information KVM file tube View the current disk format virt-cat Command virt-edit Command virt-df Command Lab 1 Set to enable virtualization and add a disk
[root@localhost ~] # fdisk / dev/sdb # # disk partition [root@localhost ~] # mkfs / dev/sdb1 # # format [root@localhost ~] # mkdir / data [root@localhost ~] # mount / dev/sdb1 / data # # Mount [root@localhost data] # df-h [root@localhost data] # mount.cifs / / 192.168.100.3/iOS / mnt/ # # Mount Password for root@//192.168.100.3/iOS:2 Install the necessary components [root@localhost ~] # yum groupinstall "GNOME Desktop"-y # # Desktop Environment yum install qemu-kvm- y # # kvm kernel yum install qemu-kvm-tools-y # # Debug tool yum install virt-install-y # # Command Line tool yum install qemu-img-y # # component, create disk Launch virtual machine yum install bridge-utils-y # # Network support tool yum install libvirt-y # # Virtual machine management tool yum install virt-manager-y # # graphical management of virtual machine [root@localhost ~] # egrep'(vmx | svm)'/ proc/cpuinfo # # see if cpu supports [root@localhost ~] # lsmod | grep kvm # # check whether kvm installs [root@localhost ~] # systemctl start libvirtd # # enable service [root@localhost ~] # systemctl status libvirtd [root@localhost ~] # systemctl enable libvirtd # # enable self-boot [root@localhost mnt] # cd / data/ [root@localhost data] # mkdir vdisk viso # # create directory [root@localhost data] # cp / mnt/CentOS-7-x86_64-DVD-1708.iso / data/viso/ # # copy image to viso directory 3 Modify network card information Add bridge network card [root@localhost data] # cd / etc/sysconfig/network-scripts/ [root@localhost network-scripts] # cp-p ifcfg-ens33 ifcfg-br0 # # copy configuration file for br0 network card [root@localhost network-scripts] # vim ifcfg-ens33 # # add BRIDGE=br0 [root@localhost network-scripts] # vim ifcfg-br0 # # configuration network card information TYPE=bridge # # bridging mode NAME=br0 # # name is br0DEVICE=br0IPADDR=192.168.13.132 # # ip address NETMASKE=255.255.255.0 # # Subnet Mask GATEWAY=192.168.13.1 # # Gateway [root@localhost network-scripts] # service network restart # # restart Nic 4 Configure virtual system management [root@localhost] # virt-manager # # under the graphical interface to add a storage pool
Second, add storage volumes
# # shut down 3. Create a new virtual machine and install it
Thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.