Ask Your Question
0

Live Migration failure: operation failed: Failed to connect to remote libvirt URI qemu+tcp://compute2/system:authentication failed:No authentication callback available.

asked 2016-04-21 05:48:33 -0600

anonymous user

Anonymous

updated 2016-05-02 01:21:35 -0600

Working on Openstack Kilo on ubuntu server 14.04. Facing an issue in live migration using block migrate.

Error is: Live Migration failure: operation failed: Failed to connect to remote libvirt URI qemu+tcp://compute2/system:authentication failed:No authentication callback available.

I get a success message on horizon (openstack dashboard) but instance doesnt get migrated. Live migration with block migrate was performed on instance at compute1 to be migrated to compute2.

CONFIGURATION FILES:

/etc/nova/nova.conf :

[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
libvirt_use_virtio_for_bridges=True
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
enabled_apis=ec2,osapi_compute,metadata

rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.0.30.32
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 10.0.30.32
novncproxy_base_url = http://controller:6080/vnc_auto.html

network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
live_migration_retry_count = 30
#libvirt_type = kvm
#compute_driver = libvirt.LibvirtDriver
#allow_resize_to_same_host=True

debug = True

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = novauser
[oslo_messaging_rabbit]

rabbit_host = controller
rabbit_userid = openstack
rabbit_password = stackrabbit

[glance]
host = controller

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[neutron]
url = http://controller:9696
auth_strategy = keystone
admin_auth_url = http://controller:35357/v2.0
admin_tenant_name = service
admin_username = neutron
admin_password = neutronuser
[libvirt]
#added for live migration
live_migration_bandwidth = 0
live_migration_uri = qemu+tcp://%s/system
#connection_uri=qemu+tcp://%s/system
live_migration_flag = VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER, VIR_MIGRATE_LIVE, VIR_MIGRATE_TUNNELLED
block_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_NON_SHARED_INC, VIR_MIGRATE_LIVE
virt_type = kvm

/etc/libvirt/libvirtd.conf :

listen_tls = 0    
listen_tcp = 1    
# auth_tcp="none"

/etc/default/libvirt-bin:

# Defaults for libvirt-bin initscript (/etc/init.d/libvirt-bin)
# This is a POSIX shell fragment

# Start libvirtd to handle qemu/kvm:
start_libvirtd="yes"

# options passed to libvirtd, add "-l" to listen on tcp
#libvirtd_opts="-d"
#libvirtd_opts="-d -l"
libvirtd_opts="-d -l -f /etc/libvirt/libvirtd.conf"

# pass in location of kerberos keytab
#export KRB5_KTNAME=/etc/libvirt/libvirt.keytab

LOG FILES:

/var/log/nova/nova-compute.log [compute1]:

2016-04-21 12:33:45.039 2150 DEBUG oslo_concurrency.processutils [req-9731cbf7-46b5-4074-a53f-a6993f868d6e 3874aa8ef1a0488c85d269ced5cf6fd3 ea8ed6a98bd948889fa058fa6c29168a - - -] Running cmd (subprocess): env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/9091834f-b695-4198-9e9b-1b17c65807fb/disk execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:223
2016-04-21 12:33:45.090 2150 DEBUG oslo_concurrency.processutils [req-9731cbf7-46b5-4074-a53f-a6993f868d6e 3874aa8ef1a0488c85d269ced5cf6fd3 ea8ed6a98bd948889fa058fa6c29168a - - -] CMD "env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/9091834f-b695-4198-9e9b-1b17c65807fb/disk" returned: 0 in 0.052s execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:254
2016-04-21 12:33:45.091 2150 DEBUG oslo_concurrency.processutils [req-9731cbf7-46b5-4074-a53f-a6993f868d6e 3874aa8ef1a0488c85d269ced5cf6fd3 ea8ed6a98bd948889fa058fa6c29168a - - -] Running cmd (subprocess): env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/9091834f-b695-4198-9e9b-1b17c65807fb/disk execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:223
2016-04-21 12:33:45.142 2150 DEBUG oslo_concurrency.processutils [req-9731cbf7-46b5-4074-a53f-a6993f868d6e 3874aa8ef1a0488c85d269ced5cf6fd3 ea8ed6a98bd948889fa058fa6c29168a - - -] CMD "env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/9091834f-b695-4198-9e9b-1b17c65807fb/disk" returned: 0 in 0.051s execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:254
2016-04-21 12:33:45.179 2150 ...
(more)
edit retag flag offensive close merge delete

Comments

Few questions: 1) Can you ping the destination compute(check in /etc/hosts file)

2) Try setting auth_tcp="none"

3) you should be able to ssh from one compute to another compute as the nova user without any authentication. Did you do all those configurations ?

4) Is block-migration must ?

pjb gravatar imagepjb ( 2016-04-24 11:09:29 -0600 )edit

1)I am able to ping 2)On doing that the status of nova-compute is:"Disabled Reason:AUTO:Connection to libvirt lost:0" on horizon.Any idea why this happens? Thanks :) 3)Oh okay.Could u plz send me the link,the one I referred doesnt work 4)I have to perform migration but without any shared storage

nj gravatar imagenj ( 2016-04-25 03:17:34 -0600 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2016-05-03 00:00:41 -0600

pjb gravatar image

updated 2016-05-03 00:02:07 -0600

Sorry Mate for the late reply. I hope you got it fixed by now.

Nova user has no password, as the service is not interactive, it needs passwordless access to the compute nodes. To enable this create a .ssh directory in the Nova user’s home directory, its specified in the /etc/passwd file entry for nova.

1) Edit /etc/passwd to have the following:

nova:x:115:122::/var/lib/nova:/bin/bash

2) next you need to generate rsa keys for each node and assign those to every other node, so as the root user on every host do:

#su – nova
$pwd (should be in /var/lib/nova)
$mkdir .ssh
$chmod 700 .ssh
$cd .ssh
$ssh-keygen    – press “enter” for each prompt

3) Create an "authorized_keys" file and copy the id_rsa.pub from each host into each others authorized_keys file. So 3 hosts equals 3 entries for each host's authorized_keys file.

$chmod 600 authorized_keys  – make sure the authorized_keys file is read/write by nova only

Log into each host from every other host, if prompted to accept a key, do so!

$su - nova
$ssh nova@compute2
$ssh nova@compute1

Please let me know if you need any more clarification in any steps.

edit flag offensive delete link more

Comments

Heyyy Thanks for your reply :) I have a doubt here. While setting up openstack, nova user is assigned a password.But u have mentioned that nova user has not password. Also, When I perform,

su - nova

I am prompted to enter the nova password. After entering the password I get Authentication failure

nj gravatar imagenj ( 2016-05-03 03:24:30 -0600 )edit

Are you running the below command as root user?

su - nova

pjb gravatar imagepjb ( 2016-05-03 06:45:32 -0600 )edit
0

answered 2016-11-01 03:04:46 -0600

hi,

try using gemu+ssh instead of tcp..

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-04-21 05:48:33 -0600

Seen: 3,148 times

Last updated: May 03 '16