diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index f3c6452..1c214db 100755 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -258,7 +258,7 @@ def get_hostname(hostname_command='hostname'): def set_hostname(hostname, hostname_command='hostname'): - subp.subp([hostname_command, hostname]) + util.subp(['hostnamectl', 'set-hostname', str(hostname)]) @azure_ds_telemetry_reporter