多计算节点instance resize

环境介绍:
服务器1:allinone(198)
服务器2:compute(197)
问题描述:
在allinone服务器上创建的instance resize都能成功;
但是在compute上的instance resize的时候报错!
Command:ssh 192.168.1.197mkdir -p /var/lib/nova/instances/eac03362-352f-45ad-b803-d28e988691be
Exit code: 255
Stdout: ”
Stderr: ‘Host key verification failed.\r\n’. Setting instance vm_state to ERROR

在所有计算节点上让nova用户有bash环境:
#usermod -s /bin/bash nova
在compute(197)上操作,切换到nova用户下;
#su nova
#cd ―切换用户后默认是在/root目录,需要回到nova自己的根目录下;
然后利用ssh-keygen来创建公钥和私钥;
#ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/nova/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/lib/nova/.ssh/id_rsa.
Your public key has been saved in /var/lib/nova/.ssh/id_rsa.pub.
The key fingerprint is:
d7:eb:e1:c1:10:23:ab:9b:cd:0a:fc:5a:ea:00:50:1d nova@NOVA1
The key’s randomart image is:
+�C[ RSA 2048]―-+
| ..E. |
| . . |
|. . o |
|. o + |
|. S o . |
| . . . . o . |
| . o o = |
| . = = o o |
| .+.=.o o |
+―――――�C+
$ ls /var/lib/nova/.ssh/
id_rsa id_rsa.pub 一个私钥;一个公钥
$ cp id_rsa.pub authorized_keys
然后把id_rsa和authorized_keys拷贝到其它计算节点上(198)!
$ scp /var/lib/nova/.ssh/id_rsa [email protected]:/var/lib/nova/.ssh/id_rsa
$ scp /var/lib/nova/.ssh/authorized_keys [email protected]:/var/lib/nova/.ssh/authorized_keys
在198上验证是否能登陆:
# chown nova:nova /var/lib/nova/.ssh/id_rsa /var/lib/nova/.
ssh/authorized_keys
切换nova用户!
# su nova
$ ssh 192.168.1.197
The authenticity of host ’192.168.1.197 (192.168.1.197)’ can’t be established.
RSA key fingerprint is da:ba:23:dd:8a:a1:de:f3:0c:66:ce:fd:48:2b:2c:e3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ’192.168.1.197′ (RSA) to the list of known hosts.
Last login: Fri Dec 20 16:56:01 2013 from 192.168.1.198
-bash-4.1$ exit
logout
Connection to 192.168.1.197 closed.
再回到控制台,更改compute上的instance,就不会报错了!

你可能感兴趣的:(节点,instance,resize,多计算)