hdiutil attach /tmp/ElCapitan.dmg -noverify -mountpoint /Volumes/ElCapitan
Many pirated ISOs include bootloaders (Clover, Chameleon) meant for Hackintoshes. If you write this to a USB and boot a real Mac, it will kernel panic instantly.
Open Terminal and paste:
hdiutil create -o /tmp/ElCapitan -size 8000m -volname ElCapitan -layout SPUD -fs HFS+J
Now that you have the official Install OS X El Capitan.app in your Applications folder, you do not need shady torrent sites. Here is how to create a perfect, untouched Mac OS X El Capitan 10.11.6 ISO for virtual machines. Mac Os X El Capitan 10.11 6 Iso Download
Using your newly created ISO:
ElCapitan_10.11.6.iso to the optical drive.VBoxManage setextradata "YourVMName" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"