added failure error message to configure_vm
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# Push-button installer of macOS on VirtualBox
|
# Push-button installer of macOS on VirtualBox
|
||||||
# (c) myspaghetti, licensed under GPL2.0 or higher
|
# (c) myspaghetti, licensed under GPL2.0 or higher
|
||||||
# url: https://github.com/myspaghetti/macos-virtualbox
|
# url: https://github.com/myspaghetti/macos-virtualbox
|
||||||
# version 0.98.3
|
# version 0.98.4
|
||||||
|
|
||||||
# Dependencies: bash coreutils gzip unzip wget xxd dmg2img
|
# Dependencies: bash coreutils gzip unzip wget xxd dmg2img
|
||||||
# Optional features: tesseract-ocr tesseract-ocr-eng
|
# Optional features: tesseract-ocr tesseract-ocr-eng
|
||||||
@@ -651,10 +651,18 @@ echo "/ESP/startup.nsh=\"${vm_name}_startup.nsh\"" >> "${macOS_release_name}_ins
|
|||||||
|
|
||||||
function configure_vm() {
|
function configure_vm() {
|
||||||
print_dimly "stage: configure_vm"
|
print_dimly "stage: configure_vm"
|
||||||
VBoxManage modifyvm "${vm_name}" --cpus "${cpu_count}" --memory "${memory_size}" \
|
if [[ -n "$(VBoxManage modifyvm "${vm_name}" --cpus "${cpu_count}" \
|
||||||
--vram "${gpu_vram}" --pae on --boot1 none --boot2 none --boot3 none \
|
--memory "${memory_size}" --vram "${gpu_vram}" --pae on \
|
||||||
--boot4 none --firmware efi --rtcuseutc on --chipset ich9 ${extension_pack_usb3_support} \
|
--boot1 none --boot2 none --boot3 none --boot4 none \
|
||||||
--mouse usbtablet --keyboard usb --audiocontroller hda --audiocodec stac9221
|
--firmware efi --rtcuseutc on --chipset ich9 ${extension_pack_usb3_support} \
|
||||||
|
--mouse usbtablet --keyboard usb --audiocontroller hda \
|
||||||
|
--audiocodec stac9221 2>&1 >/dev/null )" ]]; then
|
||||||
|
echo -e "\nError: Could not configure virtual machine \"${vm_name}\"."
|
||||||
|
echo -e "Please execute the stage ${low_contrast_color}configure_vm${default_color} again before resuming the script"
|
||||||
|
echo -e "as described in the documentation.\n"
|
||||||
|
echo "Exiting."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
VBoxManage setextradata "${vm_name}" \
|
VBoxManage setextradata "${vm_name}" \
|
||||||
"VBoxInternal2/EfiGraphicsResolution" "${resolution}"
|
"VBoxInternal2/EfiGraphicsResolution" "${resolution}"
|
||||||
|
|||||||
Reference in New Issue
Block a user