Skip to content

Commit ddc2e7f

Browse files
Merge pull request #4265 from eranco74/pool
NO-ISSUE: Allow using custom pool for the dev vm disk
2 parents b485392 + 10cff9a commit ddc2e7f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

scripts/devenv-builder/create-vm.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ SYSROOTSIZE=$(( SYSROOTSIZE * 1024 ))
4040
SWAPSIZE=$(( SWAPSIZE * 1024 ))
4141
# Network name
4242
NETWORK=${NETWORK:-default}
43+
# Pool name - determin the pool for vm disk the volume
44+
MICROSHIFT_VOL_POOL="${MICROSHIFT_VOL_POOL:-default}"
45+
4346

4447
KICKSTART_FILE=$(mktemp "/tmp/kickstart-${VMNAME}-XXXXX.ks")
4548
cat < "${ROOTDIR}/config/kickstart.ks.template" | \
@@ -57,7 +60,7 @@ virt-install \
5760
--name ${VMNAME} \
5861
--vcpus ${NCPUS} \
5962
--memory ${RAMSIZE} \
60-
--disk path=./${VMNAME}.qcow2,size=${DISKSIZE} \
63+
--disk pool=${MICROSHIFT_VOL_POOL},path=./${VMNAME}.qcow2,size=${DISKSIZE} \
6164
--network network=${NETWORK},model=virtio \
6265
--events on_reboot=restart \
6366
--location ${ISOFILE} \

scripts/devenv-builder/manage-vm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function action_create {
9090
export DISKSIZE="${DISKSIZE:-100}"
9191
export SWAPSIZE="${SWAPSIZE:-8}"
9292
export DATAVOLSIZE="${DATAVOLSIZE:-2}"
93+
export MICROSHIFT_VOL_POOL="${MICROSHIFT_VOL_POOL}"
9394
if [ -z "${ISOFILE}" ]; then
9495
ISOFILE="${VMDISKDIR}/$(get_base_isofile "${MICROSHIFT_RHEL_VERSION}")"
9596
fi

0 commit comments

Comments
 (0)