vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.21k stars 420 forks source link

vmrun getGuestIPAddress not working on headless mode #718

Open eszense opened 3 months ago

eszense commented 3 months ago

Describe the bug

The vmrun getGuestIPAddress command does not work when VM is started in headless mode as previously reported.

Reproduction steps

  1. vmrun -T fusion start "path/to/MyVMs.vmx" nogui
  2. vmrun -T fusion getGuestIPAddress "path/to/MyVMs.vmx" Error: The VMware Tools are not running in the virtual machine
  3. vmrun -T fusion checkToolsState "path/to/MyVMs.vmx" installed

Expected behavior

Return IP address regardless of gui/nogui mode

Additional context

Workaround with vmrun getGuestIPAddress -wait has been suggested.

zhoumgh commented 3 months ago

VMware Tools has to be running in the virtual machine for the command to work.

After VM power on, it takes some time for GOS and VMware Tools daemon to start. After tools daemon starts, it may take another 30 seconds to report guest IP address.

If the problem persists, we need to check vmware.log to see if the tools is running or GOS has hung or else.