[Off-topic] E:V:A:
1. Pre-installation preparation

Basic Hardware Info

Before you attempt to install your OSX into a VirtualBox VM (guest),

you need to find out some details about your own machine (host). Why?

Because every new OS X is depending on the Hardware to be very

"maxed out" and specific. You need to tune your VB VM to behave similar

to a real Apple machine in order to make the OS X think your machine

hardware is a real Mac. In addition, some PCI devices are passed on and

through to the VB VM engine.

For example, for a half decent running Mavericks installation,

you need to have at least 2-4 processor cores, 4 GB RAM and 30 GB HD

in your VM. Then your host need some memory as well... Then to get

correct audio, video, network, USB etc you need to know exactly what

HW your host have AND how that is presented by VB to a VM guest.

So how do you do that?

On your PC/Laptop (host):

[SIZE=2]Windows: Use [URL="http://www.hwinfo.com/"]HWiNFO64[/URL] + [URL="http://rweverything.com/download/"]RW-Everything[/URL] + (Windows) [I]Device Manager [/I]

Linux: Download and run a Live Linux distro and copy the
output of [I]dmesg[/I] and [I]lspci, lsusb[/I], respectively.
[/SIZE]

For this laptop we have:

<TBA>

From host HWiNFO64, we found:

[SIZE=2]Audio Adapter: Intel Lynx Point PCH - High Definition Audio Controller [C2]
Audio Controller Hardware ID: PCI\VEN_8086&DEV_8C20&SUBSYS_11CD1043&REV_05
Audio Codec Hardware ID: HDAUDIO\FUNC_01&VEN_[COLOR=Red][B]10EC[/B][/COLOR]&DEV_[COLOR=Red][B]0668[/B][/COLOR]&SUBSYS_00000000
DeviceInstanceId: HDAUDIO\FUNC_01&VEN_10EC&DEV_0668&SUBSYS_104311CD&REV_1000\4&6BFDCFC&0&0001
[/SIZE]

We then look up these PCI IDs at one of the websites:

pci-ids or pci-database.

There we find that the host physical Audio Codec is a: Realtek ALC668 [10EC:0668]

So if we had a real Hackingtosh, we would have to find or make and

install the AppleHDA.Kext that has been built and tweaked to

correspond to this driver. Here are some relevant links:

http://www.insanelymac.com/forum/files/file/203-applehda-alc662-1092/

http://www.insanelymac.com/forum/files/file/148-109-gm-applehda-for-alc662/

http://www.insanelymac.com/forum/files/file/128-109-dp7-applehda-for-alc662/

http://www.insanelymac.com/forum/files/file/6-applehda-for-alc662/

On the VirtualBox VM (guest):

Boot up or install any minimal OS like Windows, Linux and use the

same method as above, but now running in the VM. As you will see,

the detected hardware will look different. That is basically

how OSX will see it as well.

So to help you along we'll jump ahead and I just show you

what an installed guest OS will see in terms of Audio HW.

I've ignored all other HW, since audio is what causes most

trouble to OSX guests.

On OSX 10.9.4 (Intel HD Audio):

[SIZE=2]# sudo lspci -m -v
Device: 00.05.0
Device: 82801FB (ICH6) High Definition Audio Controller
SVendor: [B]SigmaTel[/B]
SDevice: Device 7680

# sudo lspci -m -n -vvv
Class: 0403
Vendor: 8086
Device: 2668
SVendor: [B]8384[/B]
SDevice: [B]7680[/B]
[/SIZE]

On Linux Mint (ICH AC97):

# sudo lspci -b -nn -v
00:05.0 Multimedia audio controller [0401]: Intel Corporation 82801AA AC'97 Audio Controller [8086:2415] (rev 01)
Subsystem: Intel Corporation Device [8086:0000]
Flags: bus master, medium devsel, latency 64, IRQ 11
I/O ports at d100
I/O ports at d200
Kernel driver in use: snd_intel8x0

On Linux Mint (Intel HD Audio):

