View the running status of OpenStack
Nova Service-list
+------------------+-------------------------------------+--------------------+---------+-------+-------------- --------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------------------------------+--------------------+---------+-------+-------------- --------------+-----------------+
| Nova-scheduler | controller-127022.sh.xxx.com | Internal | Enabled | Up | 2015-09-07t07:22:08.000000 | - |
| Nova-conductor | controller-127022.sh.xxx.com | Internal | Enabled | Up | 2015-09-07t07:22:14.000000 | - |
| Nova-cert | controller-127022.sh.xxx.com | Internal | Enabled | Up | 2015-09-07t07:22:14.000000 | - |
| Nova-consoleauth | controller-127022.sh.xxx.com | Internal | Enabled | Up | 2015-06-29t10:40:03.000000 | - |
| Nova-console | controller-127022.sh.xxx.com | Internal | Enabled | Up | 2015-09-07t07:22:16.000000 | - |
| Nova-compute | compute-127041.sh.xxx.com | Nova | Enabled | Up | 2015-09-07t07:22:08.000000 | None |
| Nova-compute | compute-127054.sh.xxx.com | Develop-zone | Enabled | Up | 2015-09-07t07:22:09.000000 | None |
View the cloud host information under a tenant
SOURCE Keystonerc_qa
Nova List
+--------------------------------------+----------------------------------------+--------+------------+-------- -----+-----------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------------------------------+--------+------------+-------- -----+-----------------------------+
| 8E60FE41-90A8-4D54-A506-BDC37F97F3BB | xindatabase-agiqm.xxx.com | ACTIVE | - | Running | qa_net=10.197.11.13 |
| 1075b361-5ca3-4e23-837f-0edbbb780e68 | xindatabase-gsyi5.xxx.com | ACTIVE | - | Running | qa_net=10.197.11.12 |
View Cloud host information under all tenant
SOURCE Keystonerc_admin
Nova List--all-tenants
KeyFile file
Cat Keystonerc_admin
Export Os_username=admin
Export Os_tenant_name=admin
Export Os_password=openstack_pass
Export os_auth_url=http://keystone_ip:5000/v2.0/
Export ps1= ' [\[email protected]\h \w (keystone_admin)]\$ '
View Flavor
Nova Flavor-list
+--------------------------------------+-----------------+-----------+------+-----------+------+-------+------- ------+-----------+
| ID | Name | MEMORY_MB | Disk | Ephemeral | Swap | Vcpus | Rxtx_factor | Is_public |
+--------------------------------------+-----------------+-----------+------+-----------+------+-------+------- ------+-----------+
| 989f6219-3231-45b5-bcfd-daf87ac07705 | 8core-16g | 16384 | 40 | 0 | 2048 | 8 | 1.0 | True |
| 9bb5f019-0c7c-41fc-a3ed-e6e44413a3d3 | 8core-32g | 32768 | 40 | 0 | 2048 | 8 | 1.0 | True |
View image
Nova Image-list
+--------------------------------------+-------------------------------------------------+--------+------------ --------------------------+
| ID | Name | Status | Server |
+--------------------------------------+-------------------------------------------------+--------+------------ --------------------------+
| 04135fe1-14d8-4480-a638-189ed93ea620 | Centos5.8 | ACTIVE | |
| F87f65e3-24ff-44c0-8858-9662334679e4 | Centos6.3 | ACTIVE | |
| 764b2022-0ecf-4013-b68a-898e9c31fb46 | Centos6.6 | ACTIVE | |
| 3043d3e7-c565-44c1-ad5d-8efcb5e3bfe1 | Centos6.5 | ACTIVE | |
View Network
Neutron net-list
+--------------------------------------+------------+------------------------------------------------------+
| ID | name | Subnets |
+--------------------------------------+------------+------------------------------------------------------+
| 0007150e-b600-4ea6-841d-79261bf10af8 | qa_net | Ecc5f5a4-1fd7-4428-9351-6809ada3ad08 10.197.160.0/19 |
View Zone
Nova Aggregate-list
+----+---------------+--------------------+
| Id | Name | Availability Zone |
+----+---------------+--------------------+
| 1 | Qa-zone | Qa-zone |
View the physical host under zone
Nova Aggregate-details Qa-zone
+----+---------------+--------------------+----------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -+----------------------------------------+
| Id | Name | Availability Zone | Hosts &NBS P , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp &NBSp | Metadata |
+----+---------------+--------------------+-------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------+- ---------------------------------------+
| 5 | Nghai-temp | Nghai-temp-zone | ' compute-127106.xx.com ', ' compute-127107.xx.com ', ' compute-127108.xx.com ', ' compute-127109.xx.com ', ' Compute-127110.xx.com ', ' compute-127111.xx.com ', ' compute-127112.xx.com ', ' compute-127113.xx.com ' | ' Availability_zone=qa-zone ' |
+----+---------------+--------------------+-------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ----------------------------
Create and launch a cloud host named ADAMS_TEST_VM
Default creation
Nova boot--flavor 2core-8g--image Centos6.6--security_group default--nic net-id= D107fe05-0fe9-4fea-9325-4cf2d0825101 ADAMS_TEST_VM
Specify to create a physical host and modify the password
Nova boot--flavor 2core-8g--image Centos6.6--security_group default--nic net-id= d107fe05-0fe9-4fea-9325-4cf2d0825101--availability-zone qa-nova:compute-127073.xxx.com adams_test_vm--user-data. /passwd.sh--poll
Passwd.sh content is as follows:
#!/bin/bash
echo Qwe123qwe | passwd--stdin Root
View the Mirror list
Nova Image-list
+--------------------------------------+-------------------------------------------------+--------+-------- ------------------------------+
| ID | Name | Status | Server |
+--------------------------------------+-------------------------------------------------+--------+-------- ------------------------------+
| 0c47db9c-5f74-4544-8ada-0894c1d2c20c | Win7 | ACTIVE | |
Download Win7 image
Glance image-download 0c47db9c-5f74-4544-8ada-0894c1d2c20c--file Win7
Upload Win7 image
Glance image-create--name Win7--disk-format qcow2--file/root/win7--container-format bare--is-public True
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| Checksum | EAA3A3A6DFE605F6292675018D41AFDF |
| Container_format | Bare |
| Created_at | 2015-10-30t02:50:47 |
| deleted | False |
| Deleted_at | None |
| Disk_format | Qcow2 |
| ID | 9a3a7dcd-66e0-4f99-bf88-25db6ba236b5 |
| Is_public | True |
| Min_disk | 0 |
| Min_ram | 0 |
| name | Win7 |
| Owner | 9caea2d0691644f1af63341a953d1462 |
| protected | False |
| Size | 3547856896 |
| Status | active |
| Updated_at | 2015-10-30t02:51:44 |
| Virtual_size | None |
+------------------+--------------------------------------+
OpenStack I version common commands