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
2.3 KiB
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:NODEparameter on theopenstack server createcommand.For example:
$ openstack server create --image IMAGE --flavor m1.tiny \ --key-name KEY --availability-zone ZONE:HOST:NODE \ --nic net-id=UUID SERVERNote
HOST and NODE are optional parameters. In such cases, use the
--availability-zone ZONE::NODE,--availability-zone ZONE:HOSTor--availability-zone ZONE.To specify which roles can launch an instance on a specified host, enable the
create:forced_hostoption in thepolicy.jsonfile. By default, this option is enabled for only the admin role. If you seeForbidden (HTTP 403)in return, then you are not using admin credentials.To view the list of valid zones, use the
openstack availability zone listcommand.$ openstack availability zone list +-----------+-------------+ | Zone Name | Zone Status | +-----------+-------------+ | zone1 | available | | zone2 | available | +-----------+-------------+To view the list of valid compute hosts, use the
openstack host listcommand.$ openstack host list +----------------+-------------+----------+ | Host Name | Service | Zone | +----------------+-------------+----------+ | compute01 | compute | nova | | compute02 | compute | nova | +----------------+-------------+----------+To view the list of valid compute nodes, use the
openstack hypervisor listcommand.$ openstack hypervisor list +----+---------------------+ | ID | Hypervisor Hostname | +----+---------------------+ | 1 | server2 | | 2 | server3 | | 3 | server4 | +----+---------------------+