Ask Your Question

resize instance - ssh warning

asked 2015-03-27 09:37:18 -0500

Dorin Huzum gravatar image


I'm trying to resize an instance (boot horizon and cli) and I have the following error:

ERROR (InstanceInErrorState): Unexpected error while running command.
Command: ssh mkdir -p /var/lib/nova/instances/6a11c0be-c19f-4889-be48-2a181fa03904
Exit code: 1
Stdout: u''
Stderr: u"Warning: Permanently added '' (ECDSA) to the list of known hosts.\r\n"

I have modified the /etc/ssh/ssh_config

Host *
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    LogLevel ERROR

If I run the command from console (under user nova) I don't have any error.


edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2015-03-27 10:20:34 -0500

mpetason gravatar image

How many compute nodes do you have? It's trying to copy over the data to another server. You can move around SSH keys and allow the nodes to connect to each other, or if you have 1 node as a compute you just need to modify the "allow_resize_to_same_host" option in nova.conf:

allow_resize_to_same_host = False   (BoolOpt) Allow destination machine to match source for resize. Useful when testing in single-host environments.

Change this to True, restart nova services, attempt to resize again. If you are resizing down to a smaller flavor then you'll probably run into errors again when the disk size is smaller than the original size.

If you have multiple compute nodes then you can look into setting up migrations, which should help with this issue:

edit flag offensive delete link more

answered 2015-05-24 02:05:31 -0500

Ashish Chandra gravatar image

make sure your nova user has appropriate shell set, if not run:

usermod -s /bin/bash nova

Now generate SSH keys using "nova" users.

su - nova ssh-keygen -t rsa

Save the key without a passphrase.

Next up we need to configure SSH to not do host key verification, unless you want to manually SSH to all compute nodes that exist and accept the key

cat << EOF > ~/.ssh/config
Host *
    StrictHostKeyChecking no

Next we need to make sure we copy the the contents of to authorized_keys and set the mode on it correctly

cat ~/.ssh/ > .ssh/authorized_keys
chmod 600 .ssh/authorized_keys

Now comes the important part, you will need to tar up and copy the ~nova/.ssh directory to every single compute node you have provisioned. This way all compute nodes will be able to SSH to the remote host to run the commands required to copy an instance over, and resize it.

edit flag offensive delete link more


Hi Ashish,

I am facing the same issue when I am trying to resize or migrate a VM. I have set the nova users to /bin/bash in controller and compute nodes and configured SSH to not do host key verification but still I am facing the same issue.
I have already done passwordless authentication.

abhishek-talwar gravatar imageabhishek-talwar ( 2015-06-16 02:39:12 -0500 )edit

What can we do more to get it working ? Kindly reply as soon as possible. I have been stuck on the issue from sometime.


abhishek-talwar gravatar imageabhishek-talwar ( 2015-06-16 02:39:27 -0500 )edit

answered 2015-03-27 11:44:52 -0500

Dorin Huzum gravatar image


I have: 1 network, 1 management and 2 compute.

I try to run the command from the management node. I get the some error if I try from the compute node where the instance reside.

My impression is that nova is not reading ssh_config when is executing the command, because if I try from command line I don't get the ssh message.

PS: I have ssh keys moved around and is not a communication issue. I want to eliminate the warning message.

edit flag offensive delete link more


You need to make sure that Nova is aware of the host on all nodes the and make sure it's able to login without prompting. Look into configuring migrations without shared storage.

mpetason gravatar imagempetason ( 2015-03-27 11:48:55 -0500 )edit

Like I said:

If I run the command from console (under user nova) I don't have any error. The command being:

ssh mkdir -p /var/lib/nova/instances/6a11c0be-c19f-4889-be48-2a181fa03904
Dorin Huzum gravatar imageDorin Huzum ( 2015-03-27 12:03:36 -0500 )edit

Did you restart sshd after you modified the configuration?

mpetason gravatar imagempetason ( 2015-03-27 15:13:52 -0500 )edit

yes I did.

Dorin Huzum gravatar imageDorin Huzum ( 2015-03-27 17:14:18 -0500 )edit

I manage to fix the issue. The problem was with the shell for nova user on computing nodes. I changed to /bin/bash and it's working.

Dorin Huzum gravatar imageDorin Huzum ( 2015-03-27 19:56:26 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-03-27 09:37:18 -0500

Seen: 3,576 times

Last updated: May 24 '15