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)}"
- : ${FedoraVersion:="34"}
- # 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}" --connect qemu:///system --name VDI_fedora_"${CONFIG}"_"${RANDOM}" \
- --vcpus "${2:-2}" \
- --memory "${3:-2048}" \
- --network "$VIRT_NET" \
- --disk size="${4:-40}" \
- --os-variant="${1:-fedora30}" \
- --initrd-inject="${PRESEED_FILE}" \
- --location="http://www.nic.funet.fi/pub/Linux/INSTALL/fedora/linux/releases/${FedoraVersion}/Everything/x86_64/os/" \
- --extra-args "ks=file:/$(basename $PRESEED_FILE)" \
- --noautoconsole || read -p "An ERROR has occurred. Please press [ENTER] to continue..."
- $RTD_GUI --backtitle "$BRANDING" --title "NOTICE!" --msgbox "The virtual machine is currently being built. You may attach to this server and see the progress at IP: $(hostname -I))" 10 60
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement