Is there any way to get the VMWARE HOST computer name from the GUEST workstation without changing the HOST settings?

Suppose I have a VMWARE workstation (guest Windows and hosted Windows). Is there any way to get the host name? And without changing the host machine, as in this link .

+6
vmware vmware-workstation
source share
7 answers

I do this by passing the string from host to guest through machine.id. This requires changes to the host (in every VM.vmx file too), and it does not automatically detect the host name of the host, but it works. On the host with the virtual machine turned on, edit the .vmx file for the virtual machine. Find or add a line that looks like this:

machine.id = "<string>" 

Set <string> to some identifying string that tells you the server name. It can be a host name, or it can be a shortened version, or even some strange code, if you prefer, if you know what that means. If, however, the .vmx file has a line that sets

 isolation.tools.machine.id.get.disable = TRUE 

line feed will not work, so if this line is present, you can either delete / comment on it or set the value to FALSE .

In the guest OS, if you have VMware tools installed, you can do this (for Linux guests):

 vmware-guestd --cmd 'machine.id.get' 

or (for Windows guests that I have not tried):

 VMwareService --cmd machine.id.get 
+9
source share

If you can install PowerCLI on the guest operating system, you can access some ESX host information by looking at the virtual machine that your script is running:

 Connect-VIServer -Server <myvcenterserver> $myVM = Get-VM -Name $(dir env:COMPUTERNAME).Value $myVM.Host.Name 

Note. It is assumed that your guest has the same host name as the virtual machine name in vCenter.

For Linux guests (OP stated by Windows) I use pyVmomi Python to do a similar search.

+3
source share

I know this is an old thread, however, if someone is still interested in the answer "thomas lee" above, is working on the latest version of VMWare workstation and VMWare fusion . New command to get value

 rpctool machine.id.get 

Use this when deploying managed virtual machines for Fusion so that the machine name is automatically set at first boot. Thanks to Thomas .....

+3
source share

In principle, no.

However, it is possible that certain vulnerabilities may exist (or will exist) that allow an malicious guest OS to bypass the isolated VM environment. For example, read Blue Pill . You can also read more information about the researcherโ€™s own blog, The Invisible Things of Joanna Rutkowski .
Of course, this is just a proof of concept, but any security implemented in software is subject to software errors ...

+2
source share

I think that there may be several ways to do this, and I can think of two with a bat: We could install ViX on the guest system, connect to the host without specifying the host name (Google "ViX" link (see "General tasks" "), then use Vix_CopyFileFromHostToGuest() to copy the /etc/vmware/esx.conf file. Another would be to create some kind of network connection from the guest to the host (I used ssh , but if you don't know the host name or IP address, you can still use the ViX connection as above and send the job that takes while), and then sk zhite netstat -a to the guest. The output netstat will contain the host name, if it is solvable.

+2
source share

You actually have two computers on the network. If one of the private network / NAT style settings is used for virtual network adapters, then the host has a fairly predictable IP address, so you could use any of a variety of remote administrator approaches to ask it just like any other.

If there is only one guest OS, just try each IP address with the same leading 24 bits as the guest IP address to keep the pastries guessing at the address.

+1
source share

In vSphere

  • Click host
  • Click the "Configuration" tab
  • In the "Software" section, click "DNS" and "Routing"

VMware | vCenter | vSphere Host Configuration

+1
source share

All Articles