Fusion

 View Only

 vmrun getguestipaddress only works when the VM is started from the Fusion GUI

brosenz's profile image
brosenz posted Aug 11, 2024 07:03 PM

I did install open-vm-tools on both VMs, but the command vmrun getguestipaddress only works if I start the VM from the Fusion GUI (Virtual Machine Library), if I start the VM using the vmrun -T fusion <path-to-vmx> nogui, (in headless mode) I will get the error: "Error: The VMware Tools are not running in the virtual machine".

I have tested this with Alpine 18 and Debian 12 VMs, always the same behavior, and I have confirmed that when running with vmrun nongui the vm-open-tools Service is running in the guest.

Any idea why this? In theory if I run the VM from the Fusion GUI or vmrun nongui should provide the exact same result, its the same VM, thanks

Technogeezer's profile image
External Moderator Technogeezer

I'm seeing the same thing. Not sure if this is a bug or "behaving as designed" -- but either way it's annoying and unhelpful. It appears that when starting a VM with the nogui option, the running state of the in-guest tools is not passed to whatever vmrun is using to check the status of the tools. If you execute vmrun -T fusion checkToolsState <path to vmx> after starting the VM with nogui, the state is shown as Installed, not Running. 

I'm thinking that it might be possible to build an in-guest script that gets the IP address via ip addr, and then use that as the command to run with vmrun -T <path to vmx> runProgramInGuest <script path> Some quick testing seems to show that the runProgramInGuest works even though the state of the tools is not known.