Cloning High Sierra VM on Catalina

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.
Post Reply
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Cloning High Sierra VM on Catalina

Post by andya11p »

Hi,

Running a cloned a High Sierra VM takes me into the UEFI shell. Could it be I need to preserve hardware UUID's in the clone to make it work ?

andy
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Cloning High Sierra VM on Catalina

Post by scottgus1 »

Could be, you can always try.

On Linux, I believe I've heard that if a drive UUID changes, then the Grub loader can't find it anymore. UUIDs change when a Virtualbox clone is made. I have no idea if this affects Mac OS or not.
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Re: Cloning High Sierra VM on Catalina

Post by andya11p »

I'm beginning (only) to understand how the UEFI shell fits into this picture. I can now, from the UEFI shell, boot the cloned system with

FS1:\System\Library\Coreservices\boot.efi

I don't have a full understanding of what's going on here. Clearly this boot.efi file lives inside the guest file system (FS1 being in this case the "hard disk" emulation, FS0 being the CD - I'm thinking the number relates to the order in which the running boot process sees the device as set by VB). So I can always boot a cloned system this way. But how can I bake this into the guest boot so I don't have to type it in?

Presumably if I'd told the clone process to keep hardware ID's the same it would have worked anyway but I've not tried this yes because I'd like to understand what is happening here so I can fix things more easily in future.

Additional questions - how can I get to the boot.efi within the guest ? (that presumably would provide a way to fix the assocation between the disk hardware ID, its mounting and the name its mounted with - something like fstab). Also, where should I look for specific documentation of this ?

Thanks

andy
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Re: Cloning High Sierra VM on Catalina

Post by andya11p »

ok, its not how do I get to boot.efi in the guest, that's obvious - its how do I edit it, its a binary file, what can I meaningfully edit it with ?

andy
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Cloning High Sierra VM on Catalina

Post by scottgus1 »

Regrettably I don't know. You can add this cloned disk to another guest temporarily to see if you could get at the file.
granada29
Volunteer
Posts: 780
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: Cloning High Sierra VM on Catalina

Post by granada29 »

I think this problem has been solved in the VirtualBox 6.1.x releases. You haven't said which version you're running.

Maybe you could try booting using the process you describe then:

When the VM is running
Go to System Preferences (in the VM) and open Startup Disk, just as you would do to select a boot volume with a real Mac.
Click the displayed disk and then restart your VM using the button in Startup Disk
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Re: Cloning High Sierra VM on Catalina

Post by andya11p »

Thank you Granada. I'm running VB6.1.12, so not quite solved.

I think I'm almost there. I will try the "set startup disk" trick - will be great if that works. Meanwhile, I've figured out that this should also work:
If I exit the UEFI shell I can get into either the boor manager or the boot maintenance manager. I am presuming the difference is that the boot manager is for one boot and the other one stores the result for future boots (and might be the VB equivalent of setting the startup disk. If I use one of these options it may solve the problem but leave me unable to get back to the UEFI shell if I pick the wrong one - is there a way to invoke the UEFI shell at startup if instead startup gets on with the boot ?

I can't yet make any sense of the numbers the boot maintencance manager gives me to choose from in terms of the virtual disk ID - they don't appear to relate at all. I'm attaching an image of the numbers inside the Boot-maintenance-manager/boot-from-file and inside a hardware profile in the guest OS. Are you able to help me figure out how these tie together ? Using the "set startup disk" is a great approach until one day when it fails to work and there is a need to do some kind of "to fix this lets see what's happening" boot such as single user and so on so I'd like to fully understand this. AFAI can see the numbers inside the boot maintenance managers are direct hardware addresses of some form and there is some level of translation going on that isn't visible. See the images with the numbers in.

Thanks everyone for your time helping an oldie newbie

andy
Attachments
Inside the Boot Maintenance Manager - which one
Inside the Boot Maintenance Manager - which one
VirtualBox_HS2_09_08_2020_12_31_23.png (8.58 KiB) Viewed 6608 times
Inside the guest showing the disk ID
Inside the guest showing the disk ID
VirtualBox_HS2_08_08_2020_17_25_02-2.jpg (105.39 KiB) Viewed 6608 times
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Re: Cloning High Sierra VM on Catalina

Post by andya11p »

Setting the Startup Disk from inside the guest worked. I'd still like to understand what the correct option in the Boot Manager Maintenance screen should be though and why. See my post immediately above this one - what are the second and third options - are they floppy and cd ?.

Have a nice day everyone.

andy
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Cloning High Sierra VM on Catalina

Post by fth0 »

andya11p wrote:If I use one of these options it may solve the problem but leave me unable to get back to the UEFI shell if I pick the wrong one - is there a way to invoke the UEFI shell at startup if instead startup gets on with the boot ?
As soon as starting the VM, (repeatedly) press the ANY Key (ESC will do ;)).
andya11p wrote:I can't yet make any sense of the numbers the boot maintencance manager gives me to choose from in terms of the virtual disk ID - they don't appear to relate at all.
What you see there is a list of disk partitions, in the form of top-down hardware addressing, also called a device path. For example:

Code: Select all

PCI bus 0x00 /
  PCI device 0x1F function 0x02 (SATA controller) /
    SATA controller port 0x00 port multiplier 0xffff LUN 0x00 (HD) /
      HD partition number 1-3, partition scheme GPT, file system UUID, partition start, partition size (HD partition)
In your case, there is one virtual hard disk with three partitions. In the running macOS guest, you can use diskutil list in a Terminal window to see the list of disk partitions.
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Re: Cloning High Sierra VM on Catalina

Post by andya11p »

Thank you fth0 -very helpful -andy
andya11p
Posts: 12
Joined: 12. Dec 2016, 17:40

Re: Cloning High Sierra VM on Catalina

Post by andya11p »

Just a small followup - so here is the diskutil list

#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *107.4 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS HS 106.5 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3

This ties in nicely with what @fth0 wrote above and my pic of the VB Boot Maintenance Manager further back but which one do you boot from - the EFI (#1 here) or the hard disk volume (#2 here) ?

Thanks

andy
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Cloning High Sierra VM on Catalina

Post by fth0 »

andya11p wrote:which one do you boot from - the EFI (#1 here) or the hard disk volume (#2 here) ?
The answer depends on who you mean with "you"? ;)

If you're talking about yourself selecting the file named /System/Library/CoreServices/boot.efi, then you'll find that on the large HFS+ volume, as you already did. If you're talking of the UEFI BIOS, it's loading and executing a lot of drivers from the EFI volume first, before accessing the HFS+ volume like you did.
Post Reply