blob: 73d6ef5a0012671fd42a645611b0ffe4a9fa1f7b [file] [log] [blame]
Carmelo Casconed6615072017-12-15 00:53:43 -08001#!/usr/bin/env bash
2
3set -xe
4
5# Remove references to the existing vagrant-built VM (if any).
6# We want to build a new one from scratch, not start an existing one.
7rm -rf .vagrant/
8
9vagrant up
10
11SSH_PORT=`vagrant port --guest 22`
12VB_UUID=`cat .vagrant/machines/default/virtualbox/id`
13
14sshpass -p 'rocks' \
15 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
16 -p ${SSH_PORT} sdn@127.0.0.1 "bash /vagrant/pre-ova-cleanup.sh"
17
18vagrant halt
19
20sleep 5
21
22# Remove vagrant shared folder
23vboxmanage sharedfolder remove ${VB_UUID} -name "vagrant"
24
25rm -rf onos-p4-dev.ova
26vboxmanage export ${VB_UUID} -o onos-p4-dev.ova