OpenStack configure VM migrate nova SSH

Just a reminder for me :D.

Stolen from https://twiki.cern.ch/twiki/bin/view/Sandbox/GettingStartedwithOpenStack

$ usermod -s /bin/bash nova
$ su - nova
[email protected]:~$ mkdir -p -m 700 .ssh
[email protected]:~$ cat > .ssh/config <<EOF
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
EOF
[email protected]:~$ ssh-keygen -f id_rsa -b 1024 -P ""
[email protected]:~$ scp /var/lib/nova/.ssh/id_rsa.pub [email protected]:/var/lib/nova/.ssh/authorized_keys
[email protected]:~$ scp /var/lib/nova/.ssh/id_rsa.pub [email protected]:/var/lib/nova/.ssh/authorized_keys
[email protected]:~$ scp /var/lib/nova/.ssh/* [email protected]:/var/lib/nova/.ssh/

Repeat the process if needed for more compute nodes. Go back as root:

$ sudo chown -R nova:nova /var/lib/nova/
$ sudo chmod 700 /var/lib/nova/.ssh
$ sudo chmod 600 /var/lib/nova/.ssh/authorized_keys

Test:

[email protected]:~$ ssh [email protected] ls
buckets
CA
images
instances
keys
networks
nova.sqlite
tmp

Comments