I am using virtual machines for development,but each time I need a new VM, I copy the file and create a new server, but I need a new name for the server to add it to our network.

After renaming the server, the Sharepoint sites have many errors and do not run.

+1  A: 

Actually there is a bunch of stuff you will need to do in regards of the unique computer SID, SQL Server etc.

These links will get you started:

I hope this helps, enjoy.

+1  A: 

Here is a Technet article that might be helpful:

If you are going to uninstall SharePoint check this article for more details about SQL Server rename:

Toni Frankola
+1  A: 

Here is another link that helped me a lot: