SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


vmwarevmxfile
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vmwarevmxfile [2013/04/20 13:30] (current)
sjoerd created
Line 1: Line 1:
 += Script: ESX: Grep Info From All VMX Files =
  
 +I used this small command/​script to grep all nic devices from all the virtual devices that are registered on the host:
 +
 +<​code>​
 +for vm in `vmware-cmd -l`; do grep -i displayname "​$vm";​ grep -i '​ethernet..virtualdev'​ "​$vm"​ ; done
 +</​code>​
 +
 +This could also be implemented in a script to make it more readable:
 +<code bash>
 +for vm in `vmware-cmd -l`; 
 +   do grep -i displayname "​$vm"; ​
 +   grep -i '​ethernet..virtualdev'​ "​$vm"​ ; 
 +done
 +</​code>​
 +
 +This will give you an output like this:
 +<​code>​
 +displayName = "​SLES11-PROXY"​
 +ethernet0.virtualDev = "​vmxnet3"​
 +ethernet1.virtualDev = "​vmxnet3"​
 +ethernet2.virtualDev = "​vmxnet3"​
 +displayName = "​W2K8-Template"​
 +ethernet0.virtualDev = "​vmxnet3"​
 +displayName = "​W2K3-REPORTS"​
 +ethernet0.virtualDev = "​e1000"​
 +displayName = "​WINXP-RDP-SJOERD"​
 +displayName = "​SLES11-REVPROXY"​
 +ethernet0.virtualDev = "​vmxnet3"​
 +ethernet1.virtualDev = "​vmxnet3"​
 +ethernet2.virtualDev = "​vmxnet3"​
 +</​code>​
 +
 +> Note: The Windows XP box listed does have a network card, being the "​flexible"​ adapter. This card however is not listed in the VMX file. 
 +
 +{{tag>​scripts vmware}}
vmwarevmxfile.txt ยท Last modified: 2013/04/20 13:30 by sjoerd