#!/bin/bash
# vmlist script, universal for LXC and OVZ
if [[ -e /usr/bin/lxctl ]]; then
	lxctl list | awk '{ printf "%-7s %-15s %-12s %s\n", $3, $4, $2, $5 }'
elif [[ -e /usr/sbin/vzctl ]]; then 
	vzlist -a | awk '{ printf "%-7s %-15s %-8s %s\n", $3, $4, $1, $5 }'
else 
echo "It seems, that i am not OVZ or LXC host-node, check me, please."
fi

