SHIFT-WIKI

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

User Tools

Site Tools


vmwarevmxfile

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:

for vm in `vmware-cmd -l`; do grep -i displayname "$vm"; grep -i 'ethernet..virtualdev' "$vm" ; done

This could also be implemented in a script to make it more readable:

for vm in `vmware-cmd -l`; 
   do grep -i displayname "$vm"; 
   grep -i 'ethernet..virtualdev' "$vm" ; 
done

This will give you an output like this:

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"
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.
vmwarevmxfile.txt · Last modified: 2021/09/24 00:25 by 127.0.0.1