numam-spdk/scripts/vagrant/create_nvme_img.sh
John Meneghini e3a7138571 test: add support for multiple oses with vagrant
- Add vagrant create_vbox.sh script
   . This script replace env.sh
 - Refactor Vagrantfile
   . Add support for fedora28, Ubuntu18, and FreeBSD 11
   . Changes to provisioning rules
   . Removed build.sh
   . Changes to support vm_setup.sh on vagrant with Fedora 26
 - Add vagrant README.md
   . Instructions for provisioning different VMs
   . Post VM Initialization done with update.sh
 - Add vagrant run-autorun.sh script
   . Changes to run autotest.sh on vagrant with Fedora 26

Change-Id: I8a34273361dd4233241326b0cd31189cf511f503
Signed-off-by: John Meneghini <johnm@netapp.com>
Signed-off-by: Ed Rodriguez <ed.rodriguez@netapp.com>
Reviewed-on: https://review.gerrithub.io/414861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2018-07-19 17:19:37 +00:00

17 lines
381 B
Bash
Executable File

#!/usr/bin/env bash
SYSTEM=`uname -s`
if [ ! "${SYSTEM}" = "FreeBSD" ]; then
WHICH_OS=`lsb_release -i | awk '{print $3}'`
nvme_disk='/var/lib/libvirt/images/nvme_disk.img'
qemu-img create -f raw $nvme_disk 1024M
#Change SE Policy on Fedora
if [ $WHICH_OS == "Fedora" ]; then
sudo chcon -t svirt_image_t $nvme_disk
fi
chmod 777 $nvme_disk
chown qemu:qemu $nvme_disk
fi