I've read multiple posts asking the same question, on KVM and open nebula forums and in general virtualization ones but have only found partial or bogus answers.
Some Info:
- Objective: Be able to rent VPSs deployed on O.N.
- Ubuntu Server 18.04 installed a few days ago, updated
- ON is in a single host config (front-end & host are one)
- I've got a /29 IP block, would like to use those IPs on VMs
Here's what I've gathered (and attempted) so far:
Based on the OpenNebula docs I've setup the OVS bridge like so:
# Create bridge and add port
ovs-vsctl add-br ovsbr0
ovs-vsctl add-port ovsbr0 enp3s0
# Change external IP address from port to bridge
ip addr flush dev enp3s0
ip addr add xxx.xxx.110.50/29 dev ovsbr0
ip link set ovsbr0 up
ip route add default via xxx.xxx.110.49 dev ovsbr0
This leaves me with access to the internet alright, and the bridge setup just like their example:
dba23490-cd85-40f4-a3b5-dfe9c4e2e60a
Bridge "ovsbr0"
Port "enp3s0"
Interface "enp3s0"
Port "ovsbr0"
Interface "ovsbr0"
type: internal
ovs_version: "2.9.2"
cool! Well, this is the part where I'm lost. What now? how do I add this to Open Nebula so my new VMs have external IPs?
In case I'm failing hard, what other way could I do this?
Some other info that might be useful:
# ip addr
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: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000
link/ether 00:25:90:62:f9:60 brd ff:ff:ff:ff:ff:ff
3: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:25:90:62:f9:61 brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:c6:e4:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:c6:e4:3e brd ff:ff:ff:ff:ff:ff
17: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether fa:1d:97:0a:8e:1c brd ff:ff:ff:ff:ff:ff
18: ovsbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 00:25:90:62:f9:60 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.110.50/29 scope global ovsbr0
valid_lft forever preferred_lft forever
# ip route
default via xxx.xxx.110.49 dev ovsbr0
xxx.xxx.110.48/29 dev ovsbr0 proto kernel scope link src xxx.xxx.110.50
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
Thanks in advance. Link to my OpenNebula forums post