Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Issues re: 2. Configure Opencore #9

Open
mkiiim opened this issue May 20, 2022 · 2 comments
Open

Issues re: 2. Configure Opencore #9

mkiiim opened this issue May 20, 2022 · 2 comments

Comments

@mkiiim
Copy link

mkiiim commented May 20, 2022

When I initially ran the build script,
./opencore-rebuild.sh

I got an error regarding guestfish:

./opencore-image-ng.sh: line 120: guestfish: command not found
ERROR: starting guestfish failed

So I installed (apt-get install) libguestfs-tools
When I tried to re-run the script I got this error:

### partition disk image
# part-init /dev/sda gpt
# part-add /dev/sda p 2048 300000
# part-add /dev/sda p 302048 -2048
# part-set-gpt-type /dev/sda 1 C12A7328-F81F-11D2-BA4B-00A0C93EC93B
# part-set-bootable /dev/sda 1 true
# mkfs vfat /dev/sda1 label:EFI
# mkfs vfat /dev/sda2 label:OpenCoreBoot
libguestfs: error: mkfs: vfat: /dev/sda2: mkfs.vfat: Label can be no longer than 11 characters

For reference I am on proxmox
kernel version: Linux 5.13.19-2-pve #1 SMP PVE 5.13.19-4
PVE manager version: pve-manager/7.1-7/df5740ad

Also, hardware is macmini 6,2 (late 2012) with core i7 3720QM and Intel HD Graphics 4000.

Thanks in advance!

@vivekmiyani
Copy link
Owner

vivekmiyani commented May 21, 2022

This line has OpenCoreBoot label. Having 12 characters. Try to rename it to something else.

fish mkfs vfat /dev/sda2 label:OpenCoreBoot

I guess you also need to change these occurrences with new name.:
https://github.com/vivekmiyani/OSX_GVT-D/search?q=OpenCoreBoot

Edit:

Refer OSX-KVM repo they have renamed this to OpenCore.

@mkiiim
Copy link
Author

mkiiim commented May 21, 2022

in lieu of trying to solve the label length issue, I just inserted a pause into the script and copied the EFI contents back into the Opencore EFI partition of my MacOS X VM.

To make work with my proxmox VM, I then split the the boot.sh into 2 files. One for pre VM launch, and the second for post VM shutdown. I think this effectively does the same thing for proxmox VMs?

scripts look like this:

Pre VM launch:

# Set your iGPU pci id (fetched from lspci)
IGPU_PCIID="8086 0166"

modprobe vfio_pci
modprobe vfio
echo 0000:00:02.0 > /sys/bus/pci/devices/0000:00:02.0/driver/unbind
echo $IGPU_PCIID > /sys/bus/pci/drivers/vfio-pci/remove_id
echo $IGPU_PCIID > /sys/bus/pci/drivers/vfio-pci/new_id
modprobe -r i915

Post VM shutdown

modprobe -r vfio_pci
modprobe -r vfio
modprobe i915

In the end, the VM runs, and as was the case prior to going down the path of implementing OSX_GVT-D, I am able to boot the Monterey VM. The iGPU does show up on the list of Graphics/Displays ... Apple | About This Mac | System Report | Graphics/Displays ... it shows up among a list of two. The first item is "Display" which shows 7MB VRAM and the second is "Intel HD Graphics 4000" which has no VRAM.

And this is where this journey has taken me so far... The iGPU, as far as I can tell, has not/is not utilized by OS/system after launch, nor does it seem to be recognized/utilized by an apps that I imagine would require it.

I should also note that while the hdmi output from the macmini just displays a black screen, I am able to proxmox web console and/or macOS screen share into the VM.

For reference, my VM .conf is as follows

agent: 1
args: -device isa-applesmc,osk="..." -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
balloon: 0
bios: ovmf
boot: order=virtio0
cores: 4
cpu: Penryn
efidisk0: local-lvm:vm-2000-disk-1,efitype=4m,size=4M
hostpci0: 0000:00:02.0,pcie=1,x-vga=1
machine: q35
memory: 4096
meta: creation-qemu=6.1.0,ctime=1652798836
name: macos-monterey
net0: virtio=06:AA:8E:70:6D:23,bridge=vmbr0,firewall=1
numa: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=...
sockets: 1
vga: virtio
virtio0: local-lvm:vm-2000-disk-0,cache=unsafe,discard=on,size=64G
vmgenid: ...

What're my next steps?

  • do a clean install of proxmox 7.2 - i didn't do a good job of documenting the hoops I went through and the numerous "apt-get install"s I did in order to get OSX_GVT-D to work on 7.1 and just want to better document
  • go through OSX_GVT-D steps again - used available release .rom so will try with a compiled one (as I had run into some issues trying to compile the i915ovmf.rom a la i915ovmfPkg)
  • try on a Catalina VM - Catalina being the last "supported" macOSX for the macmini 2012 - I think

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants