I have installed OpenStack using DevStack on my local machine using Oracle VM Virtualbox. Then I have created an instance through OpenStack dashboard and updated security group rules to allow ssh connection. However, after launching and connecting to the instance using ssh, when I try to update the system by using sudo apt update command, the instance cannot connect to external internet and shows the following error.
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
I can ping the instance from my VM and vice versa. But I cannot ping any other website from the OpenStack instance such as google.com or 8.8.8.8 address. I am using two network interfaces, one of them is using NAT adapter (enp0s3) and second one is using Bridged adapter (enp0s8). For installation, I am using the 'stable/2023.1' branch of DevStack and Ubuntu 22.04.2 as the OS of my VM. This is the contents of my local.conf file.
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
HOST_IP=192.168.0.12
SERVICE_HOST=192.168.0.12
MYSQL_HOST=192.168.0.12
RABBIT_HOST=192.168.0.12
GLANCE_HOSTPORT=192.168.0.12:9292
# Neutron options
Q_USE_SECGROUP=True
FLOATING_RANGE=192.168.0.0/24
Q_FLOATING_ALLOCATION_POOL=start=192.168.0.245,end=192.168.0.254
PUBLIC_NETWORK_GATEWAY=192.168.0.1
PUBLIC_INTERFACE=enp0s8
# Open vSwitch provider networking configuration
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_DATA_DIR=$DEST/data
# Enable swift services
enable_service s-proxy s-object s-container s-account
This is the result of ip a command after installation is complete.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 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
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:8c:be:8a brd ff:ff:ff:ff:ff:ff
inet 192.168.0.14/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s3
valid_lft 84686sec preferred_lft 84686sec
inet6 fe80::2af2:ff8b:3994:2254/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000
link/ether 08:00:27:52:2e:96 brd ff:ff:ff:ff:ff:ff
inet6 fe80::e0dc:ad30:512f:6913/64 scope link noprefixroute
valid_lft forever preferred_lft forever
7: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 62:7b:82:59:7f:99 brd ff:ff:ff:ff:ff:ff
8: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 08:00:27:52:2e:96 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.13/24 brd 192.168.0.255 scope global br-ex
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe52:2e96/64 scope link
valid_lft forever preferred_lft forever
9: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 3e:be:07:23:fd:ff brd ff:ff:ff:ff:ff:ff
Can someone please mention do I need to add something else to configuration file or configure VM's network differently? Currently no internet access available in the instances launched through OpenStack using this configuration.