Openstack Nova Migrate Error SSH Key
ERROR oslo_messaging.rpc.server ResizeError: Resize error: not able to execute ssh command: Unexpected error while running command.
ERROR oslo_messaging.rpc.server Command: ssh -o BatchMode=yes <compute_host_address> mkdir -p /var/lib/nova/instances/<instance-id>It’s possible for you to get those errors while you migrate your instance from one host (hypervisor/compute) to another host (hypervisor/compute). Those errors appears because by default nova service create user nova on system for Daemons only with nologin.
nova:x:162:162:OpenStack Nova Daemons:/var/lib/nova:/sbin/nologinThen, while nova migrate command working, source host (hypervisor/compute) will do an ssh onto destination host for some of nova works. To solve this problem, we had to copy ssh-credential across compute host.
- Run setenforce 0 to put SELinux into permissive mode.
- Enable login abilities for the nova user:
# usermod -s /bin/bash nova - as root, give nova user password, for ssh-copy-id works later
# passwd novathen switch to nova account:# su nova - Generate ssh-key for nova user
$ ssh-keygen -t rsa - Repeat step 1-4 for all nova users in each compute nodes
- As nova user Copy SSH-Key to every compute nodes
$ ssh-copy-id <compute-nodes-destinations> - Try to ssh, it must be automatically login without password
$ ssh <compute-nodes-destinations>
Try for nova migrate again, and see for any further errors.
Comments