mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
b3edcfcc1c
3 changed files with 626 additions and 281 deletions
30
README.md
30
README.md
|
@ -31,9 +31,12 @@ comprehensive support for macOS and Windows**.
|
||||||
* **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra
|
* **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra
|
||||||
* **Windows** 8.1, 10 and 11 including TPM 2.0
|
* **Windows** 8.1, 10 and 11 including TPM 2.0
|
||||||
* [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)**
|
* [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)**
|
||||||
|
* [Debian](https://www.debian.org/) (bullseye with all the official and non-free DE variants)
|
||||||
* [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/))
|
* [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/))
|
||||||
|
* [Alma Linux](https://almalinux.org/)
|
||||||
* [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/)
|
* [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/)
|
||||||
* [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/), [NixOS](https://nixos.org/) & [Gentoo Linux](https://www.gentoo.org/)
|
* [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/), [NixOS](https://nixos.org/), [Gentoo Linux](https://www.gentoo.org/),
|
||||||
|
* [Oracle Linux](https://www.oracle.com/linux/) and [Rocky Linux](https://rockylinux.org/)
|
||||||
* [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release )
|
* [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release )
|
||||||
* [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/)
|
* [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/)
|
||||||
* Full SPICE support including host/guest clipboard sharing
|
* Full SPICE support including host/guest clipboard sharing
|
||||||
|
@ -173,21 +176,22 @@ preferred flavour.
|
||||||
|
|
||||||
`quickget` also supports:
|
`quickget` also supports:
|
||||||
|
|
||||||
|
* `alma`
|
||||||
* `archlinux`
|
* `archlinux`
|
||||||
|
* `debian`
|
||||||
* `elementary`
|
* `elementary`
|
||||||
* `fedora`
|
* `fedora`
|
||||||
* `garuda`
|
* `garuda`
|
||||||
* `gentoo`
|
* `gentoo`
|
||||||
* `kali`
|
* `kali`
|
||||||
* `linuxmint-cinnamon`
|
* `kdeneon`
|
||||||
* `linuxmint-mate`
|
* `linuxmint`
|
||||||
* `linuxmint-xfce`
|
* `nixos`
|
||||||
* `opensuse`
|
* `opensuse`
|
||||||
|
* `oraclelinux`
|
||||||
* `popos`
|
* `popos`
|
||||||
* `regolith`
|
* `regolith`
|
||||||
* `nixos-gnome`
|
* `rockylinux`
|
||||||
* `nixos-plasma5`
|
|
||||||
* `nixos-minimal`
|
|
||||||
* `zorin`
|
* `zorin`
|
||||||
|
|
||||||
Or you can download a Linux image and manually create a VM configuration.
|
Or you can download a Linux image and manually create a VM configuration.
|
||||||
|
@ -212,6 +216,13 @@ quickemu --vm debian-bullseye.conf
|
||||||
* Install the SPICE agent (`spice-vdagent`) to enable copy/paste and USB redirection.
|
* Install the SPICE agent (`spice-vdagent`) to enable copy/paste and USB redirection.
|
||||||
* Install the SPICE WebDAV agent (`spice-webdavd`) to enable file sharing.
|
* Install the SPICE WebDAV agent (`spice-webdavd`) to enable file sharing.
|
||||||
|
|
||||||
|
## BSD Guests
|
||||||
|
|
||||||
|
`quickget` also supports:
|
||||||
|
|
||||||
|
* `freebsd`
|
||||||
|
* `openbsd`
|
||||||
|
|
||||||
## macOS Guest
|
## macOS Guest
|
||||||
|
|
||||||
`quickget` automatically downloads a macOS recovery image and creates a virtual
|
`quickget` automatically downloads a macOS recovery image and creates a virtual
|
||||||
|
@ -498,8 +509,9 @@ Usage
|
||||||
quickemu --vm ubuntu.conf
|
quickemu --vm ubuntu.conf
|
||||||
|
|
||||||
You can also pass optional parameters
|
You can also pass optional parameters
|
||||||
--delete : Delete the disk image.
|
--delete-disk : Delete the disk image and EFI variables
|
||||||
--display : Select display backend. 'sdl' (default), 'gtk', 'none' or 'spice'
|
--delete-vm : Delete the entire VM and it's configuration
|
||||||
|
--display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'
|
||||||
--fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)
|
--fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)
|
||||||
--ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers
|
--ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers
|
||||||
--screen <screen> : Use specified screen to determine the window size.
|
--screen <screen> : Use specified screen to determine the window size.
|
||||||
|
|
129
quickemu
129
quickemu
|
@ -37,7 +37,15 @@ function ignore_msrs_alert() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function disk_delete() {
|
function delete_shortcut() {
|
||||||
|
local SHORTCUT_DIR="${HOME}/.local/share/applications/"
|
||||||
|
if [ -e "${SHORTCUT_DIR}/${VMNAME}.desktop" ]; then
|
||||||
|
rm "${SHORTCUT_DIR}/${VMNAME}.desktop"
|
||||||
|
echo "Deleted ${VM} desktop shortcut"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_disk() {
|
||||||
if [ -e "${disk_img}" ]; then
|
if [ -e "${disk_img}" ]; then
|
||||||
rm "${disk_img}"
|
rm "${disk_img}"
|
||||||
# Remove any EFI vars, but not for macOS
|
# Remove any EFI vars, but not for macOS
|
||||||
|
@ -46,14 +54,20 @@ function disk_delete() {
|
||||||
rm "${VMDIR}/${VMNAME}-vars.fd" >/dev/null 2>&1
|
rm "${VMDIR}/${VMNAME}-vars.fd" >/dev/null 2>&1
|
||||||
rm "${VMPATH}/${VMDIR}/${VMNAME}-vars.fd" > /dev/null 2>&1
|
rm "${VMPATH}/${VMDIR}/${VMNAME}-vars.fd" > /dev/null 2>&1
|
||||||
echo "SUCCESS! Deleted ${disk_img}"
|
echo "SUCCESS! Deleted ${disk_img}"
|
||||||
|
delete_shortcut
|
||||||
else
|
else
|
||||||
echo "NOTE! ${disk_img} not found. Doing nothing."
|
echo "NOTE! ${disk_img} not found. Doing nothing."
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
local SHORTCUT_DIR="${HOME}/.local/share/applications/"
|
function delete_vm() {
|
||||||
if [ -e "${SHORTCUT_DIR}/${VMNAME}.desktop" ]; then
|
if [ -d "${VMDIR}" ]; then
|
||||||
rm "${SHORTCUT_DIR}/${VMNAME}.desktop"
|
rm -rf "${VMDIR}"
|
||||||
echo "Deleted ${VM} desktop shortcut"
|
rm "${VM}"
|
||||||
|
echo "SUCCESS! Deleted ${VM} and ${VMDIR}"
|
||||||
|
delete_shortcut
|
||||||
|
else
|
||||||
|
echo "NOTE! ${VMDIR} not found. Doing nothing."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,8 +136,9 @@ function get_port() {
|
||||||
local PORT_RANGE=$((PORT_START+$2))
|
local PORT_RANGE=$((PORT_START+$2))
|
||||||
local PORT
|
local PORT
|
||||||
for ((PORT = PORT_START; PORT <= PORT_RANGE; PORT++)); do
|
for ((PORT = PORT_START; PORT <= PORT_RANGE; PORT++)); do
|
||||||
(echo -n "" >/dev/tcp/127.0.0.1/"${PORT}") >/dev/null 2>&1
|
# Make sure port scans do not block too long.
|
||||||
if [ ${?} -ne 0 ]; then
|
timeout 0.1s bash -c "echo >/dev/tcp/127.0.0.1/${PORT}" >/dev/null 2>&1
|
||||||
|
if [ ${?} -eq 1 ]; then
|
||||||
echo "${PORT}"
|
echo "${PORT}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -465,6 +480,10 @@ function vm_boot() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')
|
||||||
|
# Disable S3 support in the VM to prevent macOS suspending during install
|
||||||
|
GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=${OSK}"
|
||||||
|
|
||||||
# Tune Qemu optimisations based on the macOS release, or fallback to lowest
|
# Tune Qemu optimisations based on the macOS release, or fallback to lowest
|
||||||
# common supported options if none is specified.
|
# common supported options if none is specified.
|
||||||
# * VirtIO Block Media doesn't work in High Sierra (at all) or the Mojave (Recovery Image)
|
# * VirtIO Block Media doesn't work in High Sierra (at all) or the Mojave (Recovery Image)
|
||||||
|
@ -482,7 +501,8 @@ function vm_boot() {
|
||||||
BALLOON="-device virtio-balloon"
|
BALLOON="-device virtio-balloon"
|
||||||
MAC_DISK_DEV="virtio-blk-pci"
|
MAC_DISK_DEV="virtio-blk-pci"
|
||||||
NET_DEVICE="virtio-net"
|
NET_DEVICE="virtio-net"
|
||||||
USB_HOST_PASSTHROUGH_CONTROLLER="qemu-xhci"
|
USB_HOST_PASSTHROUGH_CONTROLLER="nec-usb-xhci"
|
||||||
|
GUEST_TWEAKS="${GUEST_TWEAKS} -global nec-usb-xhci.msi=off"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Backwards compatibility if no macos_release is specified.
|
# Backwards compatibility if no macos_release is specified.
|
||||||
|
@ -493,8 +513,7 @@ function vm_boot() {
|
||||||
USB_HOST_PASSTHROUGH_CONTROLLER="usb-ehci"
|
USB_HOST_PASSTHROUGH_CONTROLLER="usb-ehci"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')
|
|
||||||
GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -device isa-applesmc,osk=${OSK}"
|
|
||||||
if [ -z "${disk_size}" ]; then
|
if [ -z "${disk_size}" ]; then
|
||||||
disk_size="96G"
|
disk_size="96G"
|
||||||
fi
|
fi
|
||||||
|
@ -508,9 +527,7 @@ function vm_boot() {
|
||||||
|
|
||||||
# Disable S3 support in the VM to ensure Windows can boot with SecureBoot enabled
|
# Disable S3 support in the VM to ensure Windows can boot with SecureBoot enabled
|
||||||
# - https://wiki.archlinux.org/title/QEMU#VM_does_not_boot_when_using_a_Secure_Boot_enabled_OVMF
|
# - https://wiki.archlinux.org/title/QEMU#VM_does_not_boot_when_using_a_Secure_Boot_enabled_OVMF
|
||||||
if [ "${secureboot}" == "on" ]; then
|
|
||||||
GUEST_TWEAKS="${GUEST_TWEAKS} -global ICH9-LPC.disable_s3=1"
|
GUEST_TWEAKS="${GUEST_TWEAKS} -global ICH9-LPC.disable_s3=1"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${disk_size}" ]; then
|
if [ -z "${disk_size}" ]; then
|
||||||
disk_size="64G"
|
disk_size="64G"
|
||||||
|
@ -819,7 +836,7 @@ function vm_boot() {
|
||||||
-enable-kvm -machine q35,smm=${SMM},vmport=off ${GUEST_TWEAKS}
|
-enable-kvm -machine q35,smm=${SMM},vmport=off ${GUEST_TWEAKS}
|
||||||
${CPU} ${SMP}
|
${CPU} ${SMP}
|
||||||
-m ${RAM_VM} ${BALLOON}
|
-m ${RAM_VM} ${BALLOON}
|
||||||
-smbios type=2,manufacturer="Wimpys World",product="Quickemu",version="${VERSION}",serial="jvzclfjbeyq.pbz",location="wimpysworld.com",asset="${VMNAME}"
|
-smbios type=2,manufacturer="Quickemu Project",product="Quickemu",version="${VERSION}",serial="0xDEADBEEF",location="quickemu.com",asset="${VMNAME}"
|
||||||
${VIDEO} -display ${DISPLAY_RENDER}
|
${VIDEO} -display ${DISPLAY_RENDER}
|
||||||
-device usb-ehci,id=input
|
-device usb-ehci,id=input
|
||||||
-device usb-kbd,bus=input.0
|
-device usb-kbd,bus=input.0
|
||||||
|
@ -874,38 +891,20 @@ function vm_boot() {
|
||||||
args+=(-drive if=floppy,format=raw,file="${floppy}")
|
args+=(-drive if=floppy,format=raw,file="${floppy}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${guest_os}" == "windows" ]; then
|
|
||||||
# shellcheck disable=SC2054
|
|
||||||
args+=(-device ahci,id=ahci)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${iso}" ]; then
|
if [ -n "${iso}" ]; then
|
||||||
if [ "${guest_os}" == "windows" ]; then
|
|
||||||
# shellcheck disable=SC2054
|
|
||||||
args+=(-drive id=iso,if=none,media=cdrom,file="${iso}"
|
|
||||||
-device ide-cd,drive=iso,bus=ahci.1,bootindex=1)
|
|
||||||
else
|
|
||||||
# shellcheck disable=SC2054
|
# shellcheck disable=SC2054
|
||||||
args+=(-drive media=cdrom,index=0,file="${iso}")
|
args+=(-drive media=cdrom,index=0,file="${iso}")
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${fixed_iso}" ]; then
|
if [ -n "${fixed_iso}" ]; then
|
||||||
if [ "${guest_os}" == "windows" ]; then
|
|
||||||
# shellcheck disable=SC2054
|
|
||||||
args+=(-drive id=fixed_iso,if=none,media=cdrom,file="${fixed_iso}"
|
|
||||||
-device ide-cd,drive=fixed_iso,bus=ahci.2)
|
|
||||||
else
|
|
||||||
# shellcheck disable=SC2054
|
# shellcheck disable=SC2054
|
||||||
args+=(-drive media=cdrom,index=1,file="${fixed_iso}")
|
args+=(-drive media=cdrom,index=1,file="${fixed_iso}")
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Attach the unattended configuration to Windows guests when booting from ISO
|
# Attach the unattended configuration to Windows guests when booting from ISO
|
||||||
if [ -n "${iso}" ] && [ "${guest_os}" == "windows" ] && [ -e "${VMDIR}/unattended.iso" ]; then
|
if [ -n "${iso}" ] && [ "${guest_os}" == "windows" ] && [ -e "${VMDIR}/unattended.iso" ]; then
|
||||||
# shellcheck disable=SC2054
|
# shellcheck disable=SC2054
|
||||||
args+=(-drive id=unattended,if=none,media=cdrom,file="${VMDIR}/unattended.iso"
|
args+=(-drive media=cdrom,index=2,file="${VMDIR}/unattended.iso")
|
||||||
-device ide-cd,drive=unattended,bus=ahci.3)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${guest_os}" == "macos" ]; then
|
if [ "${guest_os}" == "macos" ]; then
|
||||||
|
@ -923,10 +922,6 @@ function vm_boot() {
|
||||||
# shellcheck disable=SC2054,SC2206
|
# shellcheck disable=SC2054,SC2206
|
||||||
args+=(-device ${MAC_DISK_DEV},drive=SystemDisk
|
args+=(-device ${MAC_DISK_DEV},drive=SystemDisk
|
||||||
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
||||||
elif [ "${guest_os}" == "windows" ]; then
|
|
||||||
# shellcheck disable=SC2054,SC2206
|
|
||||||
args+=(-device ide-hd,drive=SystemDisk,bus=ahci.0,bootindex=0
|
|
||||||
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2054,SC2206
|
# shellcheck disable=SC2054,SC2206
|
||||||
args+=(-device virtio-blk-pci,drive=SystemDisk
|
args+=(-device virtio-blk-pci,drive=SystemDisk
|
||||||
|
@ -954,12 +949,13 @@ function vm_boot() {
|
||||||
-device tpm-tis,tpmdev=tpm0)
|
-device tpm-tis,tpmdev=tpm0)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The OSK parameter contains parenthesis, they need to be escaped in the shell scripts
|
# The OSK parameter contains parenthesis, they need to be escaped in the shell
|
||||||
# The vendor name, Wimpys World, contains a space. It needs to be double-quoted.
|
# scripts. The vendor name, Quickemu Project, contains a space. It needs to be
|
||||||
|
# double-quoted.
|
||||||
SHELL_ARGS="${args[*]}"
|
SHELL_ARGS="${args[*]}"
|
||||||
SHELL_ARGS="${SHELL_ARGS//(/\\(}"
|
SHELL_ARGS="${SHELL_ARGS//(/\\(}"
|
||||||
SHELL_ARGS="${SHELL_ARGS//)/\\)}"
|
SHELL_ARGS="${SHELL_ARGS//)/\\)}"
|
||||||
SHELL_ARGS="${SHELL_ARGS//Wimpys World/\"Wimpys World\"}"
|
SHELL_ARGS="${SHELL_ARGS//Quickemu Project/\"Quickemu Project\"}"
|
||||||
|
|
||||||
echo "${QEMU}" "${SHELL_ARGS}" >> "${VMDIR}/${VMNAME}.sh"
|
echo "${QEMU}" "${SHELL_ARGS}" >> "${VMDIR}/${VMNAME}.sh"
|
||||||
${QEMU} "${args[@]}" > "${VMDIR}/${VMNAME}.log" &
|
${QEMU} "${args[@]}" > "${VMDIR}/${VMNAME}.log" &
|
||||||
|
@ -1002,7 +998,8 @@ function usage() {
|
||||||
echo " ${LAUNCHER} --vm ubuntu.conf"
|
echo " ${LAUNCHER} --vm ubuntu.conf"
|
||||||
echo
|
echo
|
||||||
echo "You can also pass optional parameters"
|
echo "You can also pass optional parameters"
|
||||||
echo " --delete : Delete the disk image."
|
echo " --delete-disk : Delete the disk image and EFI variables"
|
||||||
|
echo " --delete-vm : Delete the entire VM and it's configuration"
|
||||||
echo " --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'"
|
echo " --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'"
|
||||||
echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)"
|
echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)"
|
||||||
echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers"
|
echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers"
|
||||||
|
@ -1017,6 +1014,16 @@ function usage() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function display_param_check() {
|
||||||
|
if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then
|
||||||
|
echo "ERROR! Requested output '${OUTPUT}' is not recognised."
|
||||||
|
exit 1
|
||||||
|
elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then
|
||||||
|
echo "ERROR! Requested SPICE display, but 'spicy' is not installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Lowercase variables are used in the VM config file only
|
# Lowercase variables are used in the VM config file only
|
||||||
boot="efi"
|
boot="efi"
|
||||||
bridge=""
|
bridge=""
|
||||||
|
@ -1036,10 +1043,11 @@ secureboot="off"
|
||||||
tpm="off"
|
tpm="off"
|
||||||
usb_devices=()
|
usb_devices=()
|
||||||
|
|
||||||
DELETE=0
|
DELETE_DISK=0
|
||||||
|
DELETE_VM=0
|
||||||
FULLSCREEN=""
|
FULLSCREEN=""
|
||||||
FULLSPICY=""
|
FULLSPICY=""
|
||||||
OUTPUT="sdl"
|
OUTPUT=""
|
||||||
PUBLIC=""
|
PUBLIC=""
|
||||||
PUBLIC_PERMS=""
|
PUBLIC_PERMS=""
|
||||||
PUBLIC_TAG=""
|
PUBLIC_TAG=""
|
||||||
|
@ -1056,7 +1064,7 @@ VMPATH=""
|
||||||
|
|
||||||
readonly LAUNCHER=$(basename "${0}")
|
readonly LAUNCHER=$(basename "${0}")
|
||||||
readonly DISK_MIN_SIZE=$((197632 * 8))
|
readonly DISK_MIN_SIZE=$((197632 * 8))
|
||||||
readonly VERSION="2.3.2"
|
readonly VERSION="3.11"
|
||||||
|
|
||||||
# PUBLICSHARE is the only directory exposed to guest VMs for file
|
# PUBLICSHARE is the only directory exposed to guest VMs for file
|
||||||
# sharing via 9P, spice-webdavd and Samba. This path is not configurable.
|
# sharing via 9P, spice-webdavd and Samba. This path is not configurable.
|
||||||
|
@ -1078,7 +1086,7 @@ fi
|
||||||
QEMU=$(command -v qemu-system-x86_64)
|
QEMU=$(command -v qemu-system-x86_64)
|
||||||
QEMU_IMG=$(command -v qemu-img)
|
QEMU_IMG=$(command -v qemu-img)
|
||||||
if [ ! -e "${QEMU}" ] && [ ! -e "${QEMU_IMG}" ]; then
|
if [ ! -e "${QEMU}" ] && [ ! -e "${QEMU_IMG}" ]; then
|
||||||
echo "ERROR! qemu not found. Please install qemu."
|
echo "ERROR! QEMU not found. Please make install qemu-system-x86_64 and qemu-img"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1096,18 +1104,15 @@ if [ $# -lt 1 ]; then
|
||||||
else
|
else
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-delete|--delete)
|
-delete|--delete|-delete-disk|--delete-disk)
|
||||||
DELETE=1
|
DELETE_DISK=1
|
||||||
|
shift;;
|
||||||
|
-delete-vm|--delete-vm)
|
||||||
|
DELETE_VM=1
|
||||||
shift;;
|
shift;;
|
||||||
-display|--display)
|
-display|--display)
|
||||||
OUTPUT="${2}"
|
OUTPUT="${2}"
|
||||||
if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then
|
display_param_check
|
||||||
echo "ERROR! Requested output '${OUTPUT}' is not recognised."
|
|
||||||
exit 1
|
|
||||||
elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then
|
|
||||||
echo "ERROR! Requested SPICE display, but 'spicy' is not installed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shift
|
shift
|
||||||
shift;;
|
shift;;
|
||||||
-fullscreen|--fullscreen|-full-screen|--full-screen)
|
-fullscreen|--fullscreen|-full-screen|--full-screen)
|
||||||
|
@ -1179,6 +1184,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
|
||||||
disk_size="${disk}"
|
disk_size="${disk}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${OUTPUT}" ]; then
|
||||||
|
if [ -z "${display}" ]; then
|
||||||
|
OUTPUT="sdl"
|
||||||
|
else
|
||||||
|
OUTPUT="${display}"
|
||||||
|
display_param_check
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${tpm}" == "on" ]; then
|
if [ "${tpm}" == "on" ]; then
|
||||||
SWTPM=$(command -v swtpm)
|
SWTPM=$(command -v swtpm)
|
||||||
if [ ! -e "${SWTPM}" ]; then
|
if [ ! -e "${SWTPM}" ]; then
|
||||||
|
@ -1191,8 +1205,13 @@ else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${DELETE} -eq 1 ]; then
|
if [ ${DELETE_DISK} -eq 1 ]; then
|
||||||
disk_delete
|
delete_disk
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${DELETE_VM} -eq 1 ]; then
|
||||||
|
delete_vm
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
738
quickget
738
quickget
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
# Here the quick 'n dirty guide to adding a new OS to quickget
|
# Here the quick 'n dirty guide to adding a new OS to quickget
|
||||||
#
|
#
|
||||||
# 1. Add the new OS, all lowercase, to os_support()
|
# 1. Add the new OS, all lowercase, to os_support()
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
if [ -n "$(jobs -p)" ]; then
|
if [ -n "$(jobs -p)" ]; then
|
||||||
kill $(jobs -p)
|
kill "$(jobs -p)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ function pretty_name() {
|
||||||
local PRETTY_NAME=""
|
local PRETTY_NAME=""
|
||||||
SIMPLE_NAME="${1}"
|
SIMPLE_NAME="${1}"
|
||||||
case ${SIMPLE_NAME} in
|
case ${SIMPLE_NAME} in
|
||||||
|
alma) PRETTY_NAME="Alma Linux";;
|
||||||
android) PRETTY_NAME="Android x86";;
|
android) PRETTY_NAME="Android x86";;
|
||||||
archlinux) PRETTY_NAME="Arch Linux";;
|
archlinux) PRETTY_NAME="Arch Linux";;
|
||||||
elementary) PRETTY_NAME="elementary OS";;
|
elementary) PRETTY_NAME="elementary OS";;
|
||||||
|
@ -50,6 +52,7 @@ function pretty_name() {
|
||||||
macos) PRETTY_NAME="macOS";;
|
macos) PRETTY_NAME="macOS";;
|
||||||
openbsd) PRETTY_NAME="OpenBSD";;
|
openbsd) PRETTY_NAME="OpenBSD";;
|
||||||
opensuse) PRETTY_NAME="openSUSE";;
|
opensuse) PRETTY_NAME="openSUSE";;
|
||||||
|
oraclelinux) PRETTY_NAME="Oracle Linux";;
|
||||||
popos) PRETTY_NAME="Pop!_OS";;
|
popos) PRETTY_NAME="Pop!_OS";;
|
||||||
regolith) PRETTY_NAME="Regolith Linux";;
|
regolith) PRETTY_NAME="Regolith Linux";;
|
||||||
rockylinux) PRETTY_NAME="Rocky Linux";;
|
rockylinux) PRETTY_NAME="Rocky Linux";;
|
||||||
|
@ -143,6 +146,14 @@ function list_csv() {
|
||||||
for OPTION in intel nvidia; do
|
for OPTION in intel nvidia; do
|
||||||
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
||||||
done
|
done
|
||||||
|
elif [ "${OS}" == "debian" ]; then
|
||||||
|
for OPTION in standard nonfree; do
|
||||||
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
||||||
|
done
|
||||||
|
elif [ "${OS}" == "alma" ]; then
|
||||||
|
for OPTION in minimal dvd; do
|
||||||
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
|
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
|
||||||
fi
|
fi
|
||||||
|
@ -152,8 +163,10 @@ function list_csv() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function os_support() {
|
function os_support() {
|
||||||
echo android \
|
echo alma \
|
||||||
|
android \
|
||||||
archlinux \
|
archlinux \
|
||||||
|
debian \
|
||||||
elementary \
|
elementary \
|
||||||
freebsd \
|
freebsd \
|
||||||
fedora \
|
fedora \
|
||||||
|
@ -172,6 +185,7 @@ function os_support() {
|
||||||
macos \
|
macos \
|
||||||
openbsd \
|
openbsd \
|
||||||
opensuse \
|
opensuse \
|
||||||
|
oraclelinux \
|
||||||
popos \
|
popos \
|
||||||
regolith \
|
regolith \
|
||||||
rockylinux \
|
rockylinux \
|
||||||
|
@ -186,6 +200,12 @@ function os_support() {
|
||||||
zorin
|
zorin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function releases_alma() {
|
||||||
|
# consider flavours for boot and dvd as well as
|
||||||
|
echo 8.4 \
|
||||||
|
8.5
|
||||||
|
}
|
||||||
|
|
||||||
function releases_android() {
|
function releases_android() {
|
||||||
echo 9.0 \
|
echo 9.0 \
|
||||||
8.1 \
|
8.1 \
|
||||||
|
@ -201,6 +221,19 @@ function releases_archlinux() {
|
||||||
echo latest
|
echo latest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# later refactor these DE variants like languages and avoid the arch ?
|
||||||
|
# all these are available with a "nonfree" option too
|
||||||
|
function releases_debian() {
|
||||||
|
echo 11.1.0-amd64-cinnamon \
|
||||||
|
11.1.0-amd64-gnome \
|
||||||
|
11.1.0-amd64-kde \
|
||||||
|
11.1.0-amd64-lxde \
|
||||||
|
11.1.0-amd64-lxqt \
|
||||||
|
11.1.0-amd64-mate \
|
||||||
|
11.1.0-amd64-standard \
|
||||||
|
11.1.0-amd64-xfce
|
||||||
|
}
|
||||||
|
|
||||||
function releases_elementary() {
|
function releases_elementary() {
|
||||||
echo 6.0
|
echo 6.0
|
||||||
}
|
}
|
||||||
|
@ -254,7 +287,8 @@ function releases_linuxmint(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function releases_nixos(){
|
function releases_nixos(){
|
||||||
echo 21.05
|
echo 21.05 \
|
||||||
|
21.11
|
||||||
}
|
}
|
||||||
|
|
||||||
function releases_openbsd(){
|
function releases_openbsd(){
|
||||||
|
@ -270,6 +304,16 @@ function releases_opensuse(){
|
||||||
tumbleweed
|
tumbleweed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function releases_oraclelinux() {
|
||||||
|
echo 8.5 \
|
||||||
|
8.4 \
|
||||||
|
8.3 \
|
||||||
|
8.2 \
|
||||||
|
7.9 \
|
||||||
|
7.8 \
|
||||||
|
7.7
|
||||||
|
}
|
||||||
|
|
||||||
function releases_macos() {
|
function releases_macos() {
|
||||||
echo high-sierra \
|
echo high-sierra \
|
||||||
mojave \
|
mojave \
|
||||||
|
@ -373,199 +417,6 @@ function releases_zorin() {
|
||||||
15edulite32
|
15edulite32
|
||||||
}
|
}
|
||||||
|
|
||||||
function unattended_windows() {
|
|
||||||
cat << 'EOF' > "${1}"
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
|
||||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
For documentation on components:
|
|
||||||
http://technet.microsoft.com/en-us/library/ff699038.aspx
|
|
||||||
-->
|
|
||||||
|
|
||||||
<settings pass="generalize">
|
|
||||||
<!--
|
|
||||||
The PersistAllDeviceInstalls setting indicates whether all plug and
|
|
||||||
play devices on the destination computer remain installed during the
|
|
||||||
generalize configuration pass.
|
|
||||||
-->
|
|
||||||
<component name="Microsoft-Windows-PnPSysprep"
|
|
||||||
processorArchitecture="amd64"
|
|
||||||
publicKeyToken="31bf3856ad364e35"
|
|
||||||
language="neutral"
|
|
||||||
versionScope="nonSxS">
|
|
||||||
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
|
|
||||||
</component>
|
|
||||||
</settings>
|
|
||||||
|
|
||||||
<settings pass="windowsPE">
|
|
||||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64"
|
|
||||||
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<DiskConfiguration>
|
|
||||||
<Disk wcm:action="add">
|
|
||||||
<DiskID>0</DiskID>
|
|
||||||
<WillWipeDisk>true</WillWipeDisk>
|
|
||||||
<CreatePartitions>
|
|
||||||
<CreatePartition wcm:action="add">
|
|
||||||
<Order>1</Order>
|
|
||||||
<Type>EFI</Type>
|
|
||||||
<Size>100</Size>
|
|
||||||
</CreatePartition>
|
|
||||||
<CreatePartition wcm:action="add">
|
|
||||||
<Order>2</Order>
|
|
||||||
<Type>MSR</Type>
|
|
||||||
<Size>512</Size>
|
|
||||||
</CreatePartition>
|
|
||||||
<CreatePartition wcm:action="add">
|
|
||||||
<Order>3</Order>
|
|
||||||
<Type>Primary</Type>
|
|
||||||
<Extend>true</Extend>
|
|
||||||
</CreatePartition>
|
|
||||||
</CreatePartitions>
|
|
||||||
<ModifyPartitions>
|
|
||||||
<ModifyPartition wcm:action="add">
|
|
||||||
<Order>1</Order>
|
|
||||||
<PartitionID>1</PartitionID>
|
|
||||||
<Label>System</Label>
|
|
||||||
<Format>FAT32</Format>
|
|
||||||
</ModifyPartition>
|
|
||||||
<ModifyPartition wcm:action="add">
|
|
||||||
<Order>2</Order>
|
|
||||||
<PartitionID>3</PartitionID>
|
|
||||||
<Label>Windows</Label>
|
|
||||||
<Letter>C</Letter>
|
|
||||||
<Format>NTFS</Format>
|
|
||||||
</ModifyPartition>
|
|
||||||
</ModifyPartitions>
|
|
||||||
</Disk>
|
|
||||||
<WillShowUI>OnError</WillShowUI>
|
|
||||||
</DiskConfiguration>
|
|
||||||
<ImageInstall>
|
|
||||||
<OSImage>
|
|
||||||
<WillShowUI>OnError</WillShowUI>
|
|
||||||
<InstallTo>
|
|
||||||
<DiskID>0</DiskID>
|
|
||||||
<PartitionID>3</PartitionID>
|
|
||||||
</InstallTo>
|
|
||||||
</OSImage>
|
|
||||||
</ImageInstall>
|
|
||||||
<UserData>
|
|
||||||
<AcceptEula>true</AcceptEula>
|
|
||||||
<ProductKey>
|
|
||||||
<key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</key>
|
|
||||||
<WillShowUI>Never</WillShowUI>
|
|
||||||
</ProductKey>
|
|
||||||
</UserData>
|
|
||||||
<DynamicUpdate>
|
|
||||||
<Enable>true</Enable>
|
|
||||||
<WillShowUI>Never</WillShowUI>
|
|
||||||
</DynamicUpdate>
|
|
||||||
</component>
|
|
||||||
|
|
||||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE"
|
|
||||||
publicKeyToken="31bf3856ad364e35" language="neutral"
|
|
||||||
versionScope="nonSxS" processorArchitecture="amd64">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
This makes the VirtIO drivers available to Windows, assuming that
|
|
||||||
the VirtIO driver disk
|
|
||||||
(https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md)
|
|
||||||
is available as drive E:
|
|
||||||
-->
|
|
||||||
<DriverPaths>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
|
|
||||||
<Path>E:\qemufwcfg\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="2">
|
|
||||||
<Path>E:\vioinput\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
|
||||||
<Path>E:\vioscsi\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
|
||||||
<Path>E:\viostor\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="5">
|
|
||||||
<Path>E:\vioserial\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="6">
|
|
||||||
<Path>E:\qxldod\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="7">
|
|
||||||
<Path>E:\amd64\w10</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="8">
|
|
||||||
<Path>E:\viogpudo\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="9">
|
|
||||||
<Path>E:\viorng\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="10">
|
|
||||||
<Path>E:\NetKVM\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="11">
|
|
||||||
<Path>E:\viofs\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="12">
|
|
||||||
<Path>E:\Balloon\w10\amd64</Path>
|
|
||||||
</PathAndCredentials>
|
|
||||||
</DriverPaths>
|
|
||||||
</component>
|
|
||||||
</settings>
|
|
||||||
|
|
||||||
<settings pass="specialize">
|
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64"
|
|
||||||
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<ComputerName>*</ComputerName>
|
|
||||||
<OEMInformation>
|
|
||||||
<Manufacturer>Wimpys World</Manufacturer>
|
|
||||||
<Model>Quickemu</Model>
|
|
||||||
<SupportHours>24/7</SupportHours>
|
|
||||||
<SupportPhone></SupportPhone>
|
|
||||||
<SupportProvider>Wimpys World</SupportProvider>
|
|
||||||
<SupportURL>https://github.com/wimpysworld/quickemu/issues</SupportURL>
|
|
||||||
</OEMInformation>
|
|
||||||
<OEMName>Wimpys World</OEMName>
|
|
||||||
</component>
|
|
||||||
</settings>
|
|
||||||
|
|
||||||
<settings pass="oobeSystem">
|
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64"
|
|
||||||
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<OOBE>
|
|
||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
|
||||||
</OOBE>
|
|
||||||
<FirstLogonCommands>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<CommandLine>msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn</CommandLine>
|
|
||||||
<Description>Install Virtio Guest Agent</Description>
|
|
||||||
<Order>1</Order>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<CommandLine>msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn</CommandLine>
|
|
||||||
<Description>Install spice-webdavd file sharing agent</Description>
|
|
||||||
<Order>2</Order>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine>
|
|
||||||
<Description>Install usbdk USB sharing agent</Description>
|
|
||||||
<Order>3</Order>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine>
|
|
||||||
<Description>Install spice-vdagent SPICE agent</Description>
|
|
||||||
<Order>4</Order>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
|
||||||
</component>
|
|
||||||
</settings>
|
|
||||||
</unattend>
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
function check_hash() {
|
function check_hash() {
|
||||||
local iso=""
|
local iso=""
|
||||||
local hash=""
|
local hash=""
|
||||||
|
@ -667,12 +518,18 @@ function make_vm_config() {
|
||||||
|
|
||||||
IMAGE_FILE="${1}"
|
IMAGE_FILE="${1}"
|
||||||
ISO_FILE="${2}"
|
ISO_FILE="${2}"
|
||||||
if [ "${OS}" == "android" ]; then
|
if [ "${OS}" == "alma" ]; then
|
||||||
|
GUEST="linux"
|
||||||
|
IMAGE_TYPE="iso"
|
||||||
|
elif [ "${OS}" == "android" ]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
elif [ "${OS}" == "archlinux" ]; then
|
elif [ "${OS}" == "archlinux" ]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
|
elif [ "${OS}" == "debian" ]; then
|
||||||
|
GUEST="linux"
|
||||||
|
IMAGE_TYPE="iso"
|
||||||
elif [ "${OS}" == "elementary" ]; then
|
elif [ "${OS}" == "elementary" ]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
|
@ -706,6 +563,9 @@ function make_vm_config() {
|
||||||
elif [ "${OS}" == "opensuse" ]; then
|
elif [ "${OS}" == "opensuse" ]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
|
elif [ "${OS}" == "oraclelinux" ]; then
|
||||||
|
GUEST="linux"
|
||||||
|
IMAGE_TYPE="iso"
|
||||||
elif [ "${OS}" == "popos" ]; then
|
elif [ "${OS}" == "popos" ]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
|
@ -732,6 +592,11 @@ function make_vm_config() {
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "${ISOTYPE}" ]; then
|
||||||
|
RELEASE=${RELEASE}-${ISOTYPE}
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e "${OS}-${RELEASE}.conf" ]; then
|
if [ ! -e "${OS}-${RELEASE}.conf" ]; then
|
||||||
echo "Making VM configuration for ${OS}-${RELEASE}..."
|
echo "Making VM configuration for ${OS}-${RELEASE}..."
|
||||||
cat << EOF > "${OS}-${RELEASE}.conf"
|
cat << EOF > "${OS}-${RELEASE}.conf"
|
||||||
|
@ -742,7 +607,9 @@ EOF
|
||||||
if [ -n "${ISO_FILE}" ]; then
|
if [ -n "${ISO_FILE}" ]; then
|
||||||
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
|
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
|
||||||
fi
|
fi
|
||||||
|
if [ "${OS}" == "alma" ] && [ ${ISOTYPE} == "dvd" ]; then
|
||||||
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
||||||
|
fi
|
||||||
if [ "${OS}" == "openbsd" ]; then
|
if [ "${OS}" == "openbsd" ]; then
|
||||||
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
||||||
fi
|
fi
|
||||||
|
@ -755,6 +622,10 @@ EOF
|
||||||
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${OS}" == "oraclelinux" ]; then
|
||||||
|
echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${OS}" == "zorin" ]; then
|
if [ "${OS}" == "zorin" ]; then
|
||||||
case ${RELEASE} in
|
case ${RELEASE} in
|
||||||
15education64|15edulite64|15edulite32)
|
15education64|15edulite64|15edulite32)
|
||||||
|
@ -785,16 +656,16 @@ function get_android() {
|
||||||
validate_release "releases_android"
|
validate_release "releases_android"
|
||||||
fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =")
|
fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =")
|
||||||
version="android-x86-${RELEASE}"
|
version="android-x86-${RELEASE}"
|
||||||
releaseJson=$(echo ${fosshubVersionInfo:16} | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))')
|
releaseJson=$(echo "${fosshubVersionInfo:16}" | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))')
|
||||||
|
|
||||||
HASH=$(echo "${releaseJson}" | jq -r .hash.sha256)
|
HASH=$(echo "${releaseJson}" | jq -r .hash.sha256)
|
||||||
ISO=$(echo "${releaseJson}" | jq -r .n)
|
ISO=$(echo "${releaseJson}" | jq -r .n)
|
||||||
|
|
||||||
baseurl="https://mirrors.gigenet.com/OSDN/android-x86/"
|
baseurl="https://mirrors.gigenet.com/OSDN/android-x86/"
|
||||||
|
|
||||||
releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E [0-9]{5} | uniq)
|
releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E '[0-9]{5}' | uniq)
|
||||||
for item in $releaseFolders; do
|
for item in $releaseFolders; do
|
||||||
file=$(wget -O - -q ${baseurl}${item} | grep "${ISO}")
|
file=$(wget -O - -q "${baseurl}${item}" | grep "${ISO}")
|
||||||
if [[ $file != "" ]]; then
|
if [[ $file != "" ]]; then
|
||||||
URL="${baseurl}${item}/${ISO}"
|
URL="${baseurl}${item}/${ISO}"
|
||||||
break
|
break
|
||||||
|
@ -805,6 +676,33 @@ function get_android() {
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_alma() {
|
||||||
|
local HASH=""
|
||||||
|
local ISO=""
|
||||||
|
local URL=""
|
||||||
|
local VERSION=""
|
||||||
|
#local isotype=""
|
||||||
|
|
||||||
|
validate_release "releases_alma"
|
||||||
|
|
||||||
|
ISOTYPE="minimal" # boot is a step too far for now - needs setting install source to mirror tree ... nope
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
ISOTYPE="${1}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# The mirror url returns 10 or so local mirrors with some kind or RR rotation/load balancing
|
||||||
|
# We'll just grab the first
|
||||||
|
|
||||||
|
URL=$(wget -qq -O- "https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html" | awk -F"<li>|</li>" '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" |grep href|cut -d\" -f2|head -1)
|
||||||
|
|
||||||
|
#VM_PATH="${VM_PATH}"-${ISOTYPE}
|
||||||
|
ISO=AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso
|
||||||
|
HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \(${ISO} | cut -d\ -f4)"
|
||||||
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
||||||
|
check_hash "${ISO}" "${HASH}"
|
||||||
|
make_vm_config "${ISO}"
|
||||||
|
}
|
||||||
function get_archlinux() {
|
function get_archlinux() {
|
||||||
local HASH=""
|
local HASH=""
|
||||||
local ISO=""
|
local ISO=""
|
||||||
|
@ -821,6 +719,35 @@ function get_archlinux() {
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function get_debian() {
|
||||||
|
local HASH=""
|
||||||
|
local ISO=""
|
||||||
|
local URL=""
|
||||||
|
local HASHLINE=""
|
||||||
|
local FREEDOM=""
|
||||||
|
|
||||||
|
|
||||||
|
validate_release "releases_debian"
|
||||||
|
|
||||||
|
if [ "${1}" == "nonfree" ]; then
|
||||||
|
RELEASE="${RELEASE}+nonfree"
|
||||||
|
fi
|
||||||
|
case $RELEASE in
|
||||||
|
*+nonfree) URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid" ;;
|
||||||
|
*) URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
HASHLINE=$(wget -q -O- ${URL}/SHA512SUMS |grep ${RELEASE}.iso)
|
||||||
|
ISO="$(echo ${HASHLINE} | awk '{print $NF}' )"
|
||||||
|
HASH=$(echo ${HASHLINE} | cut -d\ -f1)
|
||||||
|
|
||||||
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
||||||
|
check_hash "${ISO}" "${HASH}"
|
||||||
|
make_vm_config "${ISO}"
|
||||||
|
}
|
||||||
|
|
||||||
function get_elementary() {
|
function get_elementary() {
|
||||||
local ISO=""
|
local ISO=""
|
||||||
local URL=""
|
local URL=""
|
||||||
|
@ -983,8 +910,8 @@ function get_zorin() {
|
||||||
|
|
||||||
validate_release "releases_zorin"
|
validate_release "releases_zorin"
|
||||||
# their redirector returns an href so we need to get that and parse out the iso
|
# their redirector returns an href so we need to get that and parse out the iso
|
||||||
URL=$(curl -s https://zrn.co/${RELEASE} |cut -d\" -f2)
|
URL=$(curl -s "https://zrn.co/${RELEASE}" |cut -d\" -f2)
|
||||||
ISO=$(echo ${URL}| awk -F\/ ' {print $NF}')
|
ISO=$(echo "${URL}"| awk -F\/ ' {print $NF}')
|
||||||
web_get "${URL}" "${VM_PATH}"
|
web_get "${URL}" "${VM_PATH}"
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
}
|
}
|
||||||
|
@ -1056,6 +983,35 @@ function get_opensuse() {
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_oraclelinux() {
|
||||||
|
local HASH=""
|
||||||
|
local ISO=""
|
||||||
|
local URL=""
|
||||||
|
|
||||||
|
local arch="x86_64"
|
||||||
|
|
||||||
|
validate_release "releases_oraclelinux"
|
||||||
|
|
||||||
|
local majorver=${RELEASE::1}
|
||||||
|
local minorver=${RELEASE:2:1}
|
||||||
|
|
||||||
|
local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/"
|
||||||
|
local hashurl="https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${majorver}-U${minorver}-Server-x86_64.checksum"
|
||||||
|
|
||||||
|
if [ "${majorver}" == "8" ]; then
|
||||||
|
ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso"
|
||||||
|
else
|
||||||
|
ISO="OracleLinux-R${majorver}-U${minorver}-Server-${arch}-dvd.iso"
|
||||||
|
fi
|
||||||
|
|
||||||
|
URL="${baseurl}/${ISO}"
|
||||||
|
HASH=$(wget -q -O- "${hashurl}" | grep "${ISO}" | cut -d' ' -f1)
|
||||||
|
|
||||||
|
web_get "${URL}" "${VM_PATH}"
|
||||||
|
check_hash "${ISO}" "${HASH}"
|
||||||
|
make_vm_config "${ISO}"
|
||||||
|
}
|
||||||
|
|
||||||
function get_macos() {
|
function get_macos() {
|
||||||
local BOARD_ID=""
|
local BOARD_ID=""
|
||||||
local CWD=""
|
local CWD=""
|
||||||
|
@ -1168,9 +1124,9 @@ function get_regolith() {
|
||||||
2.0.0_hirsute)
|
2.0.0_hirsute)
|
||||||
URL="${URL}regolith-linux-2.0-hirsute-latest";;
|
URL="${URL}regolith-linux-2.0-hirsute-latest";;
|
||||||
esac
|
esac
|
||||||
ISO="Regolith_"${RELEASE}".iso"
|
ISO="Regolith_${RELEASE}.iso"
|
||||||
web_get "${URL}/${ISO}" "${VM_PATH}"
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
||||||
if [ -n $HASH ]; then
|
if [ -n "${HASH}" ]; then
|
||||||
check_hash "${ISO}" "${HASH}"
|
check_hash "${ISO}" "${HASH}"
|
||||||
fi
|
fi
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
|
@ -1249,7 +1205,7 @@ function get_garuda() {
|
||||||
LATEST_URL="${GLDL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256"
|
LATEST_URL="${GLDL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256"
|
||||||
HASH_URL="$(wget -q -O- ${LATEST_URL})"
|
HASH_URL="$(wget -q -O- ${LATEST_URL})"
|
||||||
ISO="$(echo ${HASH_URL} | awk '{print $NF}' )"
|
ISO="$(echo ${HASH_URL} | awk '{print $NF}' )"
|
||||||
HASH=$(echo ${HASH_URL} | cut -d\ -f1)
|
HASH=$(echo "${HASH_URL}" | cut -d\ -f1)
|
||||||
LDATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' |cut -d'.' -f1) #
|
LDATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' |cut -d'.' -f1) #
|
||||||
URL="${GLDL}/${REL_TYPE}/${RELEASE}/${LDATE}"
|
URL="${GLDL}/${REL_TYPE}/${RELEASE}/${LDATE}"
|
||||||
|
|
||||||
|
@ -1261,6 +1217,309 @@ function get_garuda() {
|
||||||
make_vm_config "${OS}-${RELEASE}.iso"
|
make_vm_config "${OS}-${RELEASE}.iso"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unattended_windows() {
|
||||||
|
cat << 'EOF' > "${1}"
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<!--
|
||||||
|
For documentation on components:
|
||||||
|
https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/
|
||||||
|
-->
|
||||||
|
<settings pass="offlineServicing">
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<ComputerName>*</ComputerName>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component name="Microsoft-Windows-PnPSysprep"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS">
|
||||||
|
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Security-SPP-UX"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SkipAutoActivation>false</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<ComputerName>*</ComputerName>
|
||||||
|
<OEMInformation>
|
||||||
|
<Manufacturer>Quickemu Project</Manufacturer>
|
||||||
|
<Model>Quickemu</Model>
|
||||||
|
<SupportHours>24/7</SupportHours>
|
||||||
|
<SupportPhone></SupportPhone>
|
||||||
|
<SupportProvider>Quickemu Project</SupportProvider>
|
||||||
|
<SupportURL>https://github.com/quickemu-project/quickemu/issues</SupportURL>
|
||||||
|
</OEMInformation>
|
||||||
|
<OEMName>Quickemu Project</OEMName>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SQMApi"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component name="Microsoft-Windows-Setup"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<Diagnostics>
|
||||||
|
<OptIn>false</OptIn>
|
||||||
|
</Diagnostics>
|
||||||
|
<DiskConfiguration>
|
||||||
|
<Disk wcm:action="add">
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<WillWipeDisk>true</WillWipeDisk>
|
||||||
|
<CreatePartitions>
|
||||||
|
<!-- Windows RE Tools partition -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Size>256</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- System partition (ESP) -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Type>EFI</Type>
|
||||||
|
<Size>128</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- Microsoft reserved partition (MSR) -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Type>MSR</Type>
|
||||||
|
<Size>128</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- Windows partition -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Extend>true</Extend>
|
||||||
|
</CreatePartition>
|
||||||
|
</CreatePartitions>
|
||||||
|
<ModifyPartitions>
|
||||||
|
<!-- Windows RE Tools partition -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<PartitionID>1</PartitionID>
|
||||||
|
<Label>WINRE</Label>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
<TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- System partition (ESP) -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
<Label>System</Label>
|
||||||
|
<Format>FAT32</Format>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- MSR partition does not need to be modified -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<PartitionID>3</PartitionID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- Windows partition -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<PartitionID>4</PartitionID>
|
||||||
|
<Label>Windows</Label>
|
||||||
|
<Letter>C</Letter>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
</ModifyPartition>
|
||||||
|
</ModifyPartitions>
|
||||||
|
</Disk>
|
||||||
|
</DiskConfiguration>
|
||||||
|
<DynamicUpdate>
|
||||||
|
<Enable>true</Enable>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</DynamicUpdate>
|
||||||
|
<ImageInstall>
|
||||||
|
<OSImage>
|
||||||
|
<InstallTo>
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<PartitionID>4</PartitionID>
|
||||||
|
</InstallTo>
|
||||||
|
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||||
|
</OSImage>
|
||||||
|
</ImageInstall>
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
<UpgradeData>
|
||||||
|
<Upgrade>false</Upgrade>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</UpgradeData>
|
||||||
|
<UserData>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
<ProductKey>
|
||||||
|
<key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</key>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</ProductKey>
|
||||||
|
</UserData>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component name="Microsoft-Windows-PnpCustomizationsWinPE"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
processorArchitecture="amd64">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This makes the VirtIO drivers available to Windows, assuming that
|
||||||
|
the VirtIO driver disk
|
||||||
|
(https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md)
|
||||||
|
is available as drive E:
|
||||||
|
-->
|
||||||
|
<DriverPaths>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
|
||||||
|
<Path>E:\qemufwcfg\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="2">
|
||||||
|
<Path>E:\vioinput\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
||||||
|
<Path>E:\vioscsi\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
||||||
|
<Path>E:\viostor\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="5">
|
||||||
|
<Path>E:\vioserial\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="6">
|
||||||
|
<Path>E:\qxldod\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="7">
|
||||||
|
<Path>E:\amd64\w10</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="8">
|
||||||
|
<Path>E:\viogpudo\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="9">
|
||||||
|
<Path>E:\viorng\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="10">
|
||||||
|
<Path>E:\NetKVM\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="11">
|
||||||
|
<Path>E:\viofs\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="12">
|
||||||
|
<Path>E:\Balloon\w10\amd64</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
</DriverPaths>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
publicKeyToken="31bf3856ad364e35"
|
||||||
|
language="neutral"
|
||||||
|
versionScope="nonSxS"
|
||||||
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideLocalAccountScreen>false</HideLocalAccountScreen>
|
||||||
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
|
<HideOnlineAccountScreens>false</HideOnlineAccountScreens>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
|
<SkipUserOOBE>false</SkipUserOOBE>
|
||||||
|
<SkipMachineOOBE>false</SkipMachineOOBE>
|
||||||
|
<VMModeOptimizations>
|
||||||
|
<SkipWinREInitialization>true</SkipWinREInitialization>
|
||||||
|
</VMModeOptimizations>
|
||||||
|
</OOBE>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn</CommandLine>
|
||||||
|
<Description>Install Virtio Guest Agent</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn</CommandLine>
|
||||||
|
<Description>Install spice-webdavd file sharing agent</Description>
|
||||||
|
<Order>2</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine>
|
||||||
|
<Description>Install usbdk USB sharing agent</Description>
|
||||||
|
<Order>3</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine>
|
||||||
|
<Description>Install spice-vdagent SPICE agent</Description>
|
||||||
|
<Order>4</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>Cmd /c POWERCFG -H OFF</CommandLine>
|
||||||
|
<Description>Disable Hibernation</Description>
|
||||||
|
<Order>5</Order>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
</unattend>
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function dbg_windows() {
|
||||||
|
local DEBUG=0
|
||||||
|
if [ ${DEBUG} -eq 1 ]; then
|
||||||
|
echo "${1}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb
|
# Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb
|
||||||
function get_windows() {
|
function get_windows() {
|
||||||
local ARCH="x64"
|
local ARCH="x64"
|
||||||
|
@ -1280,34 +1539,47 @@ function get_windows() {
|
||||||
validate_release "releases_windows"
|
validate_release "releases_windows"
|
||||||
|
|
||||||
# Ignore the most recent Windows 10 release for now.
|
# Ignore the most recent Windows 10 release for now.
|
||||||
if [ ${RELEASE} -eq 10 ]; then
|
if [ "${RELEASE}" -eq 10 ]; then
|
||||||
INDEX=1
|
INDEX=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${RELEASE}" -eq 11 ]; then
|
if [ "${RELEASE}" -eq 11 ]; then
|
||||||
INDEX=1
|
INDEX=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Getting Windows ${RELEASE} URL..."
|
echo "Getting Windows ${RELEASE} URL..."
|
||||||
WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))')
|
WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))')
|
||||||
|
dbg_windows "${WINDOWS_VERSIONS}"
|
||||||
LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))['${INDEX}']')
|
LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))['${INDEX}']')
|
||||||
|
dbg_windows "${LATEST_WINDOWS_VERSION}"
|
||||||
|
|
||||||
WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name)
|
WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name)
|
||||||
|
dbg_windows "${WINDOWS_NAME}"
|
||||||
VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id)
|
VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id)
|
||||||
|
dbg_windows "${VERSION_ID}"
|
||||||
|
|
||||||
case ${RELEASE} in
|
case ${RELEASE} in
|
||||||
8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id');;
|
8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id');;
|
||||||
10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '${RELEASE}'").edition_id');;
|
10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '${RELEASE}'").edition_id');;
|
||||||
esac
|
esac
|
||||||
|
dbg_windows "${EDITION_ID}"
|
||||||
|
|
||||||
LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id')
|
LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id')
|
||||||
|
dbg_windows "${LANGUAGE_ID}"
|
||||||
ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}")
|
ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}")
|
||||||
|
dbg_windows "${ARCH_INFO}"
|
||||||
FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name')
|
FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name')
|
||||||
|
dbg_windows "${FILE_NAME}"
|
||||||
ARCH_ID=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).arch_id')
|
ARCH_ID=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).arch_id')
|
||||||
|
dbg_windows "${ARCH_ID}"
|
||||||
DOWNLOAD_INFO=$(wget -q -O- "https://tb.rg-adguard.net/dl.php?fileName=${ARCH_ID}&lang=en")
|
DOWNLOAD_INFO=$(wget -q -O- "https://tb.rg-adguard.net/dl.php?fileName=${ARCH_ID}&lang=en")
|
||||||
|
dbg_windows "${DOWNLOAD_INFO}"
|
||||||
DOWNLOAD_SHA1=$(echo "${DOWNLOAD_INFO}" | sed -e 's/<[^>]*>//g' | grep -o -P '(?<=SHA1: ).*(?= expire)' | sed 's/Link//')
|
DOWNLOAD_SHA1=$(echo "${DOWNLOAD_INFO}" | sed -e 's/<[^>]*>//g' | grep -o -P '(?<=SHA1: ).*(?= expire)' | sed 's/Link//')
|
||||||
|
dbg_windows "${DOWNLOAD_SHA1}"
|
||||||
DOWNLOAD_ID=$(echo "${DOWNLOAD_INFO}" | grep -oP '(?<=https:\/\/tb\.rg-adguard\.net/dl\.php\?go=)[0-9a-z]+')
|
DOWNLOAD_ID=$(echo "${DOWNLOAD_INFO}" | grep -oP '(?<=https:\/\/tb\.rg-adguard\.net/dl\.php\?go=)[0-9a-z]+')
|
||||||
|
dbg_windows "${DOWNLOAD_ID}"
|
||||||
DOWNLOAD_URL="https://tb.rg-adguard.net/dl.php?go=${DOWNLOAD_ID}"
|
DOWNLOAD_URL="https://tb.rg-adguard.net/dl.php?go=${DOWNLOAD_ID}"
|
||||||
|
dbg_windows "${DOWNLOAD_URL}"
|
||||||
|
|
||||||
echo "Downloading ${WINDOWS_NAME}..."
|
echo "Downloading ${WINDOWS_NAME}..."
|
||||||
web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}"
|
web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}"
|
||||||
|
@ -1353,7 +1625,7 @@ if [ -n "${1}" ]; then
|
||||||
list_json
|
list_json
|
||||||
elif [ "${OS}" == "--version" ] || [ "${OS}" == "-version" ] || [ "${OS}" == "version" ]; then
|
elif [ "${OS}" == "--version" ] || [ "${OS}" == "-version" ] || [ "${OS}" == "version" ]; then
|
||||||
whereIam=$(dirname "${BASH_SOURCE[0]}")
|
whereIam=$(dirname "${BASH_SOURCE[0]}")
|
||||||
quickemu_version=$( ${whereIam}/quickemu --version)
|
quickemu_version=$( "${whereIam}"/quickemu --version)
|
||||||
echo "Quickemu Version: ${quickemu_version}"
|
echo "Quickemu Version: ${quickemu_version}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -1367,10 +1639,42 @@ if [ -n "${2}" ]; then
|
||||||
RELEASE="${2,,}"
|
RELEASE="${2,,}"
|
||||||
VM_PATH="${OS}-${RELEASE}"
|
VM_PATH="${OS}-${RELEASE}"
|
||||||
|
|
||||||
if [ "${OS}" == "android" ]; then
|
if [ "${OS}" == "alma" ]; then
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
ISOTYPE="${3,,}"
|
||||||
|
ISOTYPES=(minimal dvd ) # boot) # a step too far
|
||||||
|
if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then
|
||||||
|
echo "iso ${ISOTYPE} is not supported:"
|
||||||
|
for ISOTYPE in "${ISOTYPES[@]}"; do
|
||||||
|
echo "${ISOTYPE}"
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ISOTYPE="minimal"
|
||||||
|
fi
|
||||||
|
VM_PATH="${OS}-${RELEASE}-${ISOTYPE}"
|
||||||
|
get_alma "${ISOTYPE}"
|
||||||
|
elif [ "${OS}" == "android" ]; then
|
||||||
get_android
|
get_android
|
||||||
elif [ "${OS}" == "archlinux" ]; then
|
elif [ "${OS}" == "archlinux" ]; then
|
||||||
get_archlinux
|
get_archlinux
|
||||||
|
elif [ "${OS}" == "debian" ]; then
|
||||||
|
if [ -n "${3}" ]; then
|
||||||
|
FREEDOM="${3}"
|
||||||
|
FREEDOMS=(standard nonfree)
|
||||||
|
if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then
|
||||||
|
echo "ERROR! ${FREEDOM} is not a supported freedom:"
|
||||||
|
for DRIVER in "${FREEDOMS[@]}"; do
|
||||||
|
echo "${FREEDOM}"
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
FREEDOM="standard"
|
||||||
|
fi
|
||||||
|
VM_PATH="${OS}-${RELEASE}-${FREEDOM}"
|
||||||
|
get_debian "${FREEDOM}"
|
||||||
elif [ "${OS}" == "elementary" ]; then
|
elif [ "${OS}" == "elementary" ]; then
|
||||||
get_elementary
|
get_elementary
|
||||||
elif [ "${OS}" == "macos" ]; then
|
elif [ "${OS}" == "macos" ]; then
|
||||||
|
@ -1395,6 +1699,8 @@ if [ -n "${2}" ]; then
|
||||||
get_openbsd
|
get_openbsd
|
||||||
elif [ "${OS}" == "opensuse" ]; then
|
elif [ "${OS}" == "opensuse" ]; then
|
||||||
get_opensuse
|
get_opensuse
|
||||||
|
elif [ "${OS}" == "oraclelinux" ]; then
|
||||||
|
get_oraclelinux
|
||||||
elif [ "${OS}" == "popos" ]; then
|
elif [ "${OS}" == "popos" ]; then
|
||||||
if [ -n "${3}" ]; then
|
if [ -n "${3}" ]; then
|
||||||
DRIVER="${3}"
|
DRIVER="${3}"
|
||||||
|
@ -1456,10 +1762,14 @@ if [ -n "${2}" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -n "ERROR! You must specify a release: "
|
echo -n "ERROR! You must specify a release: "
|
||||||
if [ "${OS}" == "android" ]; then
|
if [ "${OS}" == "alma" ]; then
|
||||||
|
releases_alma
|
||||||
|
elif [ "${OS}" == "android" ]; then
|
||||||
releases_android
|
releases_android
|
||||||
elif [ "${OS}" == "archlinux" ]; then
|
elif [ "${OS}" == "archlinux" ]; then
|
||||||
releases_archlinux
|
releases_archlinux
|
||||||
|
elif [ "${OS}" == "debian" ]; then
|
||||||
|
releases_debian
|
||||||
elif [ "${OS}" == "elementary" ]; then
|
elif [ "${OS}" == "elementary" ]; then
|
||||||
releases_elementary
|
releases_elementary
|
||||||
elif [ "${OS}" == "freebsd" ]; then
|
elif [ "${OS}" == "freebsd" ]; then
|
||||||
|
@ -1478,6 +1788,8 @@ else
|
||||||
releases_nixos
|
releases_nixos
|
||||||
elif [ "${OS}" == "opensuse" ]; then
|
elif [ "${OS}" == "opensuse" ]; then
|
||||||
releases_opensuse
|
releases_opensuse
|
||||||
|
elif [ "${OS}" == "oraclelinux" ]; then
|
||||||
|
releases_oraclelinux
|
||||||
elif [ "${OS}" == "openbsd" ]; then
|
elif [ "${OS}" == "openbsd" ]; then
|
||||||
releases_openbsd
|
releases_openbsd
|
||||||
elif [ "${OS}" == "macos" ]; then
|
elif [ "${OS}" == "macos" ]; then
|
||||||
|
@ -1486,6 +1798,8 @@ else
|
||||||
releases_popos
|
releases_popos
|
||||||
elif [ "${OS}" == "regolith" ]; then
|
elif [ "${OS}" == "regolith" ]; then
|
||||||
releases_regolith
|
releases_regolith
|
||||||
|
elif [ "${OS}" == "rockylinux" ]; then
|
||||||
|
releases_rockylinux
|
||||||
elif [ "${OS}" == "solus" ]; then
|
elif [ "${OS}" == "solus" ]; then
|
||||||
releases_solus
|
releases_solus
|
||||||
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
||||||
|
|
Loading…
Reference in a new issue