Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@node-6:~# nova availability-zone-list
- +-----------------------+----------------------------------------+
- | Name | Status |
- +-----------------------+----------------------------------------+
- | internal | available |
- | |- node-10 | |
- | | |- nova-conductor | enabled :-) 2015-03-03T15:30:06.000000 |
- | | |- nova-consoleauth | enabled :-) 2015-03-03T15:30:05.000000 |
- | | |- nova-scheduler | enabled :-) 2015-03-03T15:30:03.000000 |
- | | |- nova-cert | enabled :-) 2015-03-03T15:30:02.000000 |
- | |- node-6 | |
- | | |- nova-conductor | enabled :-) 2015-03-03T15:30:08.000000 |
- | | |- nova-consoleauth | enabled :-) 2015-03-03T15:30:08.000000 |
- | | |- nova-scheduler | enabled :-) 2015-03-03T15:30:08.000000 |
- | | |- nova-cert | enabled :-) 2015-03-03T15:30:08.000000 |
- | |- node-7 | |
- | | |- nova-conductor | enabled :-) 2015-03-03T15:30:09.000000 |
- | | |- nova-consoleauth | enabled :-) 2015-03-03T15:30:03.000000 |
- | | |- nova-scheduler | enabled :-) 2015-03-03T15:30:08.000000 |
- | | |- nova-cert | enabled :-) 2015-03-03T15:30:03.000000 |
- | nova | available |
- | |- node-8 | |
- | | |- nova-compute | enabled :-) 2015-03-03T15:30:10.000000 |
- | |- node-9 | |
- | | |- nova-compute | enabled :-) 2015-03-03T15:30:03.000000 |
- +-----------------------+----------------------------------------+
- root@node-6:~# nova aggregate-create test-aggregate test-az
- +----+----------------+-------------------+-------+-----------------------------+
- | Id | Name | Availability Zone | Hosts | Metadata |
- +----+----------------+-------------------+-------+-----------------------------+
- | 1 | test-aggregate | test-az | | 'availability_zone=test-az' |
- +----+----------------+-------------------+-------+-----------------------------+
- root@node-6:~# nova aggregate-add-host 1 node-8
- Host node-8 has been successfully added for aggregate 1
- +----+----------------+-------------------+----------+-----------------------------+
- | Id | Name | Availability Zone | Hosts | Metadata |
- +----+----------------+-------------------+----------+-----------------------------+
- | 1 | test-aggregate | test-az | 'node-8' | 'availability_zone=test-az' |
- +----+----------------+-------------------+----------+-----------------------------+
- root@node-6:~# nova net-list
- +--------------------------------------+-----------+------+
- | ID | Label | CIDR |
- +--------------------------------------+-----------+------+
- | eb023747-2b14-4960-995c-59b51c7117c6 | net04_ext | None |
- | e6780186-c7f0-4ebb-9fca-7ebc5a8792e9 | net04 | None |
- +--------------------------------------+-----------+------+
- root@node-6:~# nova boot ac-instance --flavor m1.micro --image TestVM --nic net-id=e6780186-c7f0-4ebb-9fca-7ebc5a8792e9
- +--------------------------------------+-------------------------------------------------+
- | Property | Value |
- +--------------------------------------+-------------------------------------------------+
- | OS-DCF:diskConfig | MANUAL |
- | OS-EXT-AZ:availability_zone | nova |
- | OS-EXT-SRV-ATTR:host | - |
- | OS-EXT-SRV-ATTR:hypervisor_hostname | - |
- | OS-EXT-SRV-ATTR:instance_name | instance-00000004 |
- | OS-EXT-STS:power_state | 0 |
- | OS-EXT-STS:task_state | scheduling |
- | OS-EXT-STS:vm_state | building |
- | OS-SRV-USG:launched_at | - |
- | OS-SRV-USG:terminated_at | - |
- | accessIPv4 | |
- | accessIPv6 | |
- | adminPass | F4XtkuUmH6m7 |
- | config_drive | |
- | created | 2015-03-03T15:41:12Z |
- | flavor | m1.micro (786212e9-489d-40bb-9a76-32be606499a4) |
- | hostId | |
- | id | 790eb04c-5885-4721-be52-43bd42b779a3 |
- | image | TestVM (22f41f56-8d80-4342-9cfb-5bcfdead390e) |
- | key_name | - |
- | metadata | {} |
- | name | ac-instance |
- | os-extended-volumes:volumes_attached | [] |
- | progress | 0 |
- | security_groups | default |
- | status | BUILD |
- | tenant_id | 5ea311d1f7cd476e8d175e482e324972 |
- | updated | 2015-03-03T15:41:12Z |
- | user_id | 3b1e2bef6a674d91ad6c12a92314a29d |
- +--------------------------------------+-------------------------------------------------+
- root@node-6:~# nova boot ac2-instance --flavor m1.micro --image TestVM --nic net-id=e6780186-c7f0-4ebb-9fca-7ebc5a8792e9 --availability-zone=test-az
- +--------------------------------------+-------------------------------------------------+
- | Property | Value |
- +--------------------------------------+-------------------------------------------------+
- | OS-DCF:diskConfig | MANUAL |
- | OS-EXT-AZ:availability_zone | nova |
- | OS-EXT-SRV-ATTR:host | - |
- | OS-EXT-SRV-ATTR:hypervisor_hostname | - |
- | OS-EXT-SRV-ATTR:instance_name | instance-00000007 |
- | OS-EXT-STS:power_state | 0 |
- | OS-EXT-STS:task_state | scheduling |
- | OS-EXT-STS:vm_state | building |
- | OS-SRV-USG:launched_at | - |
- | OS-SRV-USG:terminated_at | - |
- | accessIPv4 | |
- | accessIPv6 | |
- | adminPass | bmn8iMD4RHkg |
- | config_drive | |
- | created | 2015-03-03T15:42:30Z |
- | flavor | m1.micro (786212e9-489d-40bb-9a76-32be606499a4) |
- | hostId | |
- | id | 3ba96a71-3065-4e73-8aff-55376d48a07b |
- | image | TestVM (22f41f56-8d80-4342-9cfb-5bcfdead390e) |
- | key_name | - |
- | metadata | {} |
- | name | ac2-instance |
- | os-extended-volumes:volumes_attached | [] |
- | progress | 0 |
- | security_groups | default |
- | status | BUILD |
- | tenant_id | 5ea311d1f7cd476e8d175e482e324972 |
- | updated | 2015-03-03T15:42:31Z |
- | user_id | 3b1e2bef6a674d91ad6c12a92314a29d |
- +--------------------------------------+-------------------------------------------------+
- set availability_zone on compute
- root@node-8:~# egrep 'zone' /etc/cinder/cinder.conf
- storage_availability_zone=test-az
- root@node-8:~# service cinder-volume restart
- cinder-volume stop/waiting
- cinder-volume start/running, process 26063
- root@node-6:~# cinder service-list
- +------------------+---------+---------+---------+-------+----------------------------+-----------------+
- | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
- +------------------+---------+---------+---------+-------+----------------------------+-----------------+
- | cinder-scheduler | node-10 | nova | enabled | up | 2015-03-03T16:58:23.000000 | None |
- | cinder-scheduler | node-6 | nova | enabled | up | 2015-03-03T16:58:28.000000 | None |
- | cinder-scheduler | node-7 | nova | enabled | up | 2015-03-03T16:58:21.000000 | None |
- | cinder-volume | node-8 | test-az | enabled | up | 2015-03-03T16:58:22.000000 | None |
- | cinder-volume | node-9 | nova | enabled | up | 2015-03-03T16:58:26.000000 | None |
- +------------------+---------+---------+---------+-------+----------------------------+-----------------+
- root@node-6:~#
- root@node-6:~#
- root@node-6:~# cinder availability-zone-list
- +---------+-----------+
- | Name | Status |
- +---------+-----------+
- | nova | available |
- | test-az | available |
- +---------+-----------+
- root@node-6:~# cinder create 1 --availability-zone test-az --display-name vol1-test-az
- +---------------------+--------------------------------------+
- | Property | Value |
- +---------------------+--------------------------------------+
- | attachments | [] |
- | availability_zone | test-az |
- | bootable | false |
- | created_at | 2015-03-03T16:58:04.083547 |
- | display_description | None |
- | display_name | vol1-test-az |
- | encrypted | False |
- | id | f0a41771-f1dc-45b1-893b-356900e29090 |
- | metadata | {} |
- | size | 1 |
- | snapshot_id | None |
- | source_volid | None |
- | status | creating |
- | volume_type | None |
- +---------------------+--------------------------------------+
- root@node-6:~# nova volume-attach ac-instance f0a41771-f1dc-45b1-893b-356900e29090
- +----------+--------------------------------------+
- | Property | Value |
- +----------+--------------------------------------+
- | device | /dev/vdb |
- | id | f0a41771-f1dc-45b1-893b-356900e29090 |
- | serverId | 790eb04c-5885-4721-be52-43bd42b779a3 |
- | volumeId | f0a41771-f1dc-45b1-893b-356900e29090 |
- +----------+--------------------------------------+
- root@node-6:~# nova volume-detach ac-instance f0a41771-f1dc-45b1-893b-356900e29090
- root@node-6:~# nova volume-attach ac2-instance f0a41771-f1dc-45b1-893b-356900e29090
- +----------+--------------------------------------+
- | Property | Value |
- +----------+--------------------------------------+
- | device | /dev/vdb |
- | id | f0a41771-f1dc-45b1-893b-356900e29090 |
- | serverId | 3ba96a71-3065-4e73-8aff-55376d48a07b |
- | volumeId | f0a41771-f1dc-45b1-893b-356900e29090 |
- +----------+--------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement