apt-get install -y nova-api nova-cert nova-common nova-compute nova-compute-kvm nova-doc nova-network nova-objectstore nova-scheduler nova-volume Python-nova python-novaclient nova-consoleauth python-novnc novnc
2:配置 /etc/nova/nova.conf
把nova.conf 原来的内容删除掉。直接贴下面内容。重点需要注意的是,
如果你是在虚拟机里测试Openstack。你需要把默认的虚拟化引擎从kvm改成qemu。
nova的配置,等下再补上。
[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
allow_admin_api=true
use_deprecated_auth=false
auth_strategy=keystone
scheduler_driver=nova.scheduler.simple.SimpleScheduler
s3_host=172.16.10.6
ec2_host=172.16.10.6
rabbit_host=172.16.10.6
cc_host=172.16.10.6
nova_url=http://172.16.10.6:8774/v1.1/
routing_source_ip=172.16.10.6
glance_api_servers=172.16.10.6:9292
image_service=nova.image.glance.GlanceImageService
iscsi_ip_prefix=10.10.10
sql_connection=mysql://nova:password@172.16.10.6/nova
ec2_url=http://172.16.10.6:8773/services/Cloud
keystone_ec2_url=http://172.16.10.6:5000/v2.0/ec2tokens
api_paste_config=/etc/nova/api-paste.ini
libvirt_type=kvm
libvirt_use_virtio_for_bridges=true
start_guests_on_host_boot=true
resume_guests_state_on_host_boot=true
novnc_enable=true
novncproxy_base_url=http://172.16.10.6:6080/vnc_auto.html
vncserver_proxyclient_address=127.0.0.1
vncserver_listen=127.0.0.1
network_manager=nova.network.manager.FlatDHCPManager
public_interface=eth0
flat_interface=eth1
flat_network_bridge=br0
floating_range=172.16.10.32/27
flat_injected=False
force_dhcp_release=true
iscsi_helper=tgtadm
connection_type=libvirt
root_helper=sudo nova-rootwrap
verbose=False
3:配置/etc/nova/api-paste.ini
也是修改文件最后3行,
admin_tenant_name = %SERVICE_TENANT_NAME%
admin_user = %SERVICE_USER%
admin_password = %SERVICE_PASSWORD%
改成
admin_tenant_name = admin
admin_user = admin
admin_password = admin
4:停止和重启nova相关服务
for a in libvirt-bin nova-network nova-compute nova-api nova-objectstore nova-scheduler novnc nova-volume nova-consoleauth; do service "$a" restart; done
5:同步数据库
nova-manage db sync
没有任何输出,就表示正常。
6:创建网络
nova-manage network create private --fixed_range_v4=10.10.10.32/27 --num_networks=1 --bridge=br100 --bridge_interface=eth1 --network_size=32
nova-manage floating create --ip_range=172.16.10.32/27
检查nova服务
nova-manage service list
看到这样,就表示你的nova服务正常。