Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.02 KB | None | 0 0
  1. root@node-6:~# nova availability-zone-list
  2. +-----------------------+----------------------------------------+
  3. | Name | Status |
  4. +-----------------------+----------------------------------------+
  5. | internal | available |
  6. | |- node-10 | |
  7. | | |- nova-conductor | enabled :-) 2015-03-03T15:30:06.000000 |
  8. | | |- nova-consoleauth | enabled :-) 2015-03-03T15:30:05.000000 |
  9. | | |- nova-scheduler | enabled :-) 2015-03-03T15:30:03.000000 |
  10. | | |- nova-cert | enabled :-) 2015-03-03T15:30:02.000000 |
  11. | |- node-6 | |
  12. | | |- nova-conductor | enabled :-) 2015-03-03T15:30:08.000000 |
  13. | | |- nova-consoleauth | enabled :-) 2015-03-03T15:30:08.000000 |
  14. | | |- nova-scheduler | enabled :-) 2015-03-03T15:30:08.000000 |
  15. | | |- nova-cert | enabled :-) 2015-03-03T15:30:08.000000 |
  16. | |- node-7 | |
  17. | | |- nova-conductor | enabled :-) 2015-03-03T15:30:09.000000 |
  18. | | |- nova-consoleauth | enabled :-) 2015-03-03T15:30:03.000000 |
  19. | | |- nova-scheduler | enabled :-) 2015-03-03T15:30:08.000000 |
  20. | | |- nova-cert | enabled :-) 2015-03-03T15:30:03.000000 |
  21. | nova | available |
  22. | |- node-8 | |
  23. | | |- nova-compute | enabled :-) 2015-03-03T15:30:10.000000 |
  24. | |- node-9 | |
  25. | | |- nova-compute | enabled :-) 2015-03-03T15:30:03.000000 |
  26. +-----------------------+----------------------------------------+
  27.  
  28. root@node-6:~# nova aggregate-create test-aggregate test-az
  29. +----+----------------+-------------------+-------+-----------------------------+
  30. | Id | Name | Availability Zone | Hosts | Metadata |
  31. +----+----------------+-------------------+-------+-----------------------------+
  32. | 1 | test-aggregate | test-az | | 'availability_zone=test-az' |
  33. +----+----------------+-------------------+-------+-----------------------------+
  34.  
  35. root@node-6:~# nova aggregate-add-host 1 node-8
  36. Host node-8 has been successfully added for aggregate 1
  37. +----+----------------+-------------------+----------+-----------------------------+
  38. | Id | Name | Availability Zone | Hosts | Metadata |
  39. +----+----------------+-------------------+----------+-----------------------------+
  40. | 1 | test-aggregate | test-az | 'node-8' | 'availability_zone=test-az' |
  41. +----+----------------+-------------------+----------+-----------------------------+
  42.  
  43. root@node-6:~# nova net-list
  44. +--------------------------------------+-----------+------+
  45. | ID | Label | CIDR |
  46. +--------------------------------------+-----------+------+
  47. | eb023747-2b14-4960-995c-59b51c7117c6 | net04_ext | None |
  48. | e6780186-c7f0-4ebb-9fca-7ebc5a8792e9 | net04 | None |
  49. +--------------------------------------+-----------+------+
  50.  
  51. root@node-6:~# nova boot ac-instance --flavor m1.micro --image TestVM --nic net-id=e6780186-c7f0-4ebb-9fca-7ebc5a8792e9
  52. +--------------------------------------+-------------------------------------------------+
  53. | Property | Value |
  54. +--------------------------------------+-------------------------------------------------+
  55. | OS-DCF:diskConfig | MANUAL |
  56. | OS-EXT-AZ:availability_zone | nova |
  57. | OS-EXT-SRV-ATTR:host | - |
  58. | OS-EXT-SRV-ATTR:hypervisor_hostname | - |
  59. | OS-EXT-SRV-ATTR:instance_name | instance-00000004 |
  60. | OS-EXT-STS:power_state | 0 |
  61. | OS-EXT-STS:task_state | scheduling |
  62. | OS-EXT-STS:vm_state | building |
  63. | OS-SRV-USG:launched_at | - |
  64. | OS-SRV-USG:terminated_at | - |
  65. | accessIPv4 | |
  66. | accessIPv6 | |
  67. | adminPass | F4XtkuUmH6m7 |
  68. | config_drive | |
  69. | created | 2015-03-03T15:41:12Z |
  70. | flavor | m1.micro (786212e9-489d-40bb-9a76-32be606499a4) |
  71. | hostId | |
  72. | id | 790eb04c-5885-4721-be52-43bd42b779a3 |
  73. | image | TestVM (22f41f56-8d80-4342-9cfb-5bcfdead390e) |
  74. | key_name | - |
  75. | metadata | {} |
  76. | name | ac-instance |
  77. | os-extended-volumes:volumes_attached | [] |
  78. | progress | 0 |
  79. | security_groups | default |
  80. | status | BUILD |
  81. | tenant_id | 5ea311d1f7cd476e8d175e482e324972 |
  82. | updated | 2015-03-03T15:41:12Z |
  83. | user_id | 3b1e2bef6a674d91ad6c12a92314a29d |
  84. +--------------------------------------+-------------------------------------------------+
  85.  
  86. root@node-6:~# nova boot ac2-instance --flavor m1.micro --image TestVM --nic net-id=e6780186-c7f0-4ebb-9fca-7ebc5a8792e9 --availability-zone=test-az
  87. +--------------------------------------+-------------------------------------------------+
  88. | Property | Value |
  89. +--------------------------------------+-------------------------------------------------+
  90. | OS-DCF:diskConfig | MANUAL |
  91. | OS-EXT-AZ:availability_zone | nova |
  92. | OS-EXT-SRV-ATTR:host | - |
  93. | OS-EXT-SRV-ATTR:hypervisor_hostname | - |
  94. | OS-EXT-SRV-ATTR:instance_name | instance-00000007 |
  95. | OS-EXT-STS:power_state | 0 |
  96. | OS-EXT-STS:task_state | scheduling |
  97. | OS-EXT-STS:vm_state | building |
  98. | OS-SRV-USG:launched_at | - |
  99. | OS-SRV-USG:terminated_at | - |
  100. | accessIPv4 | |
  101. | accessIPv6 | |
  102. | adminPass | bmn8iMD4RHkg |
  103. | config_drive | |
  104. | created | 2015-03-03T15:42:30Z |
  105. | flavor | m1.micro (786212e9-489d-40bb-9a76-32be606499a4) |
  106. | hostId | |
  107. | id | 3ba96a71-3065-4e73-8aff-55376d48a07b |
  108. | image | TestVM (22f41f56-8d80-4342-9cfb-5bcfdead390e) |
  109. | key_name | - |
  110. | metadata | {} |
  111. | name | ac2-instance |
  112. | os-extended-volumes:volumes_attached | [] |
  113. | progress | 0 |
  114. | security_groups | default |
  115. | status | BUILD |
  116. | tenant_id | 5ea311d1f7cd476e8d175e482e324972 |
  117. | updated | 2015-03-03T15:42:31Z |
  118. | user_id | 3b1e2bef6a674d91ad6c12a92314a29d |
  119. +--------------------------------------+-------------------------------------------------+
  120.  
  121. set availability_zone on compute
  122.  
  123. root@node-8:~# egrep 'zone' /etc/cinder/cinder.conf
  124. storage_availability_zone=test-az
  125.  
  126.  
  127. root@node-8:~# service cinder-volume restart
  128. cinder-volume stop/waiting
  129. cinder-volume start/running, process 26063
  130.  
  131. root@node-6:~# cinder service-list
  132. +------------------+---------+---------+---------+-------+----------------------------+-----------------+
  133. | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
  134. +------------------+---------+---------+---------+-------+----------------------------+-----------------+
  135. | cinder-scheduler | node-10 | nova | enabled | up | 2015-03-03T16:58:23.000000 | None |
  136. | cinder-scheduler | node-6 | nova | enabled | up | 2015-03-03T16:58:28.000000 | None |
  137. | cinder-scheduler | node-7 | nova | enabled | up | 2015-03-03T16:58:21.000000 | None |
  138. | cinder-volume | node-8 | test-az | enabled | up | 2015-03-03T16:58:22.000000 | None |
  139. | cinder-volume | node-9 | nova | enabled | up | 2015-03-03T16:58:26.000000 | None |
  140. +------------------+---------+---------+---------+-------+----------------------------+-----------------+
  141. root@node-6:~#
  142. root@node-6:~#
  143. root@node-6:~# cinder availability-zone-list
  144. +---------+-----------+
  145. | Name | Status |
  146. +---------+-----------+
  147. | nova | available |
  148. | test-az | available |
  149. +---------+-----------+
  150.  
  151.  
  152. root@node-6:~# cinder create 1 --availability-zone test-az --display-name vol1-test-az
  153. +---------------------+--------------------------------------+
  154. | Property | Value |
  155. +---------------------+--------------------------------------+
  156. | attachments | [] |
  157. | availability_zone | test-az |
  158. | bootable | false |
  159. | created_at | 2015-03-03T16:58:04.083547 |
  160. | display_description | None |
  161. | display_name | vol1-test-az |
  162. | encrypted | False |
  163. | id | f0a41771-f1dc-45b1-893b-356900e29090 |
  164. | metadata | {} |
  165. | size | 1 |
  166. | snapshot_id | None |
  167. | source_volid | None |
  168. | status | creating |
  169. | volume_type | None |
  170. +---------------------+--------------------------------------+
  171.  
  172. root@node-6:~# nova volume-attach ac-instance f0a41771-f1dc-45b1-893b-356900e29090
  173. +----------+--------------------------------------+
  174. | Property | Value |
  175. +----------+--------------------------------------+
  176. | device | /dev/vdb |
  177. | id | f0a41771-f1dc-45b1-893b-356900e29090 |
  178. | serverId | 790eb04c-5885-4721-be52-43bd42b779a3 |
  179. | volumeId | f0a41771-f1dc-45b1-893b-356900e29090 |
  180. +----------+--------------------------------------+
  181. root@node-6:~# nova volume-detach ac-instance f0a41771-f1dc-45b1-893b-356900e29090
  182. root@node-6:~# nova volume-attach ac2-instance f0a41771-f1dc-45b1-893b-356900e29090
  183. +----------+--------------------------------------+
  184. | Property | Value |
  185. +----------+--------------------------------------+
  186. | device | /dev/vdb |
  187. | id | f0a41771-f1dc-45b1-893b-356900e29090 |
  188. | serverId | 3ba96a71-3065-4e73-8aff-55376d48a07b |
  189. | volumeId | f0a41771-f1dc-45b1-893b-356900e29090 |
  190. +----------+--------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement