Add efi_vars() for copying EFI variable store templates to the VM dir

This commit is contained in:
Martin Wimpress 2021-10-19 00:12:48 +01:00
parent b8d6b02796
commit aeb2a64720
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3

View File

@ -175,6 +175,22 @@ function check_cpu_flag() {
fi
}
function efi_vars() {
local VARS_IN=""
local VARS_OUT=""
VARS_IN="${1}"
VARS_OUT="${2}"
if [ ! -e "${VARS_OUT}" ]; then
if [ -e "${VARS_IN}" ]; then
cp "${VARS_IN}" "${VARS_OUT}"
else
echo "ERROR! ${VARS_IN} was not found. Please install edk2."
exit 1
fi
fi
}
function vm_boot() {
local BALLOON="-device virtio-balloon"
local CPU=""