This post was published 10 years, 5 months ago. Some material it contains may no longer be applicable.
I finally managed it to install Yosemite in VirtualBox as a, well, virtual machine.
Create a new virtual machine, choose OS X 10.9 x64 as operating system and give it some RAM. Then you need to prepare the install disk image (i have used the developer preview version!) with the following steps (taken from here):
1 2 3 4 5 6 7 8 | iesd -i /Applications/Install\ OS\ X\ 10.10\ Developer\ Preview.app -o yosemite.dmg -t BaseSystem hdiutil convert yosemite.dmg -format UDSP -o yosemite.sparseimage hdiutil mount /Applications/Install\ OS\ X\ 10.10\ Developer\ Preview.app/Contents/SharedSupport/InstallESD.dmg hdiutil mount yosemite.sparseimage cp /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/ hdiutil unmount /Volumes/OS\ X\ Install\ ESD/ hdiutil unmount /Volumes/OS\ X\ Base\ System/ hdiutil convert yosemite.sparseimage -format UDZO -o yosemitefixed.dmg |
You can save these commands as a bash script, run it and relax. When finished, mount the yosemitefixed.dmg as a live-CD in your virtual machine. Internet said it is a good idea to change the chipset of the virtual machine to PIIX3, so do that. After installation it is important to remove the live-CD image and reboot. Voila, should work. Good luck!
But performance is really bad at the moment.