Book Image

OpenStack Cloud Computing Cookbook

By : Egle Sigler, Kevin Jackson, Cody Bunch
Book Image

OpenStack Cloud Computing Cookbook

By: Egle Sigler, Kevin Jackson, Cody Bunch

Overview of this book

Table of Contents (19 chapters)
OpenStack Cloud Computing Cookbook Third Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Detaching volumes from an instance


As Cinder volumes can only be attached to one host at a time, you need to detach it from one instance before attaching it to another. To detach a volume, we use another Nova client option called volume-detach.

Getting ready

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

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/
export OS_KEY=/path/to/cakey.pem
export OS_CACERT=/path/to/ca.pem

These packages can be installed using the following commands:

sudo apt-get update
sudo apt-get install python-novaclient

How to do it.....