First step - download nxosv-final.7.0.3.I7.3.box from Cisco's website. Add it to the list of your Vagrant boxes:
vagrant box add --name nxos-sdbx nxosv-final.7.0.3.I7.1.box
Clone or download Vagrant file and startup-config from my repo at GitHub.
Create iso file with startup-config (you can find more details here), in the directory where you put Vagrantfile and nxos_config.txt run command:
mkisofs -o nxos-sdbx.iso --iso-level 2 nxos_config.txtVagrant will configure VirtualBox to forward sandbox's ssh port to port 5522, http (NX-API) port to 8980 and NETCONF port to 8830.
Now you are ready to power up the switch:
vagrant upIt will take some time to boot, you can monitor boot progress by looking at output of
ncat -U /tmp/nxos-sdbxOnce switch is up (you'll see login prompt) you can login by either running:
ssh -p 5522 admin@localhost
In first case you'll be dropped into bash shell, type "su - admin" to get familiar CLI prompt. The password is "admin" (no quotes). In the 2nd case, just type "admin" when prompted.
If you want to test OpenConfig models on NXOS, you also need to download RPM files from Cisco's devhub. The file names are almost self-explanatory and include model's name. For example, mtx-openconfig-if-ip-1.0.0-7.0.3.I7.1.lib32_n9000.rpm contains OpenConfig model for IP interface configuration. The space in bootflash is limited, so if you want to try all available models, install one RPM at a time and delete it.
Copy file to the sandbox:
scp -P 5522 mtx-openconfig-if-ip-1.0.0-7.0.3.I7.1.lib32_n9000.rpm admin@localhost:Now, log into switch by using one of 2 ways above and run following commands:
sudo su -
yum install -y mtx-openconfig-if-ip-1.0.0-7.0.3.I7.1.lib32_n9000.rpmnow start netconf:
netconfctl startNow you can use any NETCONF client and push OpenConfig-compliant XML to the sandbox. I wrote my own simple script which you can find here. Standard disclaimer: use at your own risk, no warranty, yadda, yadda, yadda.