My college is doing it and i pass the perl script to the developers...See proxmox more as a system that brings all the good things together, instead of a full from one hand/company made hypervisor, like esxi.
So on one side that's something that needs to get implemented in lxc first.
On the other side, since proxmox does the gui, it's actually possible to request this as future feature i think.
It nervs me tbh too, that I can't see in the gui the ip of my lxc containers. I have everything dhcp controlled.
So if it's possible to implement, it would be amazing. Doesn't needs to be any complex guest agent or something. Maybe a simple bash script would do it, to just grab the ip's and output it into the gui
On the other side, maybe a super simple systemd service can do it too, since many parts of lxc containers are accessible from the host itself. Probably if i have some time, i check myself what's the best way to do this.
Cheers
#!/usr/bin/perl
##############################################################################
#
# Autori: Marco Colombo (marco@openit.it)
# Valentina Portolan (valentina@openit.it)
# Giuliano Natali Diaolin (diaolin@openit.it)
# Copyright: Open It S.r.l.
# Via Dante 300
# 38057 Pergine Valsugana (TN) ITALY
# Tel: +39 0461 504800 Fax: +39 0461 538443
#
# release $Name: $
# revision $Revision: 1.27 $
##########################################################################
# usage: $0 ID
##########################################################################
package main;
use Socket;
# controlla sintassi
if ($#ARGV != 0) {
print "ERROR USAGE: $0 <ID>\n";
exit(0);
$ID = $ARGV[0];
@CONTENT = `pct exec $ID ip addr`;
$NUMERO="";
$INTERFACCIA="";
$INET="";
$INET6="";
foreach $row (@CONTENT) {
if ($row =~ /^\d\:/) {
$row =~ /^(\d+)\:/;
$NUMERO =$1;
$row =~ /^\d+\:\s(.+)\:/;
$INTERFACCIA= $1;
# print "NUMERO=$NUMERO INTERFACCIA=$INTERFACCIA\n";
$INET="";
$INET6="";
} elsif ($row =~ /^\s+inet\s/) {
$row =~ /inet\s(\S+)\s/;
$INET=$1;
# print "INET=$INET\n";
} elsif ($row =~ /^\s+inet6\s/) {
$row =~ /inet6\s(\S+)\s/;
$INET6=$1;
# print "INET6=$INET6\n";
print "$NUMERO $INTERFACCIA $INET $INET6\n";
}
}
exit(0);