New VM shows wrong hostname

Destroyed two old VM (using SAP RHEL 8.6 marketplace build). Recreated them with the same names as the old VMs. /etc/hosts files shows the correct data, shell prompt shows @, but “sudo hostname” command provides the wrong response. Any idea what is causing this and how to correct?

Seems like the metadata system was confused. This was either the speed with which I deleted and recreated the instances with the same name or some other unknown issue. I was able to clear it with a reset on the instance.