Hostname Overwritten During Kickstart

I currently work for a Data Center, and I have set up a PXE system with a kickstart file for Ubuntu 16.04, but for some reason I can not get the hostname that I have set to stick. I know it retrieves the hostname from DNS if one is not stated, but no matter what I try, the install sets the hostname as Kickseed. I’ve tried the following:

Setting the hostname under
network --bootproto=DHCP --hostname=HOSTNAME

In the %pre setion as
/usr/bin/hostnamectl set-hostname HOSTNAME

In the %post section as
/usr/bin/hostnamectl set-hostname HOSTNAME

Any help would be greatly appreciated.

This reads like a support type question, which this site is not setup for.

Please have a look at https://community.ubuntu.com/t/finding-help/712 which provides a list of places to get help from (Ubuntu forums, Ask Ubuntu, IRC, LP Answers…)

I’ve moved this to the https://community.ubuntu.com/c/support-help-requests category because this site isn’t designed to take tech support questions. Sorry. I’d recommend using one of the official support channels listed on the https://community.ubuntu.com/t/finding-help/712 page.