Vmrun return all IPs for running VMs
Return all IPs for running VMs
If you want to do this through vmrun on VMware Server 2, then you can do the following:
vmrun -T server -h https://myserver/sdk -u root -p passwd -gu root -gp passwd runProgramInGuest "[standard] test/Clone of SLES10sp1-64bit.vmx" /bin/sh "/sbin/ifconfig > /tmp/ip-info.txt" vmrun -T server -h https://myserver/sdk -u root -p passwd -gu root -gp passwd copyFileFromGuestToHost "[standard] test/Clone of SLES10sp1-64bit.vmx" /tmp/ip-info.txt /host/path/ip-info.txt" vmrun -T server -h https://myserver/sdk -u root -p passwd -gu root -gp passwd deleteFileInGuest "[standard] test/Clone of SLES10sp1-64bit.vmx" /tmp/ip-info.txt
This will redirect the output of ifconfig to a file on the guest, then copy that file to the host. It also cleans up the file, just to be tidy.
See also: