Poor Man’s VIRL How to run VIRL 1.0.0 as Bare Metal on resource-constrained PC (works on 1.0.11 as well) Dec 30, 2015 Kaoru Yamashita 20 nodes topology runs on Intel Core i5 (Dual Core), 16GB DRAM, 128GB SSD My tiny VIRL Server : about 400 – 500 USD Lenovo ThinkPad T520 Core i5-2540M 16GB DRAM Note: Hyper-Threading (HT) is disabled. USB NIC SSD Limitations • IPv4 address for eth0 should be static. (i.e. DHCP does not work) • To save CPU power and DRAM, please start nodes one by one. • (As far as I know) Hostname of Ubuntu should be “virl”. Solution (maybe Tricky and Dirty) • Save CPU Power • Launch each instance on by one --- check “Exclude node from simulation launch” • Rename “dummy” Linux virtual NICs to “eth<n>” • Run UKSM-enabled kernel to save DRAM • UKSM (Ultra KSM) is a kernel patch to perform memory de-duplication What you need • • • • • • Laptop PC (or x86 server) SSD At least one physical NIC (in this document, two NICs are used) DVD-ROM Drive (Physical or Virtual) DVD-ROM Media of virl.1.0.0.iso (Physical or Virtual) PC or Mac to run ssh client and VMmaestro (Or you can use graphical desktop of Ubuntu) • DHCP Server (used during initial installation) • Internet connection • License of VIRL • Don’t use VMware products if you want to achieve maximum performance. 1. Boot from DVD-ROM Select first item, “live” 1. Boot from DVD-ROM (cont.) Wait for a while 2. Login Password: VIRL 2. Login (cont.) 3. Initialize SSD (if it is not new) sudo sgdisk –Z /dev/sda 3. Initialize SSD (cont.) 4. Start Installer 5. Specify Parameters 5. Specify Parameters (cont.) Make sure that primary NIC is connected 5. Specify Parameters (cont.) Check this Item 5. Specify Parameters (cont.) 5. Specify Parameters (cont.) 5. Specify Parameters (cont.) 6. Installer is running 7. Installer ends Caution! • In most cases, VIRL 1.0.0 ISO installer does not ask about hostname. In other word, the installer does not expose below dialog. • This is known issue. • So we have to fix this by changing hostname manually. (see later slides) 8. Boot from SSD, login and start xterm. Then... sudo hostnamectl set-hostname virl sudo apt-get –y remove openssh-server sudo apt-get –y install openssh-server sudo reboot 9. Reboot and pick IPv4 address of eth0 Now you can ssh from your favorite client 10. Edit configuration files • /etc/hosts • /etc/network/interfaces • /etc/virl.ini • /etc/virl/common.cfg • /etc/modues (type “sudo –s” before editing but this is somewhat dangerous) /etc/hosts • Modify 127.0.1.1 to 127.0.1.1 ubuntu virl /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.0.80/24 gateway 192.168.0.1 dns-nameservers 192.168.0.1 auto lo iface lo inet loopback auto lo:1 iface lo:1 inet loopback address 127.0.1.1 netmask 255.0.0.0 auto eth1 iface eth1 inet static address 172.16.1.254/24 netmask 255.255.255.0 post-up ip link set eth1 promisc on auto dummy0 iface dummy0 inet manual pre-up ip link set dev dummy0 name eth2 pre-up ifconfig eth2 172.16.2.254/24 up post-up ip link set eth2 promisc on auto dummy1 iface dummy1 inet manual pre-up ip link set dev dummy1 name eth3 pre-up ifconfig eth3 172.16.3.254/24 up auto dummy2 iface dummy2 inet manual pre-up ip link set dev dummy2 name eth4 pre-up ifconfig eth4 172.16.10.250/24 pre-up ifconfig eth4 mtu 1500 post-up ip link set eth4 promisc on [Note] eth0 should be static. DHCP will not work. /etc/virl.ini using_dhcp_on_the_public_port: False salt_master: us-virl-salt.cisco.com (or) salt_master: eu-virl-salt.cisco.com /etc/virl/common.cfg ram_overcommit = 5 default = 2. 6 or larger will not be allowed. /etc/modules dummy numdummies=3 default = 5. This is why there are dummy0 to dummy4 by default. 11. reboot and confirm settings • In this example, you can ssh to 192.168.0.80 • Check five NICs by typing “ifconfig eth0”, “ifconfig eth1”, “ifconfig eth2”, “ifconfig eth3” and “ifconfig eth4”. 12. “vinstall salt” and “vinstall rehost” • You don’t have to switch to root. These commands can run as “virl”. • “vinstall rehost” takes some minutes to complete. • Please reboot when “vinstall rehost” finishes. 13. Almost done! • Your VIRL server is almost ready. • Run below commands to check status • neutron agent-list • nova service-list • sudo virl_health_status • Please perform activation. • • • • NTP setting Install VIRL license key Add CSR1000V image Upgrade IOSv image • Once you can run small topologies on your VIRL server, proceed to next slide. 14. Introduce UKSM-enabled kernel • Visit http://lansw-book.net/VIRL/Poor/ to download kernel files (and latest copy of this document) • Then switch to root, put two files under /usr/src, and perform “dpkg –i” twice. • dpkg -i linux-headers-3.13.11-ckt27_20151201UKSM_amd64.deb • dpkg -i linux-image-3.13.11-ckt27_20151201UKSM_amd64.deb • Edit /etc/default/grub as next slide • And “update-grub2” • reboot /etc/default/grub GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.11-ckt27” Issues on UKSM-enabled kernel • LACP and LLDP do not work between nodes e.g. You can not form dynamic port-channel between vEOS nodes. If you’re stuck