Skip to content

Commit

Permalink
virt-install-ubuntu: Make vcpus and memory configurable.
Browse files Browse the repository at this point in the history
Fixes #18.
  • Loading branch information
sbates130272 committed Nov 21, 2024
1 parent ce4469d commit d678828
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libvirt/virt-install-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ PASS=${PASS:-password}
PACKAGES=${PACKAGES:-../packages.d/packages-default}
FILESYSTEM=${FILESYSTEM:-none}
BRIDGE=${BRIDGE:-none}
MEMORY=${MEMORY:-8192}
VCPUS=${VCPUS:-4}

if [ $RELEASE == "bionic" ]; then

Expand All @@ -100,8 +102,8 @@ if [ $RELEASE == "bionic" ]; then
virt-install \
--connect qemu:///system \
--name ${NAME} \
--memory 1024 \
--vcpus 1 \
--memory ${MEMORY} \
--vcpus ${VCPUS} \
--virt-type kvm \
--disk size=${SIZE} \
--graphics none \
Expand Down Expand Up @@ -256,7 +258,8 @@ virt-install \
--name ${NAME} \
--osinfo ${OSINFO} \
--cloud-init user-data=cloud-config-${NAME},network-config=network-config-${NAME} \
--memory 1024 \
--vcpus ${VCPUS} \
--memory ${MEMORY} \
--disk vol=default/${NAME}.qcow2,device=disk \
${FILESYSTEM} \
--virt-type kvm \
Expand Down

0 comments on commit d678828

Please sign in to comment.