Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

How to change serial number of V-Mac after creation of the VM? #274

Closed
richardk2016 opened this issue Jul 24, 2020 · 5 comments
Closed

How to change serial number of V-Mac after creation of the VM? #274

richardk2016 opened this issue Jul 24, 2020 · 5 comments
Assignees
Labels
question Not necessarily an issue with the script

Comments

@richardk2016
Copy link

How do I change the serial number? For the tests I want to do with the machine, I need a formally valid serial number. Can I change it afterwards?

@myspaghetti myspaghetti self-assigned this Jul 24, 2020
@myspaghetti myspaghetti added the question Not necessarily an issue with the script label Jul 24, 2020
@myspaghetti
Copy link
Owner

Yup, see the documentation. Delete the .nvram file and apply the new config as described. Mind that Apple servers keep track of the device configuration, so if the activity is suspicious it might trigger a "Call customer support" message.

@richardk2016
Copy link
Author

Thank you for the hint. I have read what to do multiple times now but I don't get it. Sorry. Too complicated. I give up here. And, by the way, why is the Documentation not available as text file in this Github?

@myspaghetti
Copy link
Owner

If you need the documentation as a text file you can execute ./macos-guest-virtualbox.sh documentation | sed 's/\x1b\[[0-9;]*m//g' > documentation.txt

What needs further clarification?

        Applying the EFI and NVRAM parameters
The EFI and NVRAM parameters may be set in the script before installation by
editing them at the top of the script, and applied after the last step of the
installation by resetting the virtual machine and booting into the
EFI Internal Shell. When resetting or powering up the VM, immediately press
Esc when the VirtualBox logo appears. This boots into the EFI Internal Shell or
the boot menu. If the boot menu appears, select "Boot Manager" and then
"EFI Internal Shell" and then allow the startup.nsh script to execute
automatically, applying the EFI and NVRAM variables before booting macOS.

        Changing the EFI and NVRAM parameters after installation
The variables mentioned above may be edited and applied to an existing macOS
virtual machine by deleting the .nvram file from the directory where the
virtual machine .vbox file is stored, then executing the following
command and copying the generated files to the macOS EFI System Partition:

    ./macos-guest-virtualbox.sh \
configure_vm create_nvram_files create_macos_installation_files_viso

After executing the command, attach the resulting VISO file to the virtual
machine's storage through VirtualBox Manager or VBoxManage. Power up the VM
and boot macOS, then start Terminal and execute the following commands, making
sure to replace "/Volumes/path/to/VISO/" with the correct path:

    mkdir ESP
    sudo su # this will prompt for a password
    diskutil mount -mountPoint ESP disk0s1
    cp -r /Volumes/path/to/VISO/ESP/* ESP/

After copying the files, boot into the EFI Internal Shell as desribed in the
section "Applying the EFI and NVRAM parameters".

@SWORDISA212
Copy link

"attach the resulting VISO file to the virtual
machine's storage through VirtualBox Manager or VBoxManage."
This is the part that I'm stuck on. I'm not entirely sure where to attach the "Catalina_installation_files.viso" through VirtualBox manager. Is it through the Cygwin terminal or somewhere in the virtual box itself? I apologize if this is a stupid question.

@myspaghetti
Copy link
Owner

This is a tutorial for adding an ISO file to a VirtualBox virtual machine on Windows through the GUI. Instead of an ISO file select the appropriate VISO file. Alternatively, the VBoxManage command is:

VBoxManage storageattach "macOS" --storagectl SATA --port 2 --type dvddrive --medium "Catalina_installation_files.viso"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Not necessarily an issue with the script
Projects
None yet
Development

No branches or pull requests

3 participants