Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count=1
- for i in qemu-utils qemu-tools qemu-kvm qemu-system-x86 virt-install
- do
- write_status "${count} - Verifying dependencies ( ${i} )..."
- check_dependencies $i &>/dev/null
- count=$((count + 1))
- done
- # Lookup specific binaries: use full path since they may just have been added and not in $PATH yet.
- : "${BIN_VIRT_INSTALL:=$(type -p virt-install)}"
- # Discover if the appropriate VM net interface is (default or br'0 - n')
- VIRT_NET="$(if ls /sys/class/net |grep br |grep -v virbr >/dev/null; then echo "bridge:$(ls /sys/class/net)" |grep br ; else echo default;fi)"
- # create image and run installer
- "${BIN_VIRT_INSTALL}" --name VDI_Ubuntu_"$CONFIG"_"$RANDOM" \
- --vcpus "${2:-2}" \
- --memory "${3:-2048}" \
- --network "${VIRT_NET}" \
- --disk size="${4:-30}" \
- --os-variant="${1:-debian10}" \
- --location=http://us.archive.ubuntu.com/ubuntu/dists/hirsute/main/uefi/linux-oem-amd64/current/ \
- --initrd-inject="$PRESEED_FILE" \
- --extra-args "ks=file:/$(basename $PRESEED_FILE)" \
- --noautoconsole || read -p "An ERROR has occurred. Please press [ENTER] to continue..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement