-
Notifications
You must be signed in to change notification settings - Fork 17
vr_quick
A newly-created Virtual Router (VR) is simply a resource in OpenNebula, and as such does not perform any networking tasks by itself. To work with VR, you must first instantiate Service Virtual Router
Virtual Machines.
Let's assume you have two OpenNebula Virtual networks public and private, and you want to deploy a Virtual Router with failover capabilities so the VMs in the private network can reach the Internet. The topology will be as follows:
public network
───────────────────┬─────────────
│ FLOATING_IP (3.27.6.5)
┌─ ─ ─ ─ ─ ─ ─ ─ ─┼ ─ ─ ┐
│ Virtual Router │ │
│ ┌────┴───┐ ┌────┴───┐ │
│ │ │ │ │ │
│ │ VR-1 │ │ VR-2 │ │
│ │ │ │ │ │
│ └──eth1──┘ └──eth1──┘ │
│ │ │ │
│ 10.0.0.2 10.0.0.3 │
│ │ │
└─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─┘
│ FLOATING_IP (10.0.0.1)
───────────────────┼──────────┬──────────┬───────
Private Network │ │ │
(10.0.0.0/24) │ │ │
┌─┴──┐ ┌─┴──┐ ┌─┴──┐
│ VM │ │ VM │ │ VM │
└────┘ └────┘ └────┘
Here's a procedure to get you started:
-
Download the latest VR image:
$ oneimage create -d default --name vr1 --prefix vd --path https://marketplace.opennebula.io//appliance/cc96d537-f6c7-499f-83f1-15ac4058750e/download/0
-
Create the VR template (and customize it here, for example
CPU
,MEMORY
orCONTEXT
variables..):$ onetemplate create <<'EOF' NAME = "vr1" CONTEXT = [ NETWORK = "YES", ONEAPP_VNF_NAT4_ENABLED = "YES", ONEAPP_VNF_NAT4_INTERFACES_OUT = "eth0", SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]", TOKEN = "YES" ] CPU = "1" DISK = [ IMAGE = "vr1" ] GRAPHICS = [ LISTEN = "0.0.0.0", TYPE = "vnc" ] MEMORY = "512" NIC_DEFAULT = [ MODEL = "virtio" ] OS = [ ARCH = "x86_64" ] VROUTER = "YES" EOF
Note
NAT is enabled in the template above!
-
Create the VR:
$ onevrouter create <<'EOF' NAME = "vr1" NIC = [ NETWORK = "service", FLOATING_IP = "YES", FLOATING_ONLY = "YES" ] NIC = [ NETWORK = "private", FLOATING_IP = "YES", FLOATING_ONLY = "NO" ] EOF
-
Create VR instances (we are using 2 VMs in the command below for the sake of failover):
$ onevrouter instantiate vr1 vr1 --multiple 2 ...
-
Update the private Virtual Network so the
DEFAULT_GW
points to theVROUTER_IP
in the private network.
- OpenNebula Apps Overview
- OS Appliances Update Policy
- OneApps Quick Intro
- Build Instructions
- Linux Contextualization Packages
- Windows Contextualization Packages
- OneKE (OpenNebula Kubernetes Edition)
- Virtual Router
- Overview & Release Notes
- Quick Start
- OpenRC Services
- Virtual Router Modules
- Glossary
- WordPress
- Harbor Container Registry
- MinIO
- Ray AI
- Development