Yes, install Android Studio or whatever you're using inside the VM, then compile the code and publish from there only.
No need to delete the source code, you can change package name, app id, UI design, etc.
Nothing to be confused about. Google has a fingerprint of every computer used to...