I really have no good ideas on how to do this.
The simplist solution I think woudl be to have a tool like:
dhcp-advertize-hostname --interface=eth0 --hostname=foo
and just invoke it. That tool would just do a dhcp request with the hostname set. I'm just not familiar enough with how dhcp works to say if we can actually do that or not. It seems at very least that we'd risk invalidating the lease.
This code would only be run on azure, so that would minimize the issue.
bouncing the interface like walinuxagent does is really less than ideal.
I really have no good ideas on how to do this. -hostname --interface=eth0 --hostname=foo
The simplist solution I think woudl be to have a tool like:
dhcp-advertize
and just invoke it. That tool would just do a dhcp request with the hostname set. I'm just not familiar enough with how dhcp works to say if we can actually do that or not. It seems at very least that we'd risk invalidating the lease.
This code would only be run on azure, so that would minimize the issue.
bouncing the interface like walinuxagent does is really less than ideal.