nova/doc/source/admin/availability-zones.rst
Stephen Finucane cadd25e9bc doc: Add additional content to admin guide
Import the following documents from the admin guide [1]:

- cli-manage-flavors.rst
- cli-nova-evacuate.rst
- cli-nova-manage-projects-security.rst
- cli-nova-manage-services.rst
- cli-nova-numa-libvirt.rst
- cli-nova-specify-host.rst
- cli-set-quotas.rst
- cli-set-compute-quotas.rst
- cli-os-migrate.rst
- cli-os-migrate-cfg-ssh.rst
- ts-no-emulator-x86-64.rst
- ts-multipath-warn.rst
- ts-failed-connect-vol-FC-SAN.rst
- ts-failed-attach-vol-no-sysfsutils.rst
- ts-failed-attach-vol-after-detach.rst
- ts-vol-attach-miss-sg-scan.rst

These were missed in the original import [2]. All 'ts-' files are merged
into a single 'support-compute' document, which is already in-tree.

[1] https://github.com/openstack/openstack-manuals/tree/stable/ocata/doc/admin-guide/source
[2] https://review.openstack.org/#/c/477497/

Change-Id: Ifa0039e270e54ea2fb58ab18ce6724e5e8e061a1
Closes-Bug: #1708666
2017-08-08 14:04:14 +01:00

71 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 |
+----+---------------------+