Official way to obtain an OS X ISO file
The answer above by @stuffe won't work on Mavericks. Apparently Apple has changed the format of the ESD image and it's no longer bootable.
Looking around I've found a couple of pointers on how to do the necessary conversions to get the result as something you can boot a VM off.
Depending on what's the purpose of the ISO file, if it's to reinstall a computer, it might be more useful to use a Bootable USB- For that, check How to: Create a bootable installation for OS X Mavericks 10.9 and above.
For the ISO file itself, I've mostly used the information found on this post on the InsanelyMac site, augmented with the information/tip on creating a Recovery Partition found on the Apple Support Communities.
Basically the process is to get the ESD image, and rebuild it to include some info that is now packaged as symlinks, and get that out as a ISO file. The author of the InsanelyMac post has automated the process into a bash script, that I'm pasting here for convenience/reference:
I can confirm that the resulting image is indeed bootable within Fusion; it's in the process of being installed so I'm yet to see whether other "tricks" are needed to make it work (for example, if the result is lacking a Recovery Partition as stated in some of the threads).
UPDATE: The resulting VM boots, and appears to work "well". I have used the method described to create a recovery partition, but even though Carbon Copy "sees" a Recovery Partition on the (virtual) HD, it doesn't appear to work all that well, as booting the VM with Option key pressed doesn't do anything. Will look into it if I have time, but for the time being it appears that the .iso file I got is working.
-
-
-