码迷,mamicode.com
首页 > 其他好文 > 详细

openstack常用命令

时间:2018-07-12 12:45:58      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:keystone   format   cpu   常用命令   镜像   download   sdn   flavor   bar   

  共享镜像 glance member-create fa47923c-2d3b-4d71-80cf-a047ba3bf342 eb3913b9ae5f41b09f2632389a1958d8
删除共享镜像 glance member-delete fa47923c-2d3b-4d71-80cf-a047ba3bf342 eb3913b9ae5f41b09f2632389a1958d8
列出私有镜像 glance image-list --is-public=False
列出公有镜像 glance image-list --is-public=True
镜像删除 glance image-delete 镜像ID
镜像上传 glance image-create --name=centos_7.4_x64_globalegrow --is-public=True --container-format bare --disk-format raw --property cloudinit_updated=True --property can_live_resize=Yes --property os_type=linux --property os_name=centos --file=centos_7.4_x64.img
glance image-create --name "镜像名字"  --file 镜像文件名字 --disk-format raw --container-format bare --is-public=False --property os_type=linux --property cloudinit_updated=True --owner 项目ID --progress
镜像下载 glance image-download --file test_image f1bffb27-340f-4b0b-bd62-310b49e22c5b
查看所有云主机 nova list --all
查看镜像所有云主机 nova list --image 5a34b656-ed38-4911-b494-82236f254a1b --all
查看某个项目下的所有云主机 nova list --all|grep 1ee16a3fb843411eb7c8b1201bd182d8
查看命名空间 ip netns
查看实例 nova flavor-list
创建实例 nova flavor-create --vcpus 1 --ram 1024 --disk 5 ram_type_1_1G_5G
列出用户 keystone user-list
列出租户 keystone tenant-list
获取ak sk keystone ec2-credentials-create --user-id 25b6d5fe34344e50a3c606e72deba23b --tenant-id ea1e8ebfb404454294ab16facb8ac287(项目ID)
查看单个实例的详细信息 nova show 50b6f7d5-ca78-423d-81c1-ad7671e6c07f
查看实例的生命过程 nova instance-action-list 50b6f7d5-ca78-423d-81c1-ad7671e6c07f
查看浮动ip列表 neutron floatingip-list
镜像格式转换 qemu-img convert -f qcow2 -O raw CentOS-7.3_x64.qcow2 centOS-7.3_x64.raw
https://blog.csdn.net/sinat_32079337/article/details/70245700 升级桌面
更改云主机状态、重启云主机 for i in `nova list --all --host compute23 | grep ERROR | awk ‘{print $2}‘`;do echo $i;nova reset-state $i;sleep 3;nova reboot $i --hard;done

在用U盘装完CentOS后,重新开机启动后显示: 
Initial setup of CentOS Linux 7 (core) 
1) [x] Creat user 2) [!] License information 
(no user will be created) (license not accepted) 
Please make your choice from above [‘q’ to quit | ‘c’ to continue | ‘r’ to refresh]: 
解决方法: 
输入“1”,按Enter键 
输入“2”,按Enter键 
输入“q”,按Enter键 
输入“yes”,按Enter键 
也就是出现如下情况。

openstack常用命令

标签:keystone   format   cpu   常用命令   镜像   download   sdn   flavor   bar   

原文地址:https://www.cnblogs.com/mylovelulu/p/9298007.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!