Could not set property: Failed to set static hostname: Device or resource busy

I’m running an Amazon Linux 2 image. Hostnamectl works for reading the setup. But when I issue “hostnamectl set-hostname newname” I get the error “Could not set property: Failed to set static hostname: Device or resource busy”.

Does anybody have any ideas on how to fix this?

Thanks