[Users] Default Gateway not set at boot in VM vz7

Dmitry Mishin dim at virtuozzo.com
Mon Sep 12 06:59:03 PDT 2016


Hello,

Please provide details how have you specified IP addresses for network
interfaces. Have you configured them for this VM, or configuration was
performed purely in the guest operating system?

Thank you,
Dmitry.

On 12/09/16 15:32, "users-bounces at openvz.org on behalf of Jehan Procaccia"
<users-bounces at openvz.org on behalf of jehan.procaccia at tem-tsp.eu> wrote:

>Hello,
>
>I created a centos7 VM  on an openvz 7 host :
>
># cat /etc/redhat-release
>Virtuozzo Linux release 7.2
>
>inside the VM I did set a default gateway
># cat /etc/sysconfig/network
>GATEWAY=192.168.5.1
>
>(set it also in /etc/sysconfig/network-scripts/ifcg-eth0)
>
>But after the VM boots, there is no default route at startup :-(
>
>
>bash-4.2# netstat -nr
>Kernel IP routing table
>Destination     Gateway         Genmask         Flags   MSS Window irtt
>Iface
>192.168.5.0    0.0.0.0         255.255.255.0   U         0 0          0
>eth0
>192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0
>virbr0
>
>if I set it manually it does work
>
>bash-4.2# route add default gw 192.168.5.1
>bash-4.2# netstat -nr
>Kernel IP routing table
>Destination     Gateway         Genmask         Flags   MSS Window irtt
>Iface
>0.0.0.0         192.168.5.1    0.0.0.0         UG        0 0          0
>eth0
>...
>
>  what could be wrong ?
>
>Regards .
>_______________________________________________
>Users mailing list
>Users at openvz.org
>https://lists.openvz.org/mailman/listinfo/users




More information about the Users mailing list