if [[ -r /proc/user_beancounters && ! -d /proc/bc ]]; then
    CTID=$(sed -n 3p /proc/user_beancounters | cut -f1 -d: | tr -d '[:space:]')
    echo You are currently in a VE with the ID: $CTID
fi