Jul 232012
 

整理一下别人装好Openstack的nova.conf 文件,日后方便自己查看。

这是我用puppet安装Openstack的nova.conf 文件,参数真的很少。值得学习

控制节点的IP是15,计算节点是16

[DEFAULT]
state_path=/var/lib/nova
public_interface=eth0
dhcpbridge=/usr/bin/nova-dhcpbridge
fixed_range=10.1.0.0/16
image_service=nova.image.glance.GlanceImageService
dhcpbridge_flagfile=/etc/nova/nova.conf
connection_type=libvirt
flat_injected=false
use_deprecated_auth=false
glance_api_servers=10.1.199.15:9292
service_down_time=60
vnc_enabled=true
vncserver_proxyclient_address=10.1.199.15
rabbit_port=5672
verbose=false
logdir=/var/log/nova
rabbit_virtual_host=/
sql_connection=mysql://nova:openstack@10.1.199.15/nova
novncproxy_base_url=http://10.1.199.15:6080/vnc_auto.html
rabbit_password=openstack
lock_path=/var/lock/nova
vncserver_listen=10.1.199.15
rabbit_userid=openstack
rabbit_host=10.1.199.15
root_helper=sudo nova-rootwrap
api_paste_config=/etc/nova/api-paste.ini
force_dhcp_release=true
flat_interface=eth1
multi_host=True
send_arp_for_ha=True
auth_strategy=keystone
flat_network_bridge=br100
network_manager=nova.network.manager.FlatDHCPManager
libvirt_type=kvm

计算节点

[DEFAULT]
state_path=/var/lib/nova
public_interface=eth0
dhcpbridge=/usr/bin/nova-dhcpbridge
fixed_range=10.1.0.0/16
image_service=nova.image.glance.GlanceImageService
dhcpbridge_flagfile=/etc/nova/nova.conf
connection_type=libvirt
flat_injected=false
use_deprecated_auth=false
glance_api_servers=10.1.199.15:9292
service_down_time=60
vnc_enabled=true
vncserver_proxyclient_address=10.1.199.16
rabbit_port=5672
verbose=false
logdir=/var/log/nova
rabbit_virtual_host=/
sql_connection=mysql://nova:openstack@10.1.199.15/nova
novncproxy_base_url=http://10.1.199.15:6080/vnc_auto.html
rabbit_password=openstack
lock_path=/var/lock/nova
vncserver_listen=10.1.199.16
rabbit_userid=openstack
rabbit_host=10.1.199.15
root_helper=sudo nova-rootwrap
api_paste_config=/etc/nova/api-paste.ini
force_dhcp_release=true
flat_interface=eth1
multi_host=True
send_arp_for_ha=True
auth_strategy=keystone
flat_network_bridge=br100
network_manager=nova.network.manager.FlatDHCPManager
libvirt_type=kvm

 

2012年9月21日,这是devstack脚本安装完的nova.conf, 没使用quantum

 

