Is it safe to answer "erase disk and install Ubuntu" on a virtual machine?
Solution 1:
Assuming you are installing on a virtual machine that is running on your host OSX system, the VM has no access to your host's hardware. It is running on a virtual drive that you created for it.
So no, it will not affect your host and the Ubuntu installer has absolutely no knowledge of the host system. It is safe to answer OK.
Solution 2:
Yes just click erase disk and then follow the instructions. If you're running on a Virtual machine then it is always going to install to the virtual disk.