Mac OS X guest

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.
Locked
ph0enix
Posts: 12
Joined: 12. Mar 2010, 00:24
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, FreeBSD, Haiku, Windwos XP, ReactOS, OpenSolaris

Re: Mac OS X guest

Post by ph0enix »

@duralumin
The short answer: Yes, I got it to work. Thank you!

Now the long answer:
I got to spend some more time with VB and the iPC DVD (10.5.6 final) and below are my findings.

It turns out that you need to select FeeBSD (64 bit) as the OS type (at least when running the 64 bit version of VB/Windows 7 x64). Otherwise the iPC DVD won't boot. That's interesting given that Leopard isn't really a 64bit OS (despite what Apple tells you). Leopard's kernel (/mach_kernel) is a 32bit dual architecture, universal binary (ppc32 and x86). It won't run using the AMD64/x64/EMT64 instruction set. My understanding is that that's because VB does not fully support SSE3 and the Apple vanilla kernel needs it.

Here's my virtual machine configuration:

Code: Select all

<?xml version="1.0"?>
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.9-windows">
  <Machine uuid="{cf738bd7-7960-4521-ae11-07b579cc3d44}" name="Leopard" OSType="FreeBSD_64" lastStateChange="2010-03-13T21:25:16Z">
    <ExtraData>
      <ExtraDataItem name="CustomVideoMode1" value="1600x1200x32"/>
      <ExtraDataItem name="GUI/AutoresizeGuest" value="off"/>
      <ExtraDataItem name="GUI/Fullscreen" value="off"/>
      <ExtraDataItem name="GUI/InfoDlgState" value="400,450,normal"/>
      <ExtraDataItem name="GUI/LastCloseAction" value="save"/>
      <ExtraDataItem name="GUI/LastWindowPostion" value="345,206,1024,811"/>
      <ExtraDataItem name="GUI/MiniToolBarAlignment" value="bottom"/>
      <ExtraDataItem name="GUI/MiniToolBarAutoHide" value="on"/>
      <ExtraDataItem name="GUI/SaveMountedAtRuntime" value="yes"/>
      <ExtraDataItem name="GUI/Seamless" value="off"/>
      <ExtraDataItem name="GUI/ShowMiniToolBar" value="yes"/>
      <ExtraDataItem name="VBoxInternal2/Devices/0/1000e/Trusted" value="1"/>
      <ExtraDataItem name="VBoxInternal2/SupportExtHwProfile" value="on"/>
    </ExtraData>
    <Hardware version="2">
      <CPU count="1">
        <HardwareVirtEx enabled="true" exclusive="false"/>
        <HardwareVirtExNestedPaging enabled="true"/>
        <HardwareVirtExVPID enabled="true"/>
        <PAE enabled="true"/>
      </CPU>
      <Memory RAMSize="1536"/>
      <Boot>
        <Order position="1" device="DVD"/>
        <Order position="2" device="HardDisk"/>
        <Order position="3" device="None"/>
        <Order position="4" device="None"/>
      </Boot>
      <Display VRAMSize="128" monitorCount="1" accelerate3D="true" accelerate2DVideo="false"/>
      <RemoteDisplay enabled="false" port="3389" authType="Null" authTimeout="5000"/>
      <BIOS>
        <ACPI enabled="true"/>
        <IOAPIC enabled="true"/>
        <Logo fadeIn="true" fadeOut="true" displayTime="0"/>
        <BootMenu mode="MessageAndMenu"/>
        <TimeOffset value="0"/>
        <PXEDebug enabled="false"/>
      </BIOS>
      <USBController enabled="true" enabledEhci="true"/>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027B98C3F" cable="true" speed="0" type="82540EM">
          <BridgedInterface name="Intel(R) PRO/1000 PL Network Connection"/>
        </Adapter>
        <Adapter slot="1" enabled="false" MACAddress="08002735ED5C" cable="false" speed="0" type="82540EM"/>
        <Adapter slot="2" enabled="false" MACAddress="08002747849C" cable="false" speed="0" type="82540EM"/>
        <Adapter slot="3" enabled="false" MACAddress="080027BE065F" cable="false" speed="0" type="82540EM"/>
        <Adapter slot="4" enabled="false" MACAddress="080027D8C95B" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="5" enabled="false" MACAddress="080027E895CB" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="6" enabled="false" MACAddress="080027A3D52D" cable="true" speed="0" type="Am79C973"/>
        <Adapter slot="7" enabled="false" MACAddress="08002705AF14" cable="true" speed="0" type="Am79C973"/>
      </Network>
      <UART>
        <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
        <Port slot="1" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
      </UART>
      <LPT>
        <Port slot="0" enabled="false" IOBase="0x378" IRQ="4"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
      </LPT>
      <AudioAdapter controller="AC97" driver="DirectSound" enabled="true"/>
      <SharedFolders/>
      <Clipboard mode="Bidirectional"/>
      <Guest memoryBalloonSize="0" statisticsUpdateInterval="0"/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1268515197509765600" flags=""/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE Controller" type="ICH6" PortCount="2">
        <AttachedDevice type="HardDisk" port="0" device="0">
          <Image uuid="{e797611c-8de7-4f9c-9c10-a0aeba3aa6a0}"/>
        </AttachedDevice>
        <AttachedDevice passthrough="false" type="DVD" port="0" device="1">
          <Image uuid="{f1f3b2b0-bef3-4d59-9824-5c0fc5de73e8}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>
(you should be able to use the above config - just overwrite the existing one and re-attach the drives)

Once the machine config is set, you should be able to install 10.5.5 by selecting the following custom options:

Code: Select all

9.5.0 Voodoo Kernel
Patched USB drivers
ACPI Fix
PS/2 Keyboard Fix
PS/2 Mouse Fix
To get the network adapter to work (as duralumin had mentined), you need to set the MAC address manually every time the machine starts - kind of a pain in the ass. To get around it, I created the following shell script and scheduled it with cron so it runs automatically every time the system reboots:

Code: Select all

#!/bin/bash
/sbin/ifconfig en0 ether 08:00:27:B9:8C:3D 
My crontab (I named the file assign_mac.sh):

Code: Select all

@reboot	/path/to/script/assign_mac.sh	>/dev/null 2>&1
There is probably a better way to do this. I'll look into it when I have some time. All that's left to do when OS-X boots now is to disconnect/reconnect the virtual cable in order to make the network work.

Regarding the sound, my understanding is that the AC97 kext that comes bundled with iPC is too old to work with the ICH AC97 sound adapter that VB uses and that nothing can be done to make it work short of writing a new driver.

Meanwhile back at the (SSE3) ranch:
I found this bug report which claims that SSE3 support was added as of version 2.1.0:
http://www.virtualbox.de/ticket/1798

Unfortunately my guest OS's in 3.1.4 don't think it's there (they're only seeing SSE and SSE2). There might be a way of enabling it in the config but I don't know how to do that. Theoretically, if you can get SSE3 running, you should be able to upgrade the OS to 10.5.8 using Apple Software Update. When I tried it using the Voodoo kernel, the script got stuck at about 80% and I eventually hard rebooted the machine. It started to come up booting Darwin 9.8.0 (10.5.8 ) but then the kernel panicked with the same I error that it gave me when I tried booting the Darwin 9.6 (10.5.6) kernel (default on the iPC DVD).
notbad
Posts: 78
Joined: 5. Jan 2010, 16:07
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Mac OS X

Re: Mac OS X guest

Post by notbad »

SSSE3 is needed. In the next VB release it will be supported.
ph0enix
Posts: 12
Joined: 12. Mar 2010, 00:24
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, FreeBSD, Haiku, Windwos XP, ReactOS, OpenSolaris

Re: Mac OS X guest

Post by ph0enix »

I was able to get Suplemental SSE3 working by using the VB patch described in this post:
http://www.insanelymac.com/forum/index. ... pic=207334

I'm experimenting with it now.

You need to register in order to download the patch (choose the correct version for your system).
Also the network works without any interaction at boot time now if you make the config. changes mentioned in the post.
notbad
Posts: 78
Joined: 5. Jan 2010, 16:07
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Mac OS X

Re: Mac OS X guest

Post by notbad »

I have fully working retail SL with internet out of the box in my VB.
ph0enix
Posts: 12
Joined: 12. Mar 2010, 00:24
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, FreeBSD, Haiku, Windwos XP, ReactOS, OpenSolaris

