当前位置:网站首页>KVM hot migration for KVM virtual management
KVM hot migration for KVM virtual management
2022-06-13 05:11:00 【I love Qianxi】
I can't write down the last article , Fill in this article
kvm Virtual management kvm Heat transfer
The principle of heat transfer is as follows :
If you want to migrate a running virtual machine, you must use shared storage , Mount the disk on shared storage , Anyone who wants to use it can mount it
The environment configuration of the three machines is as follows :
stay nfs The file configuration on the host is as follows
[[email protected] data]# vim /etc/exports
#shared dir
/data 192.168.119.0/24(rw,async,no_root_squash,no_all_squash)
On both sides kvm Test on the virtual machine
[[email protected] ~]# showmount -e 192.168.119.129
Export list for 192.168.119.129:
[[email protected] ~]# showmount -e 192.168.119.146
Export list for 192.168.119.146:
Mount the path of the disk file on the two host computers to nfs Of /data Catalog
[[email protected] images]# cd /data/
[[email protected] data]# ls
nebula1.qcow2 nebula1.xml
[[email protected] data]# mount -t nfs 192.168.119.7:/data /home/images
[[email protected] data]# mv /data/nebula1.qcow2 /home/images/
[[email protected] ~]# mount -t nfs 192.168.119.7:/data /home/images/
And then nfs View on the host
[[email protected] data]# ll -h
total 1.7G
-rw-------. 1 107 107 11G May 6 2021 nebula1.qcow2
qemu Put in UID Namely 107
Install on the first host kvm virtual machine
[[email protected] data]# virt-install --virt-type kvm --os-type=linux --name web01 --memory 1024 --vcpus 1,maxvcpus=10 --cdrom=/home/iso/CentOS-7-x86_64-Minimal-1708.iso --disk /home/images/web01.qcow2,size=10 --network bridge=virbr0 --graphics vnc,listen=0.0.0.0 --noautoconsole --check disk_size=off
Starting install...
Allocating 'web01.qcow2' | 10 GB 00:00:00
Domain installation still in progress. You can reconnect to the console to complete the installation process.
View the disk file on the second host , prove nfs Shared storage succeeded
[[email protected] ~]# ls /home/images/
nebula1.qcow2 web01.qcow2
Do it on two hosts host analysis , Add the following
192.168.119.146 kvm
192.168.119.129 backup
And then in kvm Do the migration above , Check again virsh list,kvm The virtual machines are gone , Moved to backup Up there
[[email protected] data]# virsh migrate --live --verbose web01 qemu+ssh://192.168.119.129/system --unsafe
Parameter interpretation :
migrate Migration means
- -live Running state migration
- -verbose Which one to migrate Kvm virtual machine
qemu+ssh://192.168.119.129/system qemu+ssh authentication ,IP by backup Of IP
- -unsafe This parameter must be added , Otherwise, it will report a mistake , Do not allow migration
边栏推荐
- Interpretation of QT keypressevent
- Section 3 - functions
- Dynamic and static libraries
- QT client development -- driver loading problem of connecting to MySQL database
- Redis plus instructions
- Section 6 - pointers
- C language learning log 2.19
- String()和toString()方法得区别
- 详解OpenCV的函数cv::add(),并附各种情况的示例代码和运行结果
- Shell variable learning notes
猜你喜欢
行情绘图课程大纲1-基础知识
File descriptorfile description
Chapter 18 pagination: Introduction
Advanced C language - Section 1 - data storage
C language learning log 12.5
Small project - household income and expenditure software (1)
QT signal is automatically associated with the slot
Advanced C - Section 3 - character functions and string functions
metaRTC4.0稳定版发布
QT client development -- driver loading problem of connecting to MySQL database
随机推荐
Binary search and binary answer
Metaltc4.0 stable release
List collection concurrent modification exception
Simple greedy strategy
Differences between string() and tostring() methods
Pycharm错误解决:Process finished with exit code -1073741819 (0xC0000005)
Case - the list set stores student objects and traverses them in three ways
Case -- the HashSet set stores the student object and traverses
行情绘图课程大纲1-基础知识
COAP protocol libcoap API
Small project - household income and expenditure software (1)
Clause 32: moving objects into closures using initialization capture objects
Advanced C language - Section 1 - data storage
【线程/多线程】线程的执行顺序
Modification and analysis of libcoap source code by Hongmeng device discovery module
Violence enumeration~
Clause 26: avoid overloading universal reference types
Redis plus instructions
Robot pose description and coordinate transformation
MySQL8.0.13安装教程(有图)