Vmrun return all IPs for running VMs: Difference between revisions

m
tidied it up a little bit
(New page: ==== 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 passw...)
 
m (tidied it up a little bit)
Line 3: Line 3:
If you want to do this through vmrun on VMware Server 2, then you can do the following:
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 runProgramInGuest "[standard] test/SLES10sp1.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 copyFileFromGuestToHost "[standard] test/SLES10sp1.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
  vmrun -T server -h https://myserver/sdk -u root -p passwd -gu root -gp passwd deleteFileInGuest "[standard] test/SLES10sp1.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.
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.
1,274

edits