Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Script to list all IP’s in Virtuzzo/OpenVZ  (Read 18444 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
Script to list all IP’s in Virtuzzo/OpenVZ
« on: August 30, 2014, 02:33:41 pm »

You can use the below script to list all IP’s in a Virtuzzo or OpenVZ node

Code: [Select]
for CT in $(vzlist -o ctid); do echo "== CT $CT =="; vzctl exec $CT ifconfig | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' | grep -v ^127; done

Cheeerrss!!!!!!!!11