Skip to content

Instantly share code, notes, and snippets.

@hupili
Created November 28, 2014 01:42
Show Gist options
  • Save hupili/83f2940f317575642937 to your computer and use it in GitHub Desktop.
Save hupili/83f2940f317575642937 to your computer and use it in GitHub Desktop.
show IPs of LXC virtual machine (for ubuntu).
#!/bin/bash
# Run this under /var/lib/lxc
for vm in `find -maxdepth 1 -type d`
do
echo $vm
grep 'address' $vm/rootfs/etc/network/interfaces
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment