In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how the kilo version of openstack to achieve dynamic hot migration of CVMs, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!
I. background
Kilo version of openstack, ceph used for backend storage
Before modifying the configuration
Log in to dashboard as admin, perform hot migration of instances, and migrate test1 instances
Although it shows that the machine is being migrated, it is found that the machine still belongs to bdc216 after a short time, and the migration is not successful.
Second, modify the configuration
The id of test1 is:
2907c778-3e30-4012-ab2c-ab43dcca1ea0
Go to the machine and find the configuration file directory of test1:
# cd / var/lib/nova/instances/ [root@bdc216 instances] # ls0a287498-27a9-4755-ac70-afb4d6c0151b 2907c778-3e30-4012-ab2c-ab43dcca1ea0 _ base compute_nodes locks
Use the instance id as the directory and enter the modified directory
# cd 2907c778-3e30-4012-ab2c-ab43dcca1ea0/# lsconsole.log libvirt.xml
It contains the configuration file of the instance, which is actually the xml configuration file of kvm.
2.1 Migration conditions
OpenStack calls the underlying libvirt to complete the dynamic migration. The migration of virtual machines is actually the transfer of data. Libvirt provides a tunneled data transfer (libvirt tunnelled transport) mode to complete data transfer.
Check two compute nodes
Is the transmission channel between 216 and 218 connected?
Execute on 216:
# virsh-c qemu+tcp://bdc218/systemerror: failed to connect to the hypervisorerror: unable to connect to server at 'bdc218:16509': Connection refused
It turns out it's not connected.
Modify the configuration file of libvirt
# vi / etc/sysconfig/libvirtd release comment LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.confLIBVIRTD_ARGS= "--listen"
Modify / etc/libvirt/libvirtd.conf
# vi / etc/libvirt/libvirtd.conf listen_tls = 0listen_tcp = 1 tcp_port = "16509" listen_addr = "0.0.0.0" auth_tcp = "none"
If you open the firewall, you have to open port 16509.
Restart the service:
# systemctl restart libvirtd# systemctl status libvirtd ● libvirtd.service-Virtualization daemon Loaded: loaded (/ usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2016-07-29 11:52:49 CST 5s ago Docs: man:libvirtd (8) http://libvirt.org Main PID: 24396 (libvirtd) CGroup: / system.slice/libvirtd.service └─ 24396 / usr/sbin/libvirtd-- listenJul 29 11:52:49 bdc218 systemd [1]: Starting Virtualization daemon...Jul 29 11:52:49 bdc218 systemd [1]: Started Virtualization daemon.
Switch to 216 machine and connect again
[root@bdc216 instances] # virsh-c qemu+tcp://bdc218/systemWelcome to virsh, the virtualization interactive terminal.Type: 'help' for help with commands' quit' to quitvirsh #
Connection successful.
Hot migration of instance again
Check again and find that the host has been displayed as bdc218
2.2 further testing
Add two CVMs: test3 and test4
View the current page situation
Now there is only one CVM on 216. Check
[root@bdc216 ~] # cd / var/lib/nova/instances/ [root@bdc216 instances] # ls0a287498-27a9-4755-ac70-afb4d6c0151b _ base compute_nodes locks [root@bdc216 instances] # virsh list Id Name State--- 2 instance-00000002 running
Check 218:
[root@bdc218 instances] # ls1d27d243-4ad0-499e-8963-ccbf6096361c 7d070fdf-ec6f-4ae6-9de1-856739492b21 compute_nodes locks [root@bdc218 instances] # virsh list Id Name State--- 10 instance- 0000000a running 11 instance-00000009 running
Click on the dashboard page to migrate both virtual machines from 218s to 216s and view them after the migration is over.
218no more in instances directory and kvm
[root@bdc218 instances] # lscompute_nodes locks [root@bdc218 instances] # virsh list Id Name State
216It is found that the configuration files in the instances directory and the virtual machines in kvm have been migrated
[root@bdc216 instances] # ls0a287498-27a9-4755-ac70-afb4d6c0151b 1d27d243-4ad0-499e-8963-ccbf6096361c 7d070fdf-ec6f-4ae6-9de1-856739492b21 _ base compute_nodes locks [root@bdc216 instances] # virsh list Id Name State--- 2 Instance-00000002 running 9 instance-0000000a running 10 instance-00000009 running
Final page check
The above is all the contents of the article "how to achieve dynamic hot migration of kilo openstack". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.