Nova相关命令收集
1. nova list
2. sudo nova-manage service list
8. 创建/删除浮动IP池
nova floating-ip-bulk-create 192.168.0.200/29
nova floating-ip-bulk-delete 192.168.0.200/29
-OR-
nova-manage floating create --pool nova --ip_range 192.168.0.0/24
nova-manage floating delete 192.168.0.0/24
7. 对于Tenant, 分配/回收浮动IP
nova floating-ip-create (需要注意此处是按数字顺序创建.1,2,3...)
nova floating-ip-delete 192.168.0.9
3. 绑定/解绑浮动IP与实例
nova floating-ip-associate f7ff6d3f-b998-45a7-b5f7-fd51963951e9 192.168.0.2
nova floating-ip-disassociate demo-instance1 192.168.0.1
4. 打开/关闭实例
nova start/stop demo-instance1
5. 查看实例位于哪一台宿主机
a. nova show demo-instance1, 结果中的hostid即为宿主机id号
b. cd /var/lib/nova/instances, 在计算节点上进入此文件夹,可以看到以实例id号命名的文件夹
6. nova host-list
7. 查看当前OpenStack版本号
nova-manage version
8. 创建/删除分配给实例的网段
nova network-create demo-net --bridge br100 --multi-host T --fixed-range-v4 172.52.17.0/24
sudo nova-manage network delete --uuid a5fc0a50-5cb9-4fd4-bd2e-89028f86ea6d
9. 查看所有compute node
nova hypervisor-list
10. 查看某台compute node下的所有实例
nova hypervisor-servers compute-01
11.
floating-ip-bulk-create -> floating-ip-create -> floating-ip-associate -> floating-ip-disassociate -> floating-ip-delete -> floating-ip-bulk-delete
12. 在指定节点上创建实例
nova boot --image 10ec9930-351a-4428-b736-8c533296c7f2 --flavor m1.medium --key_name abc --availability_zone nova:compute1.cloud.internal master
数据库同步:nova-manage db sync
查看错误日志:nova-manage logs errors