Create VM on devstack

Once devstack is installed, we need to follow some steps before creating our first virtual machine. Please check below steps:-

1. From CLI, export the credentials for demo user
cd devstack
source openrc demo demo
2. Create Security group rules
openstack security group rule create --proto tcp --dst-port 22 default
openstack security group rule create --proto icmp --dst-port 0 default
3. Check available images. Devstack by-default add cirros image.
openstack image list
4. Create server from cirros Image listed in output of previous command
openstack server create --network private --flavor m1.micro --image cirros-0.5.2-x86_64-disk test-server
5. Create floating IP from public network
 openstack floating ip create public
6. Add floating IP to VM created in step 4
openstack server add floating ip test-server <floating_ip>
7. SSH to VM using floating IP. For cirros image, use password “gocubsgo”
$ ssh cirros@172.24.4.17
The authenticity of host '172.24.4.17 (172.24.4.17)' can't be established.
ECDSA key fingerprint is SHA256:Vz/1wGgWvJ3MmNIRofggDJe5Vc5boy5HAur+oeY1ZvU.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '172.24.4.17' (ECDSA) to the list of known hosts.
cirros@172.24.4.17's password: 
$ ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1442 qdisc pfifo_fast qlen 1000
   link/ether fa:16:3e:02:68:7f brd ff:ff:ff:ff:ff:ff
   inet 10.0.0.27/26 brd 10.0.0.63 scope global eth0


Here, private IP of VM (e.g. 10.0.0.27) is also listed in output of ‘openstack server list’ command.

Scroll to Top