0

I installed Microstack and I am trying to understand the operation of Openstack with the poor documentation I find on the Internet. I am trying to access some launched VMs without success. The Microstack already has the following two networks created:

microstack.openstack network list
+--------------------------------------+----------+--------------------------------------+
| ID                                   | Name     | Subnets                              |
+--------------------------------------+----------+--------------------------------------+
| 750286d8-2801-4dd3-85d8-85b0e4219b46 | test     | fbe5a4e4-34c7-4b39-a4e5-a447431d78dc |
| e9d9520f-3ad7-4f96-bff5-060beb1c0161 | external | 3041f82a-9be5-4f47-84a4-6229e5eb60cb |

Below, I list the security group I am using to launch the VMs:

microstack.openstack security group show 3c69498c-c210-48c8-ba43-fbf60a0c224e
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field           | Value                                                                                                                                                                                                                                          |
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| created_at      | 2020-08-14T17:54:45Z                                                                                                                                                                                                                           |
| description     | Default security group                                                                                                                                                                                                                         |
| id              | 3c69498c-c210-48c8-ba43-fbf60a0c224e                                                                                                                                                                                                           |
| location        | Munch({'cloud': '', 'region_name': '', 'zone': None, 'project': Munch({'id': '37f73779b3cd42dc96044ea0fd6d1e98', 'name': 'admin', 'domain_id': None, 'domain_name': 'default'})})                                                              |
| name            | default                                                                                                                                                                                                                                        |
| project_id      | 37f73779b3cd42dc96044ea0fd6d1e98                                                                                                                                                                                                               |
| revision_number | 3                                                                                                                                                                                                                                              |
| rules           | created_at='2020-08-14T17:54:45Z', direction='egress', ethertype='IPv6', id='1e5c2fed-7c7a-4dd4-9e11-c87d0de012ee', updated_at='2020-08-14T17:54:45Z'                                                                                          |
|                 | created_at='2020-08-14T17:54:45Z', direction='ingress', ethertype='IPv4', id='36394ec6-0f35-4b26-9788-61bf76a08088', remote_group_id='3c69498c-c210-48c8-ba43-fbf60a0c224e', updated_at='2020-08-14T17:54:45Z'                                 |
|                 | created_at='2020-08-14T17:54:45Z', direction='ingress', ethertype='IPv6', id='48986d96-ec57-4f49-aee8-6e1c68e273b1', remote_group_id='3c69498c-c210-48c8-ba43-fbf60a0c224e', updated_at='2020-08-14T17:54:45Z'                                 |
|                 | created_at='2020-08-14T17:56:16Z', direction='ingress', ethertype='IPv4', id='58816267-8df8-4a89-a9c5-31986a441365', port_range_max='22', port_range_min='22', protocol='tcp', remote_ip_prefix='0.0.0.0/0', updated_at='2020-08-14T17:56:16Z' |
|                 | created_at='2020-08-14T17:54:45Z', direction='egress', ethertype='IPv4', id='c75e9aa8-84f3-4d05-9d33-0da7892f7a07', updated_at='2020-08-14T17:54:45Z'                                                                                          |
|                 | created_at='2020-08-14T17:56:14Z', direction='ingress', ethertype='IPv4', id='d029b66c-219e-488d-93af-1f87a9d8b006', protocol='icmp', remote_ip_prefix='0.0.0.0/0', updated_at='2020-08-14T17:56:14Z'                                          |
| tags            | []                                                                                                                                                                                                                                             |
| updated_at      | 2020-08-14T17:56:16Z                                                                                                                                                                                                                           |
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

I already launched two Ubuntu VMs with both available networks (test and external), as seen below:

microstack.openstack server list
+--------------------------------------+-------------+--------+-----------------------------------+-------------+-----------+
| ID                                   | Name        | Status | Networks                          | Image       | Flavor    |
+--------------------------------------+-------------+--------+-----------------------------------+-------------+-----------+
| 4bd80f7c-8c16-4b15-9973-887f0f2517ff | test1   | ACTIVE | external=10.20.20.197             | ubuntu_1804 | m1.medium |
| ca2e690e-e679-4fd7-a507-07f12bcf1c5e | test2   | ACTIVE | test=192.168.222.141              | ubuntu_1804 | m1.medium |

This was the command used to launch the VMs:

microstack.openstack server create --flavor m1.medium --image ubuntu_1804 \
--nic net-id=e9d9520f-3ad7-4f96-bff5-060beb1c0161 --key-name mykey \
--security-group 3c69498c-c210-48c8-ba43-fbf60a0c224e test1

Then, when I try to access both launched VMs, I get Destination Host Unreachable:

ping 10.20.20.197
PING 10.20.20.197 (10.20.20.197) 56(84) bytes of data.
From 10.20.20.1 icmp_seq=1 Destination Host Unreachable

ping 192.168.222.141
PING 192.168.222.141 (192.168.222.141) 56(84) bytes of data.
From 192.168.131.133 icmp_seq=1 Destination Host Unreachable

Can anyone please explain me what am I missing?

1 Answer 1

0

Now I have understood the Openstack a bit, I think the problem was the lack of a floating IP. Below, I list the steps needed to associate a floating IP to the VM and, probably, solve the problem.

  1. Create a floating IP for your external network:

    microstack.openstack floating ip create external
    
  2. Create a router to communicate both networks (internal and external):

    microstack.openstack router create router1
    
  3. Add the external network to the router:

    microstack.openstack router set router1 --external-gateway external
    
  4. Add your private subnetwork to the router (suppose your subnetwork id is f16b8b8c-482e-4cf5-a5d6-74e284b7e0f1):

    microstack.openstack router add subnet router1 f16b8b8c-482e-4cf5-a5d6-74e284b7e0f1
    
  5. Associate the floating IP to your VM (suppose the created IP is 10.20.20.92):

    microstack.openstack server add floating ip server_micro 10.20.20.92
    

Now you should be able to ping the VM and access it through ssh.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .