Ask Your Question
0

How to access from my pc to a vm (instance) in Openstack

asked 2019-12-26 16:52:07 -0600

ARXC gravatar image

Hello everyone, just install Openstack Stein on a Centos7 virtual machine using packstack allinone. Now I have the following problem, I have practically no knowledge of networks, and when creating and launching an instance (vm) I don't know what I should have to connect and access it from my PC, the Openstack server has a network interface ens160 (ip 192.168.80.20) which I access without problems by ssh from my ip 192.168.70.25 ... How can I do to give an IP of that same subnet (192.168.80.120 for example) to the vm (instance) and be able to access by ssh from my pc and other pc in my network? Thank you.

edit retag flag offensive close merge delete

Comments

I have practically no knowledge of networks

That doesn't give you a good start with OpenStack. But I was in a similar situation and learned what I needed to know during my journey. Be curious.

Bernd Bausch gravatar imageBernd Bausch ( 2019-12-26 20:09:12 -0600 )edit

By default, Packstack deploys a fake "external" network with a non-routable address range 172.bla.bla.bla, which you can't access from outside. There are instructions how to change this.

Bernd Bausch gravatar imageBernd Bausch ( 2019-12-26 20:10:50 -0600 )edit

However, some hypervisors such as VirtualBox seem to block access IP addresses that they don't manage, including addresses of OpenStack instances. Perhaps there are settings in VirtualBox that change this behaviour, but when I have this need, I use KVM.

Bernd Bausch gravatar imageBernd Bausch ( 2019-12-26 20:13:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-12-27 01:23:38 -0600

updated 2019-12-27 01:24:18 -0600

source your keystone rc file. Create a Network with admin tenant with provider:physical_network same as you tagged for ens160 you can check config file. for example physnet1

openstack network create external --provider-network-type flat --provider-physical-network physnet1 >> According your environment

Now create a subnet with taking same network

openstack subnet create externalsubnet --network external --subnet-range 192.168.80.0/24

Now launch a VM with this network.

edit flag offensive delete link more

Comments

To make this work, ens160 must be plugged into br-ex, the Openvswitch bridge that Packstack uses to implement the external network. I doubt that the original poster tagged ens160 in any way.

Bernd Bausch gravatar imageBernd Bausch ( 2019-12-27 01:32:13 -0600 )edit

we have to check system configuration On VM can you please provide output 1. ip a | grep ens160 2. ip a| grep br-ex 3. cat cat /etc/sysconfig/network-scripts/ifcfg-eno160 cat /etc/neutron/plugins/ml2/openvswitch_agent.ini | grep bridge_mappings

piyushsrivastava gravatar imagepiyushsrivastava ( 2019-12-27 03:17:33 -0600 )edit

1 - ens160: <broadcast,multicast,up,lower_up> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000 2 - br-ex: <broadcast,multicast,up,lower_up> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 192.168.80.20/24 brd 192.168.80.255 scope global br-ex

ARXC gravatar imageARXC ( 2020-01-15 07:41:16 -0600 )edit

3 - DEVICE=ens160 NAME=ens160 DEVICETYPE=ovs TYPE=OVSPort OVS_BRIDGE=br-ex ONBOOT=yes BOOTPROTO=none PROMISC=yes

4 - cat: /etc/neutron/plugins/ml2/openvswitch_agent.ini: No such file or directory

ARXC gravatar imageARXC ( 2020-01-15 07:45:11 -0600 )edit

As you can see the file openvswitch_agent.ini does not exist, I looked for it with find and it does not exist, I think there is the problem because I can not do the mapping to the physical interface, what can I do in that case?

ARXC gravatar imageARXC ( 2020-01-15 07:46:14 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-12-26 16:52:07 -0600

Seen: 138 times

Last updated: Dec 27 '19