How to Deploy Your First OpenStack VM in Minutes
This step‑by‑step guide shows how to install OpenStack client tools, modify and run the init‑runonce script, list required resources, create a virtual machine, log in, and assign a floating IP, providing all commands and screenshots needed for a successful deployment.
1 Introduction
Previous chapter set up the OpenStack cloud platform; now we learn how to provision a cloud instance.
2 Provision OpenStack VM
2.1 Install OpenStack client
Install python‑openstackclient and python‑neutronclient for CLI operations.
pip install python-openstackclient
pip install python-neutronclient2.2 Use init‑runonce script to create a project
Modify lines 19‑21 of the init‑runonce script to set the floating‑IP subnet, import environment variables, and run the script.
Modify init‑runonce script (lines 19‑21 define the floating‑IP subnet).
Import OpenStack environment variables:
source /etc/kolla/admin-openrc.shExecute the script:
cd /usr/share/kolla-ansible/
./init-runonce2.3 List required resources
Before creating a VM, ensure image, flavor, network, security group, key pair, and instance name are ready. The init‑runonce script already prepared these resources.
List images
List flavors
List networks
List security groups
List key pairs
2.4 Create the VM
openstack server create --image cirros --flavor m1.tiny --key-name mykey --nic net-id=c79a6326-8d22-4955-bf3d-5a86dfd55f60 demo1 # Parameters explanation
--image cirros # image name
--flavor m1.tiny # flavor
--key-name mykey # key pair
--nic net-id=... # network ID
demo1 # instance name2.5 Log into the VM
After the instance appears in the dashboard, you can log in via the console using the provided credentials.
2.6 Assign a floating IP
Use the floating‑IP (elastic IP) pool to allocate an address and bind it to the instance.
Select Project → Network → Floating IP → Allocate IP.
Choose a resource pool and allocate the IP.
Bind the allocated IP to the demo1 instance.
Now the VM has a reachable floating IP (test environment only).
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
