Error while using setfile to set icon for dmg created via hdiutil in mac
found another way to set icon. 
Right click the DMG file and click "GetInfo"
Drag and drop the icon file to the icon location present in the GetInfo dialog box.
it sets.

Thanks and regards,
Saravana