Attaching volumes to an instance

Now that we have a usable volume, we can attach this to any instance. We do this by using the nova volume-attach command in the Nova client.

Getting ready

To begin with, ensure you are logged in to the Ubuntu client that has access to the Nova client tools. If using the Vagrant environment that accompanies the book, you can access these tools from the controller node by running this command:

vagrant ssh controller

This recipe assumes you have created an openrc file. To create an openrc file on each node where you need it, open a text file named openrc and add the following contents:

export OS_TENANT_NAME=cookbook export OS_USERNAME=admin export OS_PASSWORD=openstack export OS_AUTH_URL=https://192.168.100.200:5000/v2.0/ ...

Get OpenStack: Building a Cloud Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.