Hi, i think more prefer way is to copy all configuration and needed data and install new system.
usually it does not matter what manufacture of your server, but it’s important what kind of architecture of the system: processor, 32bit or 64 and etc.
For example on defferent system u need different kind of precompiled 729/723 codecs.
Asterisk hasn’t been compiled for the guess machine processor.
Note even if you compile on the guest, some VM environments tell the compiler that their processor is more capable that it actually is. You need to compile Asterisk with a specific generic processor, rather than allowing it to optimise for the exact instruction set of the machine on which it is being built.