9696ec9310
The parsing goes like this in Nova: 1. --availability-zone ZONE (no host or node) 2. --availabllity-zone ZONE:HOST (no node) 3. --availability-zone ZONE::NODE (no host) 4. --availability-zone ZONE:HOST:NODE So we need to fix the docs to match case #2. Change-Id: Iedb8d221d0a33f18a7e4e10dff7b35823eef90a7 Closes-Bug: #1673252
77 lines
2.3 KiB
ReStructuredText
77 lines
2.3 KiB
ReStructuredText
=========================================
|
|
Select hosts where instances are launched
|
|
=========================================
|
|
|
|
With the appropriate permissions, you can select which
|
|
host instances are launched on and which roles can boot instances
|
|
on this host.
|
|
|
|
#. To select the host where instances are launched, use
|
|
the ``--availability-zone ZONE:HOST:NODE`` parameter on the
|
|
:command:`openstack server create` command.
|
|
|
|
For example:
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack server create --image IMAGE --flavor m1.tiny \
|
|
--key-name KEY --availability-zone ZONE:HOST:NODE \
|
|
--nic net-id=UUID SERVER
|
|
|
|
|
|
.. note::
|
|
HOST and NODE are optional parameters. In such cases,
|
|
use the ``--availability-zone ZONE::NODE``,
|
|
``--availability-zone ZONE:HOST`` or
|
|
``--availability-zone ZONE``.
|
|
|
|
|
|
#. To specify which roles can launch an instance on a
|
|
specified host, enable the ``create:forced_host`` option in
|
|
the ``policy.json`` file. By default, this option is
|
|
enabled for only the admin role. If you see ``Forbidden (HTTP 403)``
|
|
in return, then you are not using admin credentials.
|
|
|
|
|
|
#. To view the list of valid zones, use the
|
|
:command:`openstack availability zone list` command.
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack availability zone list
|
|
+-----------+-------------+
|
|
| Zone Name | Zone Status |
|
|
+-----------+-------------+
|
|
| zone1 | available |
|
|
| zone2 | available |
|
|
+-----------+-------------+
|
|
|
|
|
|
#. To view the list of valid compute hosts, use the
|
|
:command:`openstack host list` command.
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack host list
|
|
+----------------+-------------+----------+
|
|
| Host Name | Service | Zone |
|
|
+----------------+-------------+----------+
|
|
| compute01 | compute | nova |
|
|
| compute02 | compute | nova |
|
|
+----------------+-------------+----------+
|
|
|
|
|
|
#. To view the list of valid compute nodes, use the
|
|
:command:`openstack hypervisor list` command.
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack hypervisor list
|
|
+----+---------------------+
|
|
| ID | Hypervisor Hostname |
|
|
+----+---------------------+
|
|
| 1 | server2 |
|
|
| 2 | server3 |
|
|
| 3 | server4 |
|
|
+----+---------------------+
|