notify_on_state_change = vm_and_task_state
notification_driver = nova.openstack.common.notifier.rpc_notifier compute_scheduler_driver=nova.scheduler.simple.SimpleScheduler [hyperv] [zookeeper] [osapi_v3] [conductor] [keymgr] [cells] [database]
sql_connection=mysql://nova:nova@192.168.1.2/nova [image_file_url] [baremetal] [rpc_notifier2] [matchmaker_redis] [ssl]
[trusted_computing] [upgrade_levels] [matchmaker_ring] [vmware] [spice]
[keystone_authtoken] auth_host = 192.168.1.2 auth_port = 35357 auth_protocol = http admin_user = nova
admin_tenant_name = service admin_password = service
因上管理节点nova.conf配置文件中修改了instances实例存放的位置,还需要作一下操作:
修改路径,设置目录权限:
[root@node ~]# cp -r /var/lib/nova/ /openstack/lib/
[root@node ~]# chown -R nova:nova /openstack/lib/nova/
(3).启动nova相关服务,设置开机自启动 [root@node ~]# service messagebus start [root@node ~]# chkconfig messagebus on
[root@node ~]# service openstack-nova-compute start [root@node ~]# service openstack-nova-network start [root@node ~]# chkconfig openstack-nova-compute on [root@node ~]# chkconfig openstack-nova-network on
*******************************************************************************************
OpenStack其他常用命令:
1.list nova服务,包含管理节点和计算节点 [root@openstack ~]# nova service-list
+------------------+-------------+----------+---------+-------+----------------------------+-----------------+ | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------+----------+---------+-------+----------------------------+-----------------+ | nova-cert | openstack | internal | enabled | up | 2014-03-31T08:59:50.000000 | - |
| nova-consoleauth | openstack | internal | enabled | up | 2014-03-31T08:59:54.000000 | - |
| nova-scheduler | openstack | internal | enabled | up | 2014-03-31T08:59:48.000000 | - |
| nova-conductor | openstack | internal | enabled | up | 2014-03-31T08:59:52.000000 | - |
| nova-compute | openstack | nova | enabled | up | 2014-03-31T08:59:56.000000 | - |
| nova-compute | node | nova | enabled | up | 2014-03-31T08:59:53.000000 | - |
| nova-network | openstack | internal | enabled | up | 2014-03-31T08:59:50.000000 | - |
| nova-network | node | internal | enabled | up | 2014-03-31T08:59:56.000000 | - |
| nova-scheduler | node | internal | enabled | up | 2014-03-31T08:59:52.000000 | - |
2.查看计算节点:
[root@node ~]# nova hypervisor-list +----+---------------------+ | ID | Hypervisor hostname | +----+---------------------+ | 1 | openstack | | 2 |node | +----+---------------------+
3.查看虚拟机模板配置:
[root@node ~]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+ | 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True | | 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | | 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | | 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+