Creating an instance with a specific IP address

The VM instances are typically used to host IT applications. Some applications require that a particular VM server should have a specific, fixed IP address. When DHCP is enabled, the virtual machine gets an IP address dynamically. This recipe shows you how we can assign a specific IP address to an instance.

Getting ready

A VM with a specific IP address can only be created using the OpenStack CLI. It involves a Port creation followed by an instance creation. As a prerequisite, ensure that a Network is created with the following attributes:

  • Network name: Cookbook-Network-5
  • Subnet name: Cookbook-Subnet-5
  • Subnet IP address range: 20.20.20.0/28

How to do it…

The following steps will show you how to create a ...

Get OpenStack Networking Cookbook 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.