Luca Prete | 8137ffc | 2016-08-16 11:53:45 -0700 | [diff] [blame] | 1 | # ONOS VM Build Script |
| 2 | |
| 3 | ### Setup |
| 4 | First, install the build.py dependencies: |
| 5 | |
| 6 | $ ~/mininet/util/vm/build.py --depend |
| 7 | |
| 8 | Also, if you will be running this script in a VM, make sure that it supports nested virtualization (for KVM). |
| 9 | In VMWare Fusion, this can be enabled in: Settings > Processors & Memory > Advanced Options > Enable hypervisor application in this virtual machine |
| 10 | |
| 11 | ### Building a base image (Mininet VM) |
| 12 | The first step is to build a base image. We will use a Mininet VM as a base image because it already has Mininet and a bunch of oother dependencies installed. We can do this using the following command: |
| 13 | |
| 14 | $ ~/mininet/util/vm/build.py raring64server |
| 15 | |
| 16 | Note: This will download the ISO, install Ubuntu, and install Mininet; it may take about 15 minutes on a Macbook Pro. |
| 17 | |
| 18 | The image will be placed in a timestamped folder in the current directory. (e.g. mn-raring64server-140606-19-21-35) |
| 19 | |
| 20 | ### Building the ONOS VM |
| 21 | The ONOS VM is built from an existing VM image (probably the base image that we just created). |
| 22 | From the onos-vm directory: |
| 23 | |
| 24 | $ ./onos-build-vm.py -i mn-raring64server-*/mininet-vm-x86_64.vmdk -o onos-vm-v1 |
| 25 | Note: You should replace the image file with the correct directory. |
| 26 | |
| 27 | This script will boot the image and run the installONOS function (which just downloads a script and runs it). |
| 28 | |
| 29 | This will create onos-vm-v1.ovf and onos-vm-v1.vmdk |
| 30 | |
| 31 | To change what is installed on the VM, you should edit vm-setup.sh |