echo 'user ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/userecho fs.inotify.max_queued_events=1048576 | sudo tee -a /etc/sysctl.conf
echo fs.inotify.max_user_instances=1048576 | sudo tee -a /etc/sysctl.conf
echo fs.inotify.max_user_watches=1048576 | sudo tee -a /etc/sysctl.conf
echo vm.max_map_count=262144 | sudo tee -a /etc/sysctl.conf
echo vm.swappiness=1 | sudo tee -a /etc/sysctl.confecho net.ipv6.conf.all.disable_ipv6=1 | sudo tee -a /etc/sysctl.conf
echo net.ipv6.conf.default.disable_ipv6=1 | sudo tee -a /etc/sysctl.conf
echo net.ipv6.conf.lo.disable_ipv6=1 | sudo tee -a /etc/sysctl.confPersist to grub:
sudo vim /etc/default/grub
# find these options and replace them with
# speed up boot
GRUB_TIMEOUT=1
# disable IPv6
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
sudo update-grub
sudo rebootsudo snap remove lxdsudo snap install microstack --devmode --betasudo snap alias microstack.openstack openstack
sudo snap alias microstack.ovs-vsctl ovs-vsctlsudo microstack init --auto --controlMove host IP address from the physical interface to Open vSwitch managed bridge.
sudo tee /usr/local/bin/microstack-br-workaround > /dev/null << EOL
#!/bin/bash
ovs-vsctl add-port br-ex enp5s0 || :
ip addr flush dev enp5s0 || :
ip address add 192.168.1.100/24 dev br-ex || :
ip link set br-ex up || :
ip route add default via 192.168.1.1 || :
EOL
sudo chmod +x /usr/local/bin/microstack-br-workaround
sudo /usr/local/bin/microstack-br-workaroundsudo tee /etc/systemd/system/microstack-br-workaround.service > /dev/null << EOL
[Unit]
Description=Service for adding physical ip to microstack bridge
Requires=snap.microstack.external-bridge.service
After=snap.microstack.external-bridge.service
[Service]
ExecStart=/usr/local/bin/microstack-br-workaround
SyslogIdentifier=microstack-br-workaround
Restart=no
WorkingDirectory=/usr/local/bin
TimeoutStopSec=30
Type=oneshot
[Install]
WantedBy=multi-user.target
EOLsudo systemctl daemon-reload
sudo systemctl enable microstack-br-workaround.servicesudo tee /etc/systemd/resolved.conf > /dev/null << EOL
[Resolve]
DNS=1.1.1.1
EOL
```shell
Restart the systemd service
```shell
sudo systemctl restart systemd-resolved.servicesudo rebootopenstack router remove subnet test-router test-subnet
openstack router unset --external-gateway test-router
openstack router delete test-routeropenstack subnet delete test-subnet external-subnet
openstack network delete test externalopenstack quota set \
--secgroups -1 \
--cores 128 \
--instances 100 \
--ram 52000 \
adminopenstack network create \
--enable \
--project admin \
--external \
--default \
--provider-network-type flat \
--provider-physical-network physnet1 \
publicSubnet without DHCP:
openstack subnet create \
--project admin \
--subnet-range 192.168.1.0/24 \
--no-dhcp \
--gateway 192.168.1.1 \
--network public \
--allocation-pool start=192.168.1.200,end=192.168.1.250 \
publicopenstack network create \
--enable \
--project admin \
--internal \
privateSubnet with DHCP:
openstack subnet create \
--project admin \
--subnet-range 10.10.0.0/24 \
--dhcp \
--network private \
privateopenstack router create \
--disable \
--project admin \
routerAttach the router to private network:
openstack router add subnet router privateSet the router gateway through public network and enable SNAT:
openstack router set \
--enable \
--enable-snat \
--external-gateway public \
routerfor i in $(seq 1 50)
do
openstack floating ip create public >/dev/null
donessh-keygen -q -t rsa -f ~/.ssh/id_rsa -N ''
openstack keypair create --public-key ~/.ssh/id_rsa.pub default Delete default security group:
SEC_GROUP=$(openstack security group list --project admin -c ID -f value)
openstack security group delete $SEC_GROUPCreate allow-all security group:
openstack security group create --project admin allowDelete default rules:
openstack security group rule list allow -f value -c ID \
| xargs -n1 -I{} openstack security group rule delete {}Add allow-all rules.
Ingress:
openstack security group rule create allow \
--project admin \
--ethertype IPv4 \
--ingressEgress:
openstack security group rule create allow \
--project admin \
--ethertype IPv4 \
--egressopenstack flavor list -c Name -f value \
| xargs -n1 -I{} openstack flavor delete {}1,2,4,8 VCPUs; 1024, 2048, 4096, 8192 RAM; 5, 10, 20 disk.
for i in 1 2 4 8
do
for j in 1024 2048 4096 8192
do
for k in 5 10 20
do
openstack flavor create "$i.$j.$k" --vcpus $i --ram $j --disk $k >/dev/null
done
done
done
openstack flavor list --sort-column VCPUs --sort-column RAM --sort-column Disk -c Name -c VCPUs -c RAM -c DiskRedefine the SERIES with another Ubuntu release (e.g. bionic, xenial) if necessary.
SERIES=focal
wget https://cloud-images.ubuntu.com/${SERIES}/current/${SERIES}-server-cloudimg-amd64.imgopenstack image create ubuntu.${SERIES} \
--public \
--disk-format=qcow2 \
--container-format=bare \
--property os_distro='ubuntu' \
--file=${SERIES}-server-cloudimg-amd64.imghttps://docs.openstack.org/barbican/ussuri/
https://docs.openstack.org/octavia/ussuri/
https://docs.openstack.org/designate/latest/intro/index.html
TODO: investigate possibility to use let's encrypt
openstack server create \
--image ubuntu.focal \
--flavor 8.2048.5 \
--security-group allow \
--key-name default \
--network private \
--wait \
testFLOAT_IP=$(openstack floating ip list -f value | grep None | head -n1 | awk '{print $2}')
openstack server add floating ip test $FLOAT_IPssh ubuntu@$FLOAT_IPopenstack server delete test


Hi @anazeer-netstratum,
It's hard to say what happened in your case just by looking at ifconfig. Have you checked the routing table?
Also I did a restart after the last line just to check that network indeed works as expected.
I'm planning to rebuild that workaround with a proper netplan configuration.
And there's another issue btw that you may encounter later related to default ubuntu systemd resolv.conf.
The issue is that openstack, by default, will inherit the /etc/resolv.conf which just contains a link to local dnsmasq systemd service which is obviously not available in the VM's private network.
The solution is to replace the systemd service with static configuration via resolvconf snap or with some other similar workarounds.
Stay tuned for updates.
Best regards,
Matt