AlexanderWillner / runMacOSinVirtualBox

Run macOS 10.16 Big Sur (and other versions) in VirtualBox on macOS
MIT License
936 stars 125 forks source link

Minor fix for runMacOSVirtualbox.sh #111

Closed tigeryu8900 closed 4 years ago

tigeryu8900 commented 4 years ago

My VM failed to start, and I got the error Configuration error: Querying "DmiSystemSerial" as a string failed (VERR_CFGM_NOT_STRING). To fix this error, I added string: in front of the extradata VBoxInternal/Devices/efi/0/Config/DmiSystemSerial's value, and I was able to start my VM.

A possible patch for runMacOSVirtualbox.sh would be:

@@ -267,7 +267,7 @@ createVM() {
     VBoxManage setextradata "$VM_NAME" VBoxInternal2/EfiGraphicsResolution "$VM_RES"
     VBoxManage setextradata "$VM_NAME" GUI/ScaleFactor "$VM_SCALE"
     VBoxManage setextradata "$VM_NAME" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "$HOST_ID"
-    VBoxManage setextradata "$VM_NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "$HOST_SERIAL"
+    VBoxManage setextradata "$VM_NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "string:${HOST_SERIAL}"
     VBoxManage storagectl "$VM_NAME" --name "SATA Controller" --add sata --controller IntelAHCI --hostiocache on
     VBoxManage storageattach "$VM_NAME" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --nonrotational on --medium "$DST_DIR/$VM_NAME.efi.vdi"
     VBoxManage storageattach "$VM_NAME" --storagectl "SATA Controller" --port 1 --device 0 --type hdd --nonrotational on --medium "$DST_DIR/$VM_NAME.vdi"
AlexanderWillner commented 4 years ago

Thanks a lot - might also be related to an issue listed at the bottom of #110. Changed it.