In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
KVM (Kernel-based Virtual Machine) is a fully virtualized solution based on the Linux operating system on x86 architecture. In centos7, KVM has been integrated into the kernel, which is equivalent to using the kernel as a hypervisor.
Because KVM itself works in the kernel environment, the execution efficiency is much higher than the traditional virtualization technology. Kvm virtualization requires interl VT or ADM-V technical support. You can use the following command to determine whether the native CPU supports the above virtualization technologies.
Egrep'(vmx | svm)'/ proc/cpuinfo
If there is an output, it will prove to be supported.
First, install kvm components
To install KVM components, you need to ensure that the system has met the minimum installation requirements. To deploy KVM virtualization, you need to enable the virtualization feature of CPU through BISO to ensure at least the remaining disk space of 6GB and the memory space of 2GB. The storage methods supported by KVM virtual machines are local disk files, physical disk partitions, LVM partitions, ISCIS disks, GFS2 file systems, optical LUNs devices and so on.
When installing the CENTOS7 system, choose to use the "server with GUI", select the configuration with desktop, virtualization client, virtualizaion hypervisor,virtualization tools to deploy
For systems that have already been installed, you can install components by yum as follows:
Yum groupinstall "Virtualization Hypervisor"Virutalization Client", "Virutalization Platform", "Virtualization Tools"
Kvm-related installation package and its function
Qemu-kvm 's main KVM package
Command-line tools and libraries needed by python-virtinst to create virtual machines
Virt-manager GUI virtual machine management tools
Virt-top virtual machine statistics command
Virt-viewer GUI connector to connect to a configured virtual machine
Libvirt C language toolkit, which provides libvirt services
C language toolkit provided by libvirt-client for virtual clients
Virt-install virtual machine creation command based on libvirt service
Bridge-utils tools for creating and managing bridging devices
It is recommended to use package installation, so it is not easy to omit the package.
Second, use graphical tools to create virtual machines
Virt-manager is a hypervisor provided in the centos7 system to create and manage virtual machines graphically.
First use the command line to call up the program
Virt-manager
Generally, hypervisor defaults to QEMU\ KVM. After the previous KVM components are installed successfully, you can connect them automatically. After entering the host site in host, you can also connect to the hypervisor of other hosts.
Then select New Virtual Machine
Use local installation media to install, or choose PXE, CD-ROM, network installation and other methods.
Then use the ISO image to select the virtual machine operating system type, here using centos7
Click to browse
Note that the default storage volume location is / var/lib/libvirt/images. When installing the system partition, make sure that there is enough space for the mount point / var, where the ISO image is saved. Select the image of centos7 and click to select the volume.
Then allocate virtual machine memory and cpu, configure it reasonably, and do not exceed the limit of the host.
Then choose to allocate storage space. The default is to use qcow format to allocate storage space reasonably.
Then configure hardware parameters such as network
Check the custom configuration before installation, and then select the shared device name on the network.
When the virtual machine chooses to bridge the network, the host needs to create a shared bridging network device, that is, the bridge
First create a bridge and bind it
Brctl addbr br0 # add bridge brctl addif bro eno1 # bind bridge with physical network card ip addr del dev enO1 192.168.3.60 ip addr del dev enO1 24 # Delete physical network card ip address ifconfig br0 192.168.3.60 Universe 24 up # increase bridge ip address and launch route add default gw 192.168.3.1 # re-add default gateway
Check the bridge status and IP address after completion.
After completion, the restart of the bridge will fail, so modify the network card configuration to your lesson plan.
You need the physical network card eno1 of the host (the name of the physical network card may be different, such as eth0). You need to manually create the ifcfg-br0 bridge under ifcfg-en0 and modify the ifcfg-eno1 configuration file at the same time.
The original configuration of vim / etc/sysconfig/network-scripts/ifcfg-eno1 # is modified as follows. Remember to back up the configuration file.
Add the following configuration, delete IP address and other information
BRIDGE=br0
Then add the file ifcfg-br0
Vim / etc/sysconfig/network-scripts/ifcfg-br0 # added
Configure as follows
So that the next restart of the bridge configuration file will exist.
Then select the network br0
Next, customize the hardware.
After confirmation, start the installation
Confirm that the network address can be configured and the bridge takes effect.
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.