open-vm-tools icon indicating copy to clipboard operation
open-vm-tools copied to clipboard

vmrun getGuestIPAddress not working on headless mode

Open eszense opened this issue 2 years ago • 3 comments

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.

eszense avatar Apr 21 '24 13:04 eszense

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.

zhoumgh avatar Apr 22 '24 18:04 zhoumgh

Hmmm, get the same issue, why does -wait work??

soccypowa avatar Apr 11 '25 10:04 soccypowa