Just download a preloaded VM already.
Well, I banged my head several times and in several different ways trying to get a virtual Hackintosh going. I did various things to try to install an OS X Yosemite VM in Virtualbox, but nothing seemed to be working
I kept looking around, though, as I remember there used to be a site where you could download preconfigured virtual machines for various operating systems, and it was looking more and more like that was the way I had to go.
Well, I never found that site, but I finally did come across one I had seen a couple of years ago with the updated article “How to install Mac OS X Yosemite 10.10 on VirtualBox?” The author provides a preconfigured virtual machine with accompanying instructions. Neat.
Of course, I cannot guarantee that anything hacked up on the web is malware free, but I haven’t seen any problems as a result, at least not yet. Obviously, this method is not for the paranoid.