[Support] SpaceinvaderOne - Macinabox


Recommended Posts

On 2/7/2022 at 1:38 AM, cat2devnull said:

 

So it looks like QEMU is having issue with accessing your card (assuming it is on address 04:00.0 and 04:00.1

 

When trying to debug an issue with passing a video card to the VM there are many things to consider/try.

 

1) Ensure the card is in its own IOMMU group and not sharing a group with any other hardware.

Also ensure that it is stubbed so that the host OS doesn't take control of the card.

118039272_ScreenShot2022-02-07at11_16_51am.thumb.png.b66f2b8a3391a4daf2076bc1f7f11539.png

 

2) Ensure your config is correct. Here is an example from my config. My card is on bus 0x12 and I pass it to bus 0x04.

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x12' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/user/isos/vbios/Yeston-RX550-4G-LP-D5.rom'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x12' slot='0x00' function='0x1'/>
      </source>
       <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
    </hostdev>

 

3) Try passing the VBIOS

The goto place for VBIOS files is TechPowerUp but most people recommend that you rip your own BIOS. Spaceinvader has written some software and made a video that is easy to follow. 


4) If it is the primary GPU in the system you will need to prevent the Linux OS from using the virtual frame buffer to display the boot process. So under Main -> Flash you can add video=efifb:off to the Unraid boot option. More details can be found in this blog.607533261_ScreenShot2022-02-07at11_23_17am.png.ea99fdf09bf97f2f3f04a6ec72393721.png

 

If you need more help than this, you will need to provide us more information.

- The motherboard, CPU and video card(s) details.

- Also the relevant logs from the Unraid OS and VM.

 

Also be aware that weird things can happen when you upgrade Unraid (aka upgrade the host OS kernel). I ran for years without needing to do anything but then after one upgrade I suddenly needed to stub the card. Then another upgrade and I had to pass a VBIOS. Then last upgrade to 6.10.0-rc2 I needed to enable efifb:off.

Good Luck!

Thanks for taking so much time to answer me, i think only the step 1 is missing i already dump my vbios with spaceinvader video. i will told you if that work when i'm back to home. For your step 4 i have two GPU the first one a GTX 1080Ti and the second one my RX580 8Go so i think you right with IOMMU. i copy past my xml with an edit of this post tomorrow. So if u see something strange tell me please :) thanks again for your time it's the most precious stuff in this world :) 

 

 

Link to comment

Yeah so I´ve been following your macinabox guide, and everything "works" as far as getting to the desktop, but I gotta choose the "hdd" I wanna boot from every time I boot the vm. 
I Know I´m doin something wrong, but as per your guide I copied "EFI" and "NvVars" onto the the only hdd that matched your description. 

 

Quick help is appreciated!

(High sierra ((my oldest gpu is a 1050ti and I wanna give it a shot)) and same hdd that the "EFI" folder is in was not empty by default)

Link to comment
4 minutes ago, BeardElk said:

I dont know, but figured it would work as I set the templet to High Sierra. 
Pretty sure I´m wrong tho, as it wont work....

 

It "works", but I always gotta select the "OS disk"(OS disk being High Sierra) on boot, and cannot set it as a "mac pro" or any other mac in opencore configurator. 

Edited by BeardElk
Link to comment
48 minutes ago, PicPoc said:

OpenCore images on MAcInaBox are the same for HighSierra to Monterey ?

Yes, they are the same.

As far as the NvVars file you don't need it, EFI variables are written into OVMF_VARS file.

NvVars is needed when the VARS file is not specified and you have only a big read only file for bios (OVMF): in this case ovmf is already splitted into CODE and VARS, the last one being writable.

Edited by ghost82
Link to comment
12 minutes ago, Misiek5535 said:

Is there a way to auto boot macos?

Mount efi, edit /EFI/OC/config.plist with plain text editor.

Search for Misc --> Boot --> Timeout

Change value from 0 to 5 (change from disabled to x seconds to autoboot)

 

Quote

11. Timeout

Type: plist integer, 32 bit

Failsafe: 0

Description: Timeout in seconds in the OpenCore picker before automatic booting of the default boot entry.

Set to 0 to disable.

 

Link to comment

Sure, but not with macinabox.

The way macinabox works is to download a recovery image and from that download the os and perform an "online" installation.

To have an offline installation you need to download the full mac os image and use the createinstallmedia to target a blank 16GB img file (there are a lot of tutorials around about how to do it), and simply add 3 disks to your vm settings, one for opencore (boot order=1), one for the mac os installation media and one for the target installation disk.

Opencore will simply scan for available disks and it will find the mac os installation media.

Edited by ghost82
Link to comment
24 minutes ago, ghost82 said:

Sure, but not with macinabox.

The way macinabox works is to download a recovery image and from that download the os and perform an "online" installation.

To have an offline installation you need to download the full mac os image and use the createinstallmedia to target a blank 16GB img file (there are a lot of tutorials around about how to do it), and simply add 3 disks to your vm settings, one for opencore (boot order=1), one for the mac os installation media and one for the target installation disk.

Opencore will simply scan for available disks and it will find the mac os installation media.

 

What settings should I use to make the installation volume?

I have a DMG disk image created with "createinstallmedia".
But I can't get it detected by opencore. ;)

Link to comment

Rename .dmg to .img and add it to your xml:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/path/to/installation/InstallationMedia.img'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

 

unit number (3) and dev name (hdd) may change depending on your setup.

If the img was created correctly opencore will see it.

Link to comment

This is a copy/paste of a private message I sent about how to correctly have an offline installation media:

--

if you have access to mac os, the vm with vnc is ok, you can install the MDS application:

https://twocanoes.com/products/mac/mac-deploy-stick/

 

free download is ok.

This is recommended, since files will be downloaded directly from apple.

mds.thumb.png.8d55d96f21bd1d1ba03997adc974294b.png.1fe38ebb091b4bbd56f72a13a75a2d45.png

 

1. Run it

2. Select Download macOS

3. choose CustomerSeed as catalog

4. Select the os/version you want to download

5. click download and choose the target folder to save the image

Note: no progress bar for download, just let the software there until a popup appears for the successful download (you need to download about 12 Gb)

 

This will download a dmg file.

Once you downloaded that image:

 

1. Run disk utility

2. Select File --> New image --> empty image

3. Give it a name in save as and name fields (let's call it "Monterey" in this example); Dimension: 16 GB; Format: Mac os extended (journaled); cryptography: none; Partitions: single, GUID; Image format: disc image read/write

4. save the empty image somewhere and it will be mounted automatically

5. mount the dmg image you downloaded with MDS and open the mounted image

6. right click on install mac os xxx, then show package content; navigate in Contents/Resources/

7. run a terminal window

8. type "sudo " (sudo+space without quotes) and drag the file createinstallmedia in Contents/Resources/, type a space then add "--volume /Volumes/Monterey" (without quotes), something like:

sudo /path/to/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Monterey

/Volumes/Monterey is the mounted empty image you created with disk utility.

 

9. press Enter, type your password and press again enter; files will be copied to the empty 16Gb image

10. Once finished, unmount both images

11. Rename Monterey.dmg to Monterey.img

12. Use Monterey.img as a sata installation disk in your xml (type='raw')

Link to comment

Just tried to install monterey.

The first steps seem to work without error.

When I first start the VM and try to connect via noVNC I get the error "failed to connect to server".

I did "Force stop" the VM and restarted without any change.

How to solve? Any ideas?

 

By the way I just realized a 100% load on CPU0 when VM is started.

 

Edited by matty2k
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.