poor man’s virl how to run virl 1.0.0 as bare metal on resource-constrained pc (works on 1.0.11 as...
TRANSCRIPT
![Page 1: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/1.jpg)
Poor Man’s VIRLHow to run VIRL 1.0.0 as Bare Metal
on resource-constrained PC(works on 1.0.11 as well)
Dec 30, 2015Kaoru Yamashita
![Page 2: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/2.jpg)
20 nodes topology runs on Intel Core i5(Dual Core), 16GB DRAM, 128GB SSD
![Page 3: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/3.jpg)
My tiny VIRL Server : about 400 – 500 USD
Lenovo ThinkPad T520Core i5-2540M
16GB DRAM
Note: Hyper-Threading(HT) is disabled.
USB NIC
SSD
![Page 4: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/4.jpg)
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”.
![Page 5: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/5.jpg)
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
![Page 6: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/6.jpg)
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.
![Page 7: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/7.jpg)
1. Boot from DVD-ROM
Select first item, “live”
![Page 8: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/8.jpg)
1. Boot from DVD-ROM (cont.)
Wait for a while
![Page 9: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/9.jpg)
2. Login
Password: VIRL
![Page 10: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/10.jpg)
2. Login (cont.)
![Page 11: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/11.jpg)
3. Initialize SSD (if it is not new)
sudo sgdisk –Z /dev/sda
![Page 12: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/12.jpg)
3. Initialize SSD (cont.)
![Page 13: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/13.jpg)
4. Start Installer
![Page 14: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/14.jpg)
5. Specify Parameters
![Page 15: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/15.jpg)
5. Specify Parameters (cont.)
Make sure that primary NIC is connected
![Page 16: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/16.jpg)
5. Specify Parameters (cont.)
Check this Item
![Page 17: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/17.jpg)
5. Specify Parameters (cont.)
![Page 18: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/18.jpg)
5. Specify Parameters (cont.)
![Page 19: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/19.jpg)
5. Specify Parameters (cont.)
![Page 20: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/20.jpg)
6. Installer is running
![Page 21: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/21.jpg)
7. Installer ends
![Page 22: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/22.jpg)
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 hostnamemanually.(see later slides)
![Page 23: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/23.jpg)
8. Boot from SSD, login and start xterm. Then...
sudo hostnamectl set-hostname virlsudo apt-get –y remove openssh-serversudo apt-get –y install openssh-serversudo reboot
![Page 24: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/24.jpg)
9. Reboot and pick IPv4 address of eth0 Now you can ssh from your favorite client
![Page 25: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/25.jpg)
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)
![Page 26: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/26.jpg)
/etc/hosts
• Modify127.0.1.1 ubuntu
to127.0.1.1 virl
![Page 27: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/27.jpg)
/etc/network/interfacesauto eth0iface eth0 inet static address 192.168.0.80/24 gateway 192.168.0.1 dns-nameservers 192.168.0.1auto loiface lo inet loopbackauto lo:1iface lo:1 inet loopback address 127.0.1.1 netmask 255.0.0.0auto eth1iface eth1 inet static address 172.16.1.254/24 netmask 255.255.255.0 post-up ip link set eth1 promisc onauto dummy0iface 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 onauto dummy1iface dummy1 inet manual pre-up ip link set dev dummy1 name eth3 pre-up ifconfig eth3 172.16.3.254/24 upauto dummy2iface 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.
![Page 28: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/28.jpg)
/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
![Page 29: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/29.jpg)
/etc/virl/common.cfg
ram_overcommit = 5
default = 2. 6 or larger will not be allowed.
![Page 30: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/30.jpg)
/etc/modules
dummy numdummies=3
default = 5. This is why there are dummy0 to dummy4 by default.
![Page 31: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/31.jpg)
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”.
![Page 32: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/32.jpg)
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.
![Page 33: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/33.jpg)
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.
![Page 34: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/34.jpg)
14. Introduce UKSM-enabled kernel
• Visithttp://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
![Page 35: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/35.jpg)
/etc/default/grub
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.11-ckt27”
![Page 36: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/36.jpg)
Issues on UKSM-enabled kernel
• LACP and LLDP do not work between nodese.g. You can not form dynamic port-channel between vEOS nodes.
![Page 37: 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](https://reader030.vdocuments.mx/reader030/viewer/2022033105/5697c0141a28abf838ccd354/html5/thumbnails/37.jpg)
If you’re stuck