Booting an instance into an Availability Zone
Instances can be created into a given AZ by passing the --availability-zone
parameter as part of the creation process. Additionally, AZ can be selected in OpenStack Horizon as part of the instance creation wizard.
Getting ready
The following information is required to boot an instance into an AZ:
The
openstack
command-line clientThe
openrc
file containing appropriate credentialsThe name or ID of the AZ
Additional information required to start an instance
Note
Creating instances is covered in detail in the Booting an instance recipe. As such, this example skips some of the detail, instead it focuses on how to create an instance in a specific AZ.
How to do it…
To boot an instance into a specific AZ, the --availability-zone
parameter is specified when running the openstack server create
command:
openstack server create --flavor openstack.cookbook --image 08b822ba-be44-4639-b577-45e8dd37c06d --nic net-id=6cb5a4ce-1ea5-4817-9c34-a2212a66f394 --security...