diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/spdk/scripts/vagrant/create_openstack_vm.sh | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/scripts/vagrant/create_openstack_vm.sh')
-rwxr-xr-x | src/spdk/scripts/vagrant/create_openstack_vm.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/spdk/scripts/vagrant/create_openstack_vm.sh b/src/spdk/scripts/vagrant/create_openstack_vm.sh new file mode 100755 index 000000000..a747b2808 --- /dev/null +++ b/src/spdk/scripts/vagrant/create_openstack_vm.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -e + +testdir=$(readlink -f $(dirname $0)) +SPDK_DIR=$(readlink -f $testdir/../..) +VAGRANT_TARGET="$PWD" +VAGRANT_DISTRO="ubuntu18" + +export SPDK_DIR +export SPDK_VAGRANT_VMRAM=8192 +export SPDK_VAGRANT_VMCPU=10 + +mkdir -vp "${VAGRANT_TARGET}/${VAGRANT_DISTRO}" +cp "${testdir}/Vagrantfile_openstack_vm" "${VAGRANT_TARGET}/${VAGRANT_DISTRO}/Vagrantfile" + +pushd "${VAGRANT_TARGET}/${VAGRANT_DISTRO}" +if [ -n "${http_proxy}" ]; then + export http_proxy +fi + +VBoxManage setproperty machinefolder "${VAGRANT_TARGET}/${VAGRANT_DISTRO}" +vagrant up +vagrant halt +VBoxManage setproperty machinefolder default + +# Convert Vbox .vmdk image to qcow2 +vmdk_img=$(find ${VAGRANT_TARGET}/${VAGRANT_DISTRO} -name "ubuntu-18.04-amd64-disk001.vmdk") +qemu-img convert -f vmdk -O qcow2 ${vmdk_img} ${VAGRANT_TARGET}/${VAGRANT_DISTRO}/openstack_vm_image.qcow2 + +echo "" +echo " SUCCESS!" +echo "" |