Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave.
After reading a few articles I ended up with this steps:
- On macOS, download the High Sierra installer (even if you have Mojave installed): https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
- If the High Sierra Installer starts, quit it.
- Open "Disk Utility".
- Click on "File" > "New Image" > "Blank image...". Or just press cmd+N.
- In the "Size" field, enter
13 GB
and save it wherever you want.