我家里的网络是 无线路由+猫, 我自己机器的私网地址 是192.168.1.101, 在虚拟机中 配置好IP 为 192.168.1.102
vim /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
post-up ifconfig dummy0 0.0.0.0
address 192.168.1.102
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
dns-search stackops.org
重启网络 : /etc/init.d/networking restart
4. 配置DNS:
配置在这个地方 restart vm 也不失效
vi /etc/resolvconf/resolv.conf.d/base
nameserver 192.168.1.1
5. 更新 OS:
apt-get update
6. 安装open-ssl:
安装这个东东主要的为了通过desktop 使用 SecureCRT 访问 vm
$ sudo aptitude install openssh-server
$ /etc/init.d/ssh restart
7. 安装 git
apt-get install git
8. 使用devstack 安装openstack
a. cd /opt
b. git clone git://github.com/openstack-dev/devstack.git
c. create a file named localrc, apend followings to this file
root@mystack:/opt/devstack# nova list
+--------------------------------------+--------+--------+------------------+
| ID | Name | Status | Networks |
+--------------------------------------+--------+--------+------------------+
| 88013d9e-20b3-41d7-a699-f1752af91755 | xhuvm1 | ACTIVE | private=10.0.0.2 |
+--------------------------------------+--------+--------+------------------+
root@mystack:/opt/devstack#
a. run screen -list , kill -9 杀死所有的 screen session
b. run restart_stack.sh
c. check all services
root@mystack:/opt/devstack# nova-manage service list
Binary Host Zone Status State Updated_At
nova-conductor mystack nova enabled :-) 2012-12-31 14:01:27
nova-cert mystack nova enabled :-) 2012-12-31 14:01:27
nova-compute mystack nova enabled :-) 2012-12-31 14:01:27
nova-scheduler mystack nova enabled :-) 2012-12-31 14:01:26
nova-consoleauth mystack nova enabled :-) 2012-12-31 14:01:27
nova-network mystack nova enabled :-) 2012-12-31 14:01:26
4. all services 的日志配置
a. 创建日志目录:mkdir -p /var/log/nova
b. 在/etc/nova/nova.conf 加上 “ logdir=/var/log/nova”
c. 重启service
遗留的问题:
run restart_stack.sh重启了 service 以后, dashboard 不能登陆, 不过CLI 都能工作,其实我基本也不用dashboard.