In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to implement dynamic migration of KVM in centos7.4. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
KVM dynamic migration
Dynamic migration (Live Migration): also called online migration (Online Migration). It is the process of moving a virtual machine system from one physical host to another while ensuring the normal operation of services on the virtual machine. This process does not have a significant impact on the end user, thus enabling the administrator to repair or upgrade the physical server offline without affecting the normal use of the user. Unlike static migration, in order to ensure the availability of virtual machine services during the migration process, the migration process has only a very short downtime. In the previous stage of the migration, the service runs on the virtual machine of the source host. When the migration reaches a certain stage, the destination host already has the necessary resources to run the virtual machine system. After a very short switch, the source host transfers control to the destination host, and the virtual machine system continues to run on the destination host. For the virtual machine service itself, because the switching time is very short, the user does not feel the interruption of the service, so the migration process is transparent to the user. Dynamic migration is suitable for situations that require high availability of virtual machine services. For more information about kvm Virtualization, click here. Kvm
Try the steps in the case as follows:
(1) set up a source host) and a destination host
(2) kvm connection of two hosts to NFS shared storage
(3) create a new virtual machine and install the system in the kvm of the source host
(4) two hosts are connected and migrated
The diagram of the lab topology is as follows:
Type address function source host 192.168.30.31 install centos7 system mount shared storage destination host 192.168.30.32 mount shared storage, connect to the source host NFS192.168.30.30 to provide shared storage
Step 1: set up a NFS server
[root@lin3030 ~] # yum install nfs-utils
[root@lin3030 ~] # vi / etc/exports
/ opt/kvmshare 192.168.30.31 (rw,sync,no_root_squash)
/ opt/kvmshare 192.168.30.32 (rw,sync,no_root_squash)
# no_root_squash parameters must be added without lowering the right, that is, the root permissions on both sides of the sharing side and the mount side are the same.
[root@lin3030 ~] # mkdir / opt/kvmshare
[root@lin3030 ~] # systemctl start rpcbind / / start first
[root@lin3030 ~] # systemctl start nfs / / starts after
[root@lin3030 ~] # netstat-anpu | grep rpcbind / / UDP port 111is listening
Complete the construction and transfer the image files to the shared folder directory, standby!
Step 2:
Set up the kvm of the source host and install the system
Install the necessary tool plug-ins below:
Yum install-y\
Qemu-kvm.x86_64\ / / install the KVM module
Qemu-kvm-tools.x86_64\ / / install the KVM debugging tool, but not install it
Python-virtinst.noarch\ / / python component, which records the xml component that created the VM
Qemu-img.x86_64\ / / qemu component, create disk, start virtual machine, etc.
Bridge-utils.x86_64\ / / Network support tools
Libvirt\ / / Virtual Machine Management tool
Virt-manager\ / / graphical interface management tool
Openssh-askpass / / graphical interface password component
-verify whether the current host meets the operating conditions of KVM-
Cat / proc/cpuinfo | egrep-o "vmx | smv" intel CPU filter vmx AMD CPU filter smv
Modprobe kvm
Lsmod | grep kvm
Step 3: create a bridging network card
The following is the creation of a bridged Nic:
Vi / etc/sysconfig/network-scripts/ifcfg-ens33 / / add a new line at the end, and remove the IP-related parameters of the Nic.
Vi / etc/sysconfig/network-scripts/ifcfg-br0
[root@lin3030 ~] # systemctl restart network
The tool plug-ins and network cards of the destination host also need to be installed and modified.
Step 4: configure Stora
Open the terminal
Virt-manager
Double-click QEMU point storage
Step 5: create a new virtual machine:
Then click finish.
The target host should also have the same network storage method.
Step 6 Migration
1. Add the connection of the target host
Then enter the account password of the other party.
Right-click to select migration
After the migration is complete, it is found to be running on the target host.
Go to the other station to see if the migration is successful.
Thank you for reading! On "how to achieve KVM dynamic migration in centos7.4" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
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.