How to install OSM on VirtualBox: Difference between revisions
mNo edit summary |
Ramonsalguer (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
'''Deprecated:''' Please refer to https://osm.etsi.org/docs/user-guide/ | |||
--- | |||
VirtualBox has different networking setup modes (see [https://www.virtualbox.org/manual/ch06.html Table 6.1]) | VirtualBox has different networking setup modes (see [https://www.virtualbox.org/manual/ch06.html Table 6.1]) | ||
Line 24: | Line 28: | ||
5) Restart the network services, then the VM should be reachable in ssh from the host using the static IP address | 5) Restart the network services, then the VM should be reachable in ssh from the host using the static IP address | ||
sudo service networking restart | sudo service networking restart | ||
6) Configure LXD following the instructions: [https://osm.etsi.org/wikipub/index.php/ | 6) Configure LXD following the instructions: [https://osm.etsi.org/wikipub/index.php/LXD_configuration_for_OSM_Release_THREE OSM Release THREE LXD config] | ||
7) Install OSM following the instructions: [https://osm.etsi.org/wikipub/index.php/OSM_Release_THREE OSM Three install] | 7) Install OSM following the instructions: [https://osm.etsi.org/wikipub/index.php/OSM_Release_THREE OSM Three install] |
Latest revision as of 13:49, 29 September 2021
Deprecated: Please refer to https://osm.etsi.org/docs/user-guide/
---
VirtualBox has different networking setup modes (see Table 6.1)
In case we want to install OSM on VirtualBox, it needs an IP address that remains the same across reboots.
If the host is attached to DHCP and you cannot access the router to assign the same IP to your VMs, "bridged" mode could be difficult to manage. So, a possible alternative is to have two network adapters: one NAT that allows the VMs to access Internet + one Host-Only that allows static address on the VM and traffic from Host to VM.
OSM can be configured like that using the procedure below, tested on OSM Rel THREE.
1) Create a VM on VirtualBox (e.g. 8GB RAM, 40GB DISK)
2) Configure network with 2 adapters: NAT + Host-Only
3) Install OpenSSH server (sudo apt-get install openssh-server) and update Ubuntu (sudo apt-get update)
4) Add a static address to the "Host-only" adapter (e.g. enp0s8 with static IP 10.20.0.90), e.g. appending the following to "/etc/network/interfaces":
auto enp0s8 iface enp0s8 inet static address 10.20.0.90 netmask 255.255.255.0 network 10.20.0.0 broadcast 10.20.0.255
5) Restart the network services, then the VM should be reachable in ssh from the host using the static IP address
sudo service networking restart
6) Configure LXD following the instructions: OSM Release THREE LXD config
7) Install OSM following the instructions: OSM Three install
wget https://osm-download.etsi.org/ftp/osm-3.0-three/install_osm.sh chmod +x install_osm.sh
8) Before launching the installation, modify install_osm.sh, find export_ips (2 times!), and add a line afterwards with:
export DEFAULT_IP=10.20.0.90
where DEFAULT_IP is the static IP address configured for host-only network)
9) Install OSM
./install_osm.sh
10) When the installation is over, a final step to configure NAT
git clone https://osm.etsi.org/gerrit/osm/devops.git temp vi temp/installers/export_ips #Change the DEFAULT_IF to DEFAULT_IF=enp0s8 (the interface used for Host-only network configuration) sudo ./temp/installers/nat_osm # in order to apply NAT rules
11) Check NAT rules in "/etc/iptables/rules.v4".
12) Access OSM GUI using https://10.20.0.90:8443 (admin/admin). You can also ssh to the Virtualbox VM running OSM (ssh ubuntu@10.20.0.90)