[SIZE=2]00:05.0 Audio device [0403]: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller [8086:2668] (rev 01)
Subsystem: SigmaTel Device [[COLOR=Red][B]8384:7680[/B][/COLOR]]
Flags: bus master, fast devsel, latency 64, IRQ 11
Memory at f0804000 (32-bit, non-prefetchable)
Capabilities: [50] Power Management version 2
Kernel driver in use: snd_hda_intel[/SIZE]

On Windows 7 (Intel HD Audio):

[SIZE=2]Audio Controller Hardware ID: PCI\VEN_8086&DEV_2668&SUBSYS_[B]76808384[/B]&REV_01
Audio Codec Hardware ID: HDAUDIO\FUNC_04&VEN_0000&DEV_0000&SUBSYS_00000000[/SIZE]

Clearly the guest driver presented is a SigmaTel with PCI ID: 8384:7680.

Further research reveals it is based on a: SigmaTel STAC9221 [8384:7680]

Thus, for any audio success on running OSX on a VirtualBox VM, we need

to find a Kernel Extension (Kext) that is compatible with this driver.

The best way is to find a tweaked AppleHD.Kext to match this driver.

HOWEVER! Lo-and-behold! The Realtek (!) linux sources seem to suggest

that this driver is used in several Macs:

From: ..\alsa\alsa-kernel\pci\hda\patch_sigmatel.c:

[SIZE=2]
/* Apple Intel Mac (Mac Mini, MacBook, MacBook Pro...) */
SND_PCI_QUIRK(0x8384, 0x7680, "Mac", STAC_INTEL_MAC_AUTO),
...
/* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */
static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = {
SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1),
SND_PCI_QUIRK(0x106b, 0x0600, "Mac", STAC_INTEL_MAC_V2),
SND_PCI_QUIRK(0x106b, 0x0700, "Mac", STAC_INTEL_MAC_V2),
SND_PCI_QUIRK(0x106b, 0x0e00, "Mac", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x0f00, "Mac", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x1600, "Mac", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x1700, "Mac", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x0200, "Mac", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x1e00, "Mac", STAC_INTEL_MAC_V3),
SND_PCI_QUIRK(0x106b, 0x1a00, "Mac", STAC_INTEL_MAC_V4),
SND_PCI_QUIRK(0x106b, 0x0a00, "Mac", STAC_INTEL_MAC_V5),
SND_PCI_QUIRK(0x106b, 0x2200, "Mac", STAC_INTEL_MAC_V5),
{}
};
...
{ .id = 0x83847680, .name = "STAC9221 A1", .patch = patch_stac922x },[/SIZE]

So when you first boot and install your Niresh Mavericks, you should

probably leave out any Audio related hacks, and certainly avoid

installing the VooDooHDA related Kext. It's possible (and I didn't

bother to check) that audio would then work out-of-the-box as well.

Finding a suitable "distro"

Next, you need to find and download a suitable ISO version of the

OSX Mavericks Installation disk. Apple uses the DMG format to

distribute all their installation "Disks". So to avoid having to

mess with the conversion of a 3.5+ GB DMG image to ISO, we just

try to find a torrent of one already made. But because of the

inherent complications of booting and setting up your own

"Hackingtosh" from a vanilla (original) Apple disk, we prefer to

use one that come as a distribution ("distro") which is more

flexible and much more likely to install from first try. And

usually have some sort of support forum connected to it.

One such distro is that from Niresh. We will use that one.

It is important to mention that, today Apple OS X Maverick is free

of charge for download and use, but you need an OSX based computer,

in order to get it from the Apple Store. And if you're willing to

jump through the Apple hoops, you can also get the latest

OSX Yosemite (10.10.0) and try that. But you need to signup

to the Apple Store with a credit card! So I just used my untraceable

NSA credit card to signup. It has a picture of Obama and the Logo of

Google on it. In the states you can usually find those in the bottom

of some randomly selected Kellogg's Corn-Flakes Packages.