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:
if [ -z "$ESD" ] || [ -z "$TMP" ]; then
echo usage: "'$0' /path/to/esd /path/to/tmpdir"
if ! [ -e "$ESD" ]; then
echo "file '$ESD' does not exist"
if ! [ -e "$TMP" ]; then
echo "dir '$TMP' does not exist"
if [ -d "$MPAPP" ]; then hdiutil detach "$MPAPP"; fi
if [ -d "$MPIMG" ]; then hdiutil detach "$MPIMG"; fi
echo +++ Command returned with error, aborting ...
trap detach_all EXIT
trap exit_all ERR
echo +++ Trying to unmount anything from previous run
echo +++ Mount the installer image
hdiutil attach "$ESD" -noverify -nobrowse -readonly -mountpoint "$MPAPP"
echo +++ Convert the boot image to a sparse bundle
rm -f "$IMGSPARSE"
hdiutil convert "$MPAPP"/BaseSystem.dmg -format UDSP -o "$IMGSPARSE"
echo +++ Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g "$IMGSPARSE"
echo +++ Mount the sparse bundle for package addition
hdiutil attach "$IMGSPARSE" -noverify -nobrowse -readwrite -mountpoint "$MPIMG"
echo +++ Remove Package link and replace with actual files
rm -f "$MPIMG"/System/Installation/Packages
cp -rp "$MPAPP"/Packages "$MPIMG"/System/Installation/
echo +++ Unmount the installer image
hdiutil detach "$MPAPP"
echo +++ Unmount the sparse bundle
hdiutil detach "$MPIMG"
echo +++ Resize the partition in the sparse bundle to remove any free space
hdiutil resize -sectors min "$IMGSPARSE"
echo +++ Convert the sparse bundle to ISO/CD master
rm -f "$IMGDVD"
hdiutil convert "$IMGSPARSE" -format UDTO -o "$IMGDVD"
echo +++ Remove the sparse bundle
echo "Find your DVD at '$IMGDVD'"
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.