Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the openstack commands?

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "what are the openstack commands", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what are the openstack commands" this article?

1. Rabbitmq message queuing

View rabbitmq queues

Rabbitmqctl list_queues

Service

Rabbitmq-server

2. Keystone

Users who view keystone

Keystone user-list

View keystone endpoint

Keystone endpoint-list

View the role of keystone

Keystone role-list

View keystone services

Keystone service-list

View keystone tenants

Keystone tenant-list

Check the status of tenants

Keystone tenant-get ID

View keystone processes

Ps-ef | grep-I keystone-all

Check the log for errors

Grep ERROR / var/log/keystone/keystone.log

3. Glance

Upload image

Glance add name= "Ubuntu 12.04 cloudimg amd64" is_public=true container_format=ovf disk_format=qcow2

< /root/precise-server-cloudimg-amd64-disk1.img 查看image glance index nova 命令查看image nova image-list 查看image具体信息(ID是通过 glance index 查看获得) glance show ID 4. Nova 查看nova 服务 nova-manage service list 查看image nova image-list 4.1虚拟机 查看虚拟机,ID、Name、Status、Network nova list 删除虚拟机 nova delete ID 查看虚拟机配置种类 nova flavor-list 创建密钥 nova keypair-add oskey >

Oskey.priv

Chmod 600 oskey.priv

Create a virtual machine (a virtual machine for test)

Nova boot-- flavor 2-- key_name oskey-- image ea3ffba1-065e-483f-bfe2-c84184ee76be test1

4.2 flating IP

View the list of application flating IP

Nova floating-ip-list

Add floating IP to the virtual machine (id is the ID of the virtual machine, obtained through nova list)

Nova add-floating-ip 7eb1d4b3-13fa-4e39-be17-3a27eb0db218 10.1.199.33

Delete flating IP (ID is virtual machine ID, obtained through nova list)

Nova remove-floating-ip ID 10.1.199.33

4.3 Security Group

Security group related commands

Nova secgroup-add-rule default tcp 22 22 0.0.0.0/0

Nova secgroup-add-rule default icmp-1-1 0.0.0.0 Universe 0

Nova secgroup-list

Nova secgroup-list-rules default

4.4 complete process of creating a virtual machine

Nova keypair-add oskey > oskey.priv

Chmod 600 oskey.priv

Nova flavor-list

Nova image-list

Nova boot-- flavor 2-- key_name oskey-- image ea3ffba1-065e-483f-bfe2-c84184ee76be test1

Nova secgroup-add-rule default tcp 22 22 0.0.0.0/0

Nova secgroup-add-rule default icmp-1-1 0.0.0.0 Universe 0

4.5 Volume

Create a 10G volume

Nova volume-create-display_name "test volume" 10

Check the nova volume situation

Nova volume-list

Add volume to the virtual machine

(ID is the id of the virtual machine, followed by 1, which is the ID of volume.) after adding, you can view the result through nova volume-list.

Nova volume-attach 7eb1d4b3-13fa-4e39-be17-3a27eb0db218 1 / dev/vdc

Check the volume in the virtual machine (log in to the virtual machine)

Ubuntu @ test1: ~ $cat / proc/partitions

Major minor # blocks name

253 0 10485760 vda

253 1 10474380 vda1

253 16 20971520 vdb

253 32 10485760 vdc

Format Partition

Sudo mkfs.ext4 / dev/vdc

Sudo mkdir-p / mnt/volume

Sudo mount / dev/vdc / mnt/volume

Delete volume

Nova volume-detach VM_ID Volume_ID

Create a snapshot (you can view it through nova image-list after completion)

Nova image-create 7eb1d4b3-13fa-4e39-be17-3a27eb0db218 "snapshot 1"

4.6 NoVNC

Requests the noVNC console URL by command

Nova get-vnc-console myserver20 novnc

Check whether novnc is running

Netstat-ltunp | grep 6080

5. Various services are started

Synchronize the database:

Sudo nova-manage db sync

Start the control node service,:

For svc in keystone glance-api glance-registry nova-api nova-objectstore nova-volume nova-scheduler nova-cert nova-novncproxy; do sudo service openstack-$svc start; sudo chkconfig openstack-$svc on; done

Start the compute node service command:

For svc in compute network metadata-api; do sudo service openstack-nova-$svc start; sudo chkconfig openstack-nova-$svc on; done

View services:

Nova-manage service list above is all the contents of this article "what are the openstack commands?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report