Openstack online migration configuration live-migration

Source: Internet
Author: User
Tags connection reset

Note: before configuring migration, make sure that the openstack platform is ready for use. This is to test the KVM platform.


1. machine:

Node1 is the control node 10.214.0.57

Node2 is the computing node 10.214.0.58

Node3 is the computing node 10.214.0.60

In the experiment phase, to avoid unnecessary troubles, disable the firewall of each node.

service ufw stop

View Firewall Status

service ufw status ufw stop/waiting

Make sure that the nodes can ping each other.

Ping each node.

Ping node1

Ping node2

Ping node3

2. Modify the Nova. conf of each node.

vim /etc/nova/nova.conf

-- Vncserver_proxyclient_address = 127.0.0.1

-- Vncserver_listen = 0.0.0.0

 

3. Configure NFS

On node1:

Apt-Get install nfs-kernel-Server

Reference link: https://help.ubuntu.com/community/SettingUpNFSHowTo

Add in/etc/exports

/Var/lib/NOVA/instances * (RW, sync, fsid = 0, no_root_squash)

Restart the NFS service:

/Etc/init. d/nfs-kernel-server restart

/Etc/init. d/idmapd restart

On node2 and node3:

We recommend that you delete all instances of the computing node before configuration. Otherwise, zombie instances may be generated.

Make sure that the computing node has the permission to run and search for directories.

Chmod o + x/var/lib/NOVA/instances

Add it to the/etc/fstab directory of the computing node

10.214.0.57:/var/lib/NOVA/instances NFS ults 0 0

Mount directory execution:

Mount-a-V

Check whether the directory is mounted successfully.

DF-K

10.214.0.57:/var/lib/nova/instances 949801984 31567872 870693888   4% /var/lib/nova/instances

You 'd better open the directory.

Ls-l


Set permissions on each computing node

Chmod 777/var/lib/NOVA/instances

This step is very important. Otherwise, permission issues may occur.

4. Modify libvirt on all computing nodes

Modify:

/Etc/libvirt/lib1_d. conf

Before: # listen_tls = 0

After: listen_tls = 0

 

Before: # listen_tcp = 1

After: listen_tcp = 1

Add: auth_tcp = "NONE"

 

Modify:

/Etc/init/libvirt-bin.conf

Before: exec/usr/sbin/libmongod-d

After: exec/usr/sbin/libmongod-D-l

Modify:

/Etc/default/libvirt-bin

Before: libmongod_opts = "-d"

After: libjavasd_opts = "-D-l"

Modify:

/Etc/libvirt/qemu. conf

Remove the following three comments:

vnc_listen = “0.0.0.0″user = “root”group = “root”

Restart libvirt-bin

service libvirt-bin restart

Make sure that the process is started.

PS-Ef | grep libvirt

Are you sure you want:

Root 5277 1? 00:00:01/usr/sbin/libmongod-D-l

Restart the NOVA-compute service.

service nova-compute restart

The configuration is successful!

5. test:

Root @ node1 :~ # View instances in the Nova list

Root @ node1 :~ # NOVA show 11fd9622-a948-4cdb-94d0-d8f2558cf179 view the instance to be migrated

Root @ node1 :~ # View available computing nodes in the Nova-manage Service list

Root @ node1 :~ # Nova-manage Service describe_resource node2 view target node resources

Root @ node1 :~ # Nova live-migration 11fd9622-a948-4cdb-94d0-d8f2558cf179 node2 has been migrated successfully and should not be output.

6. Note: if a problem occurs, check the log file and analyze the cause of the Error Based on the log.

/Var/log/NOVA/nova-compute.log.

/Var/log/libvirt/lib1_d. Log

/Var/log/libvirt/qemu/instance-000000 *. Log (instance-000000 *. log is the specific instance you have started)

For example, in my nova-compute.log file:

If ret =-1: Raise libvirterror ('virdomaincreatewithflags () failed', dom = self)

2012-07-14 21:36:56 trace Nova. rpc. amqp libvirterror: unable to read frommonitor: Connection reset by peer

In instance-000000 *. log:

KVM:-drivefile =/var/lib/NOVA/instances/instance-00000039/disk, if = none, id = drive-virtio-disk0, format = qcow2, cache = none: cocould not open disk image/var/lib/NOVA/instances/instance-00000039/Disk: Permission denied.

This is because the NFS folder permission is set and/etc/libvirt/qemu. conf is set incorrectly.

 

 

References:

Shark article: http://www.chenshake.com/ubuntu-12-04-openstack-essex-installation-single-node/

Bo you about live-migrartion configuration: http://www.longgeek.com/2012/07/18/openstack-online-migrations/

Official documents: http://docs.openstack.org/essex/openstack-compute/install/yum/openstack-install-guide-essex.pdf

 
 
 
 
 
 
 
 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.