The format for the value passed for --availability-zone parameter is incomplete and the example command is incorrect. Change-Id: Id4eb9668e3e10b784690a47e604a2b406561a194 Fixes-Bug: #1600618
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 is an optional parameter. In such cases, use the
--availability-zone ZONE::NODE.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 | +----+---------------------+