3 # A shell script to build the VPP VM image using diskinage-builder
5 # The following packages must be installed prior to using this script:
6 # sudo apt-get -y install python-virtualenv qemu-utils kpartx
10 image_name=nfvbenchvm_centos-$__version__
12 # install diskimage-builder
13 if [ -d dib-venv ]; then
14 . dib-venv/bin/activate
17 . dib-venv/bin/activate
18 pip install diskimage-builder
21 # Add nfvbenchvm_centos elements directory to the DIB elements path
22 export ELEMENTS_PATH=`pwd`/elements
24 # canned user/password for direct login
25 export DIB_DEV_USER_USERNAME=nfvbench
26 export DIB_DEV_USER_PASSWORD=nfvbench
27 export DIB_DEV_USER_PWDLESS_SUDO=Y
29 # Set the data sources to have ConfigDrive only
30 export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
33 export DIB_YUM_REPO_CONF=$ELEMENTS_PATH/nfvbenchvm/fdio-release.repo
35 # Use ELRepo to have latest kernel
36 export DIB_USE_ELREPO_KERNEL=True
38 echo "Building $image_name.qcow2..."
39 time disk-image-create -o $image_name centos7 nfvbenchvm
41 ls -l $image_name.qcow2