[DEFAULT]
verbose=True
auth_strategy=keystone
allow_resize_to_same_host=True
rootwrap_config=/etc/nova/rootwrap.conf
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
dhcpbridge_flagfile=/etc/nova/nova.conf
fixed_range=192.168.22.0/24
s3_host=10.1.199.8
s3_port=3333
network_manager=nova.network.manager.FlatDHCPManager
public_interface=br100
vlan_interface=eth0
flat_network_bridge=br100
flat_interface=eth1
osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
my_ip=10.1.199.8
sql_connection=mysql://root:password@localhost/nova?charset=utf8
libvirt_type=kvm
libvirt_cpu_mode=none
instance_name_template=instance-%08x
novncproxy_base_url=http://10.1.199.8:6080/vnc_auto.html
xvpvncproxy_base_url=http://10.1.199.8:6081/console
vncserver_listen=127.0.0.1
vncserver_proxyclient_address=127.0.0.1
api_paste_config=/etc/nova/api-paste.ini
image_service=nova.image.glance.GlanceImageService
ec2_dmz_host=10.1.199.8
rabbit_host=localhost
rabbit_password=password
glance_api_servers=10.1.199.8:9292
force_dhcp_release=True
state_path=/opt/stack/data/nova
instances_path=/opt/stack/data/nova/instances
logging_context_format_string=%(asctime)s %(color)s%(levelname)s %(name)s [^[[01;36m%(request_id)s ^[[00;36m%(user_name)s %(project_name)s%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_default_format_string=%(asctime)s %(color)s%(levelname)s %(name)s [^[[00;36m-%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_debug_format_suffix=^[[00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d^[[00m
logging_exception_prefix=%(color)s%(asctime)s TRACE %(name)s ^[[01;35m%(instance)s^[[00m
volume_api_class=nova.volume.cinder.API
compute_driver=libvirt.LibvirtDriver
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
enabled_apis=ec2,osapi_compute,metadata

 

这是启用quantum安装

[DEFAULT]
verbose=True
auth_strategy=keystone
allow_resize_to_same_host=True
rootwrap_config=/etc/nova/rootwrap.conf
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
dhcpbridge_flagfile=/etc/nova/nova.conf
fixed_range=192.168.22.0/24
s3_host=10.1.199.8
s3_port=3333
network_api_class=nova.network.quantumv2.api.API
quantum_admin_username=quantum
quantum_admin_password=password
quantum_admin_auth_url=http://10.1.199.8:35357/v2.0
quantum_auth_strategy=keystone
quantum_admin_tenant_name=service
quantum_url=http://localhost:9696
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
linuxnet_interface_driver=
osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
my_ip=10.1.199.8
sql_connection=mysql://root:password@localhost/nova?charset=utf8
libvirt_type=kvm
libvirt_cpu_mode=none
instance_name_template=instance-%08x
novncproxy_base_url=http://10.1.199.8:6080/vnc_auto.html
xvpvncproxy_base_url=http://10.1.199.8:6081/console
vncserver_listen=127.0.0.1
vncserver_proxyclient_address=127.0.0.1
api_paste_config=/etc/nova/api-paste.ini
image_service=nova.image.glance.GlanceImageService
ec2_dmz_host=10.1.199.8
rabbit_host=localhost
rabbit_password=password
glance_api_servers=10.1.199.8:9292
force_dhcp_release=True
state_path=/opt/stack/data/nova
instances_path=/opt/stack/data/nova/instances
logging_context_format_string=%(asctime)s %(color)s%(levelname)s %(name)s [^[[01;36m%(request_id)s ^[[00;36m%(user_name)s %(project_name)s%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_default_format_string=%(asctime)s %(color)s%(levelname)s %(name)s [^[[00;36m-%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_debug_format_suffix=^[[00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d^[[00m
logging_exception_prefix=%(color)s%(asctime)s TRACE %(name)s ^[[01;35m%(instance)s^[[00m
volume_api_class=nova.volume.cinder.API
compute_driver=libvirt.LibvirtDriver
firewall_driver=nova.virt.firewall.NoopFirewallDriver
enabled_apis=ec2,osapi_compute,metadata

 

 

 

  11 Responses to “nova.conf 例子”

  1. 老师,这些参数都是什么意思啊,从哪里可以查到啊,麻烦您指点一下。

  2. 加油,嘿嘿

  3. 陈老师,向您请教一个问题。
    nova-manage network create private –fixed_range_v4=192.168.4.0/27
    –num_networks=1 –bridge=br100 –bridge_interface=eth0 –network_size=32
    既然这个命令已经向数据库里面写入了网络信息,
    那为什么还要在nova.conf配置文件中还要加入–fixed_range=192.168.4.0/27

    我很不理解,希望老师给以指点。

    • 肯定不是老师。
      你可以尝试一下,在nova.conf 里不加入这个参数,有可能也是没问题的。这个命令,会写入数据库,你去数据库里看看,就明白了。

  4. 陈老师,你好:
    请教你一个问题:网上的nova.conf中都有一个配置libvirt.xml.template文件的路径,但是我使用的是devstack脚本安装的,没有发现这个参数,当然也没用找到这个参数,我想找到类似的文件,对其进行修改。
    不知道devstack是如何设置这个文件的???

    • 没研究。nova.conf 有很多默认参数,如果没设置,他会直接使用默认设置。

  5. 陈老师,我用packstack搭好多节点的环境,现在实例也启动起来了,但是在外部用openstack网页访问vnc时,告诉我127.0.0.1无法访问,需要改哪些参数呀?

Leave a Reply to 孙程 Cancel reply

(required)

(required)