Vmrun return all IPs for running VMs: Difference between revisions
Jump to navigation
Jump to search
(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/ | 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/ | 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/ | 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. |
Revision as of 19:22, 9 December 2008
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/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/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/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.
See also: