安装了DevStack环境之后,发现无法ping和ssh进DevStack自带image生成的instance。经过一番折腾之后,确定是由于公司的网络配置问题导致的,但也没有好的解决方案。
最后只好重新下了个ubuntu的image。干脆把步骤写下来,以防也有像我这样的新手碰到类似的问题。
1. 下载Ubuntu image http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
2. 生成新的image: glance image-create --name=newImage --disk-format=qcow2 --container-format=bare <~/tmp/precise-server-cloudimg-amd64-disk1.img
3. 添加 keypair. 这个是必须的,因为现在OpenStack安全措施更加严格: nova keypair-add test > test.pem;chmod 600 test.pem
4. 生成新的 instance: nova boot --imagenewImage --key_name test --flavor m1.large newVM
5. 现在就可以ssh进VM了: nova ssh --private newVM -i test.pem