Hello Kantawee,
You would need to deactivate the license from the current VM to be able to apply it to the new VM environment. The other option would be to have a backup server license key to use in case of an outage on the primary VM.
You can refer to the help document below for more about the license keys.
https://help.alteryx.com/licensing/current/Licensing_Home.htm
Thanks!
TrevorS