Virtualmin installing crashes when try to determine IP address

Sometime Virtualmin crashes during installation when trying to determine IP address of primary interface, especially when it run in a openvz container -error: Unable to determine IP address of primary interface. Please enter the name of your…..

Download Virtualmin installation file, give it execution right and launch it.

cd /tmp
wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
./install.sh
Install Virtualmin
Install Virtualmin

Sometime, depends of your server configuration, Virtualmin install crashes when try to determine IP address. Something like that:

Virtualmin installing crashes when try to determine IP address
Virtualmin installing crashes when try to determine IP address

Edit install.sh and find detect_ip () and comment next code

primaryaddr=`/sbin/ip -f inet -o -d addr show dev \`/sbin/ip ro ls | grep default | awk '{print $5}'\` | head -1 | awk '{print $4}' | cut -d"/" -f1`

Instead put

primaryaddr=`/sbin/ifconfig eth0|grep 'inet addr'|cut -d: -f2|cut -d" " -f1`
Edit Virtualmin installation file
Edit Virtualmin installation file

If you are in openvz container try (it’s the same with above code, I just change eth0 with venet0:0 )

primaryaddr=`/sbin/ifconfig venet0:0|grep 'inet addr'|cut -d: -f2|cut -d" " -f1`

Save and run again install.sh

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *