Comprehensive OpenStack Deployment Guide: Single‑Node and Dual‑Node Setup on VMware
This tutorial walks through a complete OpenStack installation on VMware, covering single‑node and dual‑node configurations, network setup, yum repository preparation, Keystone and Nova service management, security groups, floating IPs, and Neutron networking, with full command‑line examples.
OpenStack Detailed Deployment Steps
1. Single‑Node OpenStack Deployment
1.1 Configure VM NAT network
Check the default NAT network configuration in VMware:
| | |
| --- | --- |
| | In VMware Workstation, click "Edit" → "Virtual Network Editor" |
| | Find vmnet10, which is in NAT mode, subnet 172.25.2.0/24, netmask 255.255.255.0 |
| | Click "NAT Settings" to see the gateway: 172.25.2.2 |1.2 Configure the VM network interface
In VMware Workstation, click "VM" → "Settings" → add a new network adapter if none exists, set the connection mode to "Custom (VMnet10)" (NAT mode).
1.3 Configure Linux network
# Enter network configuration directory
cd /etc/sysconfig/network-scripts
# Edit the NAT interface configuration
vi ifcfg-ens33
# Set or add the following lines:
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.25.2.101
NETMASK=255.255.255.0
GATEWAY=172.25.2.2
DNS=8.8.8.8
# Save and exit
vi /etc/resolv.conf
add: nameserver 8.8.8.8
# Disable firewall
systemctl stop firewalld.service
systemctl disable firewalld.service
# Restart network
systemctl restart network
# Test connectivity
ping www.baidu.com1.4 Configure yum repository
# Disable NetworkManager
systemctl disable NetworkManager
# Disable SELinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
# Backup original repos
mkdir /etc/yum.repos.d/repo.bak/
mv /etc/yum.repos.d/*.repo repo.bak/
# Add Alibaba Cloud repo
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache
# Install OpenStack Queens repo
yum install -y centos-release-openstack-queens
cat > /etc/yum.repos.d/openstack-queens.repo <<EOF
[queens]
name=queens
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-queens/
enabled=1
gpgcheck=0
EOF
yum clean all && yum makecache
# Install Packstack
yum install -y openstack-packstack
# Install prerequisite packages
yum install -y python-pip
# Run all‑in‑one deployment
packstack --allinone
# Resolve known library error
yum downgrade leatherman2. Dual‑Node OpenStack Deployment
2.1 Prepare virtual machines
Create two VMware VMs with minimal CentOS 7 installation. Each VM should have a host‑only adapter (vmnet2) and a NAT adapter (vmnet10), at least 4 GB RAM and 50 GB disk.
Master node network interface
| TYPE=Ethernet
| BOOTPROTO=static
| DEFROUTE=yes
| PEERDNS=yes
| PEERROUTES=yes
| IPV4_FAILURE_FATAL=no
| IPV6INIT=yes
| IPV6_AUTOCONF=yes
| IPV6_DEFROUTE=yes
| IPV6_PEERDNS=yes
| IPV6_PEERROUTES=yes
| IPV6_FAILURE_FATAL=no
| NAME=eno16777736
| UUID=f34abd2e-89c9-4daf-a28c-54765164d59d
| DEVICE=eno16777736
| ONBOOT=yes
| IPADDR=192.168.16.10
| NETMASK=255.255.255.0Compute node network interface
| TYPE=Ethernet
| BOOTPROTO=static
| DEFROUTE=yes
| PEERDNS=yes
| PEERROUTES=yes
| IPV4_FAILURE_FATAL=no
| IPV6INIT=yes
| IPV6_AUTOCONF=yes
| IPV6_DEFROUTE=yes
| IPV6_PEERDNS=yes
| IPV6_PEERROUTES=yes
| IPV6_FAILURE_FATAL=no
| NAME=eno16777736
| UUID=8bbcc106-d60f-48cc-aafd-2bde0154fa2e
| DEVICE=eno16777736
| ONBOOT=yes
| IPADDR=192.168.16.20
| NETMASK=255.255.255.02.2 Mount installation images
Upload the ISO images to the master node and mount them:
# Mount CentOS 7 DVD
cd /root/
mount -o loop CentOS-7-x86_64-DVD-1511.iso /mnt/
mkdir -p /opt/centos7.2
cp -rvf /mnt/* /opt/centos7.2/
umount /mnt/
# Mount IaaS image
mount -o loop XianDian-IaaS-v2.2.iso /mnt/
mkdir -p /opt/iaas
cp -rvf /mnt/* /opt/iaas/
umount /mnt/2.3 Configure local yum repositories on both nodes
# On controller
rm -rf /etc/yum.repos.d/CentOS-*
cat > /etc/yum.repos.d/local.repo <<EOF
[centos]
name=centos
baseurl=file:///opt/centos7.2
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
gpgcheck=0
enabled=1
EOF
# On compute node (similar, using ftp URLs)
rm -rf /etc/yum.repos.d/CentOS-*
cat > /etc/yum.repos.d/local.repo <<EOF
[centos]
name=centos
baseurl=ftp://192.168.16.10/centos7.2
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=ftp://192.168.16.10/iaas/iaas-repo
gpgcheck=0
enabled=1
EOF2.4 Install and configure services
Install the iaas‑xiandian package on both controller and compute nodes, then edit /etc/xiandian/openrc.sh to set IPs, passwords, and service credentials (HOST_IP, HOST_PASS, etc.).
3. Using the OpenStack Platform
3.1 Create an image
# On controller, upload a qcow2 image to Glance
cd /opt/iaas/images/
source /etc/keystone/admin-openrc.sh
glance image-create --name "centos7.2" --disk-format qcow2 --container-format bare --progress < CentOS_7.2_x86_64_XD.qcow23.2 Create networks and router
Use the Horizon dashboard or CLI to create an external network net-gre (192.168.20.0/24) and an internal network int-gre (10.10.0.0/24). Then create a router route linking the internal network to the external one.
3.3 Configure security groups
# List default security group
nova secgroup-list
# Create a new security group
nova secgroup-create hqs "Most great security group"
# Add rules (ICMP, TCP, UDP)
nova secgroup-add-rule hqs icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule hqs udp 1 65535 0.0.0.0/0
nova secgroup-add-rule hqs tcp 1 65535 0.0.0.0/03.4 Launch a VM
nova boot test-server \
--image centos7.2 \
--flavor m1.hqs \
--availability-zone nova \
--security-groups hqs \
--nic net-id=64306052-bcec-4209-ac4c-45b9d2de4dde3.5 Manage floating IPs
# Allocate a floating IP from pool net-gre
nova floating-ip-create net-gre
# Associate it with the instance
nova floating-ip-associate test-server <floating_ip>
# To detach and delete
nova floating-ip-disassociate test-server <floating_ip>
nova floating-ip-delete <floating_ip>4. Keystone Service Operations
# Load admin credentials
source /etc/keystone/admin-openrc.sh
# Create a user
openstack user create --password ps1234 --email [email protected] --domain demo hqs
# Create a project
openstack project create --domain demo acme
# Create a role
openstack role create compute-user
# Assign role to user on project
openstack role add --user hqs --project acme compute-user
# List users, projects, roles, endpoints as needed
openstack user list
openstack project list
openstack role list
openstack endpoint list5. Nova Component Details
5.1 Security group operations
nova secgroup-list
nova secgroup-create mygroup "My security group"
nova secgroup-add-rule mygroup icmp -1 -1 0.0.0.0/0
nova secgroup-delete-rule mygroup icmp -1 -1 0.0.0.0/0
nova secgroup-delete mygroup5.2 Flavor (instance type) management
nova flavor-list
nova flavor-create m1.hqs 6 1024 10 0 1
nova flavor-show m1.hqs
nova flavor-delete m1.hqs5.3 Instance lifecycle commands
nova list
nova show <instance_id>
nova boot myvm --image centos7.2 --flavor m1.hqs --nic net-id=<net_uuid>
nova stop myvm
nova start myvm
nova reboot myvm
nova pause myvm
nova unpause myvm
nova delete myvm5.4 Floating IP management (Nova)
nova floating-ip-create net-gre
nova floating-ip-list
nova floating-ip-associate myvm <floating_ip>
nova floating-ip-disassociate myvm <floating_ip>
nova floating-ip-delete <floating_ip>5.5 Keypair management
nova keypair-list
nova keypair-show mykey
nova keypair-add mykey --key-type ssh
nova keypair-delete mykey5.6 Quota management
openstack quota show admin
# (output omitted for brevity)6. Neutron Networking Service
# List networks
openstack network list
# Show network details
openstack network show net-gre
# Create a new network
openstack network create int-gre-test --project admin
# Update network name and enable it
openstack network set int-gre-test --enable --name int-test-gre
# Delete a network
openstack network delete int-gre-testThe above steps provide a complete, reproducible procedure for deploying OpenStack on VMware, configuring core services, managing resources, and operating the cloud environment.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
