title: How to get local and public HostName in Azure VM?
body: <p>In <a href="https://github.com/Netflix/ndbench/blob/47978fb18f9ed3ccd4846744c9a3036c6c8b4577/ndbench-core/src/main/java/com/netflix/ndbench/core/discovery/AWSLocalClusterDiscovery.java#L45" rel="nofollow noreferrer">this link</a> there is two public addresses (<code>http://169.254.169.254/latest/meta-data/public-hostname</code> and <code>http://169.254.169.254/latest/meta10-data/local-hostname</code>) that will return public and local host name for your instance (virtual machine).<br/>
  Please follow this <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html" rel="nofollow noreferrer">link</a> to know more about <code>169.254.169.254</code> in Amazon AWS.<br/><br/>is there any same way for Microsoft Azure VM?</p>