VMware Communities
IvarREW
Enthusiast
Enthusiast

is there a consistent hostname for the host OS within a guest OS?

This is probably a FAQ but my search skills have failed me - is there a consistent network hostname to reach a host from within a guest OS?

I spend a lot of time ssh'ing into guest VMs and occasionally I like to ssh back into the host. (Especially now since file sharing is problematic with newer Linux kernels).

What is the easiest way to get to host without having to look up the host IP?

2 Replies
smides
Contributor
Contributor

I have often wondered this, myself.

wila
Immortal
Immortal

Hi,

AFAIK there is no consistent hostname from a linux guest to your host OS. In my opinion it would be a security issue if there was.

I am aware that vmware tools does "sort of" give you such a thing, in a windows guest you have "\\vmware-host" in windows explorer that points to your shares on the host. It is however not a normal DNS name. Eg. running nslookup vmware-host will not give back an IP, nor does ping work.

Under Linux the hgfs file share gets mounted on ".host". Again this is not a valid network DNS name.

Assuming enough of VMware Tools works to use VIX/vmrun you could do something similar to this:

Vmrun return all IPs for running VMs - VI-Toolkit

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos