It’s very hard to hide that you’re running in a virtual environment, in fact “systemd”-based machines have a built-in command, systemd-detect-virt, exactly for detecting this. And almost every virtualization framework has documented ways for the VMs to detemine that they run under the respective virtual environment.