In my workflow I use a linux vm running on parallels desktop. Parallels gives quite good stability and efficiency. It is well integrated with os, so I can just poweroff computer and my vm is also gently turned off (not poweroff like in vbox). I don’t need a backup of whole machine in time machine (macos backup tool), so I put my workdir on host os and attached it to vm using parallels tools shared directories.

Unfortunately I had a lot of redefinition build errors in my project. After some investigation I found that this problem only occurs on this specific vm. My friend suggested to check if it also exist on similar vm but without parallels tools. This was the moment when I watched out that a directory where I keep source code and build directory is mounted with parallels tools. Copying data to vm’s fs fixed problem.