Re: Mac OS X guest

Post by ph0enix »

notbad wrote:I have fully working retail SL with internet out of the box in my VB.
Please share the config and the installation process info. Are you running the PUEL version of VB or custom? What's the host OS?

As I suspected, enabling SSSE3 made the Apple kernel work (no need for the modified Voodoo kernel anymore). I was able to upgrade to 9.8.0 (10.5.8) using Software Update. The installer got stuck at around 80% so I just hard rebooted. When the system came up again, it was running 9.8.0.
notbad
Posts: 78
Joined: 5. Jan 2010, 16:07
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Mac OS X

Re: Mac OS X guest

Post by notbad »

takwing
Posts: 72
Joined: 17. Jan 2010, 07:44
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: winxp, Leopard, Snow Leopard, , Win7, ubuntu 9.10
Location: Hong Kong
Contact:

Re: Mac OS X guest

Post by takwing »

My page (which summzarize the steps in setting up Leopard under VB) is updated again:

http://www.takwing.idv.hk/tech/index.php

I have included also the following:
- fixing the kbd cannot be found problem
- configuring the network card
- changing the display resolution.

Is there anything that you expert here think I should include?
For sound, as far as I know, nobody can get it works....

Thank you for your attention!
come and visit my technical page:
http://www.takwing.idv.hk/tech/index.php
Daniela2006
Posts: 1
Joined: 15. Mar 2010, 13:47
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: osx

Re: Mac OS X guest

Post by Daniela2006 »

mastervbprogrammer wrote:I tried to use a Mac OS X VM and it won't work in VBox, just VMWare. I am totally baffled as I've tried adjusting almost every setting under the sun...
I can get the VM to work until the gray Apple screen, when it hangs. No command-line option has resolved this, even though I've tried several. Finally, I sent this into verbose mode; here's the line I'm hanging on.
I've the same issue... i think it appens only on AMD Cpus...
i SOLVED this pre-installating the osx86 using Qemu ( i found a simple qemu-gui for FreeBSD ... called "EasyFreeBSD" )
after first-step of installation ( it require about 5 h :( )
just copy "image.vmdk" as Primary ICH6 VirtualBox Disk... ad continue installation :) on Vbox (keyboard layout etc..etc.. )
on qemu the installation seems to hang at 2/3 of setup process.. but it's not blocked
link for the qemu gui is http://www.wcn.it/easyfreebsd.zip

during installation, select the standard VirtualBox packages (qemu is only a pre-installer)
i hope this can help someone.
fridaystreet
Posts: 3
Joined: 11. Mar 2010, 14:22
Primary OS: openSUSE
VBox Version: OSE self-compiled
Guest OSses: xp, centos5.3 64 bit, osx 10.5.6

Re: Mac OS X guest

Post by fridaystreet »

Thanks for the cron script, I found a similar startup script but couldn't get it to work I'll give this a try.

If anyone is trying to do this on linux host would love to know if you've managed to get sound and more importantly network card to work on it's own. The patches mentioned obviously for windows only :-(

I've moved to iATKOS_v7 from IPC as it's 10.5.7. Latest iphone SDK needs minimum of 10.5.7

Also if anyone would like to shed a bit of light on what all the custom install options are it would be much appreciated. Are we supposed to be worried about SMBIOS etc????


Cheers
Paul
ph0enix
Posts: 12
Joined: 12. Mar 2010, 00:24
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, FreeBSD, Haiku, Windwos XP, ReactOS, OpenSolaris

Re: Mac OS X guest

Post by ph0enix »

fridaystreet wrote:Thanks for the cron script, I found a similar startup script but couldn't get it to work I'll give this a try.

If anyone is trying to do this on linux host would love to know if you've managed to get sound and more importantly network card to work on it's own. The patches mentioned obviously for windows only :-(

I've moved to iATKOS_v7 from IPC as it's 10.5.7. Latest iphone SDK needs minimum of 10.5.7

Also if anyone would like to shed a bit of light on what all the custom install options are it would be much appreciated. Are we supposed to be worried about SMBIOS etc????


Cheers
Paul
Before you schedule the script you need to make it executable with the "chmod +x filename_goes_here". Once you add it to root's crontab, do "crontab -l" to make sure it's really scheduled.

I actually had the sound working briefly in 10.5.8 yesterday. I found AppleAC97Audio.kext on InsanelyMac and it installed fine (need the Leopard, not the SL version) - the speaker icon showed up on the menu the next time I rebooted the system. The sound was choppy and disappeared at the next reboot. I tried reinstalling the kext but it didn't work. I haven't been able to get sound working since. The kext itself seems fine - I can load it manually with "kextload /System/Library/Extensions/AppleAC97Audio.kext" but it doesn't want to load automatically during startup. I'm not sure what to do to make the audio adapter show up in System Preferences after the kext is loaded. There might be a way. I haven't tried loading the kext with a script/cron yet. That might work too.

The default SMBIOS didn't work for me - it made "About this Mac" crash Finder every time I clicked it so I installed the AppleSMBIOS-ToH instead. It's all better now. If your SMBIOS works then don't mess with it. Changing it might make the system unusable.
trekmbikes
Posts: 1
Joined: 14. Mar 2010, 00:07
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Mac OSX Snow Leopard, ubuntu

Re: Mac OS X guest

Post by trekmbikes »

Thanks a million to takwing for streamlining the whole process for people like me who just want to click and go. This is great stuff.

I'm about to take a snapshot of my env and then attempt to upgrade to Snow Leopard after following his instructions. My reference is at http://www.taranfx.com/install-snow-leopard-virtualbox
iassael
Posts: 6
Joined: 23. Jan 2010, 17:37
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: MacOS, Ubuntu Karmic

Re: Mac OS X guest

Post by iassael »

why my SnowLeo sees only Localnetwork and cannot see the Internet?
Any suggestions?
thank you!
dreamcat4
Posts: 11
Joined: 20. Dec 2009, 18:32
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Linux, Mac OS X

Re: Mac OS X guest

Post by dreamcat4 »

Hi,
[MacOSX Host]
I just downloaded the March 04 VirtualBox OSE Edition from here:

http://www.purebasic.fr/virtualbox/?p=3

With 3.12/3.14 It used to show something like this:

Loading.........................................
..................................................
................. !Error


But now with Mar04 OSE Edition it just keeps printing:
OpenProtocol: {some ADDRESS} { some GUID }
OpenProtocol: {some ADDRESS} { some GUID }
OpenProtocol: {some ADDRESS} { some GUID }

For example:
OpenProtocol: 2F80F290 09C077A1-68B8-11D2-8E4F-B2EFC14D3E9A
OpenProtocol: 2F80F290 09C077A1-68B8-11D2-8E4F-B2EFC14D3E9A
OpenProtocol: 2F80F291 09C077A1-68B8-11D2-8E4F-B2EFC14D3E9A
OpenProtocol: 2F80F291 09C077A1-68B8-11D2-8E4F-B2EFC14D3E9A

Ad infinitum. (except with different GUID numbers on each line).

It may be best to wait for the official 3.2 release. However the guy with a linux host machine said it worked. Perhaps its just because my processor doesn't support VT-X/nested pagins? Maybe someone else here wants to check this out on a Mac Host with VT-X Support?
notbad
Posts: 78
Joined: 5. Jan 2010, 16:07
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Mac OS X

Re: Mac OS X guest

Post by notbad »

dreamcat4 wrote:Hi,
[MacOSX Host]
I just downloaded the March 04 VirtualBox OSE Edition from here:
Disable EFI!!!
sl.ider
Posts: 6
Joined: 3. Mar 2010, 23:36
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: ubuntu

Re: Mac OS X guest

Post by sl.ider »

iassael wrote:why my SnowLeo sees only Localnetwork and cannot see the Internet?
Any suggestions?
thank you!
mmm, I have the opposite: my "snowleo" can see the 'net, but not my local net.

I've set the network to "Intel PRO/1000 MT Server" and NAT, and this worked right after boot, (no copying MAC addresses, no "cable connect - disconnect" tricks)

I can surf in Safari on the net, but accessing my host mac doesn't work, although my virtual-snowleopard pops up in my Finder window on the host (so bonjour seems to be able to pass the virtual machine barrier), but trying to connect just times out. The Virtual machine cannot see the bonjour servers.

Does anyone know how to make the host (or the guest) see the other? I want to use this as a "shared folder".
Locked