Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenStack Networking Cookbook

You're reading from   OpenStack Networking Cookbook Harness the power of OpenStack Networking for public and private clouds using 90 hands-on recipes

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785286100
Length 282 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Sriram Subramanian Sriram Subramanian
Author Profile Icon Sriram Subramanian
Sriram Subramanian
Chandan Dutta Chandan Dutta
Author Profile Icon Chandan Dutta
Chandan Dutta
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Started with OpenStack Networking FREE CHAPTER 2. Using Open vSwitch for VLAN-Based Networks 3. Exploring Other Network Types in Neutron 4. Exploring Overlay Networks with Neutron 5. Managing IP Addresses in Neutron 6. Using Routing Services in Neutron 7. Using Neutron Security and Firewall Services 8. Using HAProxy for Load Balancing 9. Monitoring OpenStack Networks 10. Writing Your Own Neutron ML2 Mechanism Driver 11. Troubleshooting Tips for Neutron 12. Advanced Topics Index

Associating a Network to an instance using Horizon

Once the Network and Subnet are created, the next step for the end user is to create an instance or virtual machine and associate the Network to the virtual machine. This recipe shows you how to accomplish this.

Getting ready

One of the prerequisites to create an instance is to add a virtual machine image to the Glance image service. In our example, we will add a CirrOS image and use this image to create an instance.

How to do it…

  1. Log in to the OpenStack Horizon dashboard using the appropriate credentials.
  2. In the left navigation menu, click on Project | Compute | Instances.
  3. Now click on the Launch Instance action on the right-hand side of the screen. The wizard to create and start an instance will be displayed:
    How to do it…
  4. Enter a name for the instance, choose a Flavor, select a source as Boot from image, and choose the desired image:
    How to do it…
  5. To associate the instance to a Network, click on the Networking tab at the top. You should see a screen where the Selected networks field is empty:
    How to do it…
  6. In the Available networks field, click on the + sign next to the Network to which the instance needs to be associated. Then click on Launch:
    How to do it…
  7. This should result in the creation and booting up of your instance and the Instances table is updated to show you the instance that was just created:
    How to do it…

This recipe showed you that as a part of instance creation, the Horizon GUI allows users to choose the Network to which the instance needs to be associated.

How it works…

As part of the instance creation process, the user chooses the Network to which the instance will be associated. The instance creation and scheduling is the responsibility of Nova and it sends a create Port request to Neutron in order to associate the instance to the selected Network.

In response to the create Port request, Neutron will ensure that the virtual Network on the hypervisor server is configured so as to provide connectivity to the virtual machine. For the very first instance created on the Network, the Neutron server will also start a DHCP process on the Network node. This happens when DHCP is enabled on the corresponding Network. Once a virtual machine boots up, it will send a DHCP request. In response to this request, the DHCP server for that Network will respond with an IP address.

There's more…

If there is exactly one Network for a given tenant, then the dashboard automatically selects this Network when an instance is created. Additionally, note that the tenants can associate more than one Network to an instance. This will create multiple interfaces in the virtual machine.

You have been reading a chapter from
OpenStack Networking Cookbook
Published in: Oct 2015
Publisher:
ISBN-13: 9781785286100
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime