Can you please provide more details about this query.
If you want to setup correct hostname then you can refer to ambari Doc (hostname setup section):
Can you please try the following:
Click on VirtualBox -> Preferences -> Network (on the left menu bar),
Select your NAT network (LocalNat) and Click the Screwdriver icon to the right to edit like we did before when confirming the networking settings for the NAT network. This will bring you back to the NAT networking details window, click on the ‘port forwarding’ button.
Check the network setup and if needed then setup a rule to forward a port on your local machine to the port of your virtual machine.
Host IP: <blank>
Host Port: 8080
Guest IP: 10.0.2.15 ( as in your case )
Guest Port: 8080
Now check if the following URL is accessible?