G
gnomeAware
Guest
Hello,
I deploy a new VM from a template on ESX 5.5. After I do my initial configuration something changes the BOOTPROTO in the ifcfg-eth1 configuration file from dhcp to static. Any ideas?
------------------------------------------------------------------
[root@ci-appliance-template-sk44 ~]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
===============================================================================================
[root@theTemplate network-scripts]# grep udev /var/log/messages | grep -i rename
Jun 17 11:12:13 ci-appliance-template-sk44 kernel: udev: renamed network interface eth0 to eth1
===============================================================================================
[root@ci-appliance-template-sk44 ~]# cd /etc/sysconfig/network-scripts/
===============================================================================================
[root@theTemplate network-scripts]# cat ifcfg-eth1
HWADDR=""
ONBOOT=yes
BOOTPROTO=static
PEERDNS=no
USERCTL=no
HWADDR=""
(Not sure why HWADDR is in there twice - this is the cfg file create by the OS)
===============================================================================================
[root@ci-appliance-template-sk44 network-scripts]# cat /opt/fusionVM/configureNetwork.sh
#!/bin/bash
ETH1_CONFIG=/etc/sysconfig/network-scripts/ifcfg-eth1
NETWORK_CONFIG=/etc/sysconfig/network
echo "DEVICE=eth1" > $ETH1_CONFIG
echo "BOOTPROTO=dhcp" >> $ETH1_CONFIG
echo "DHCP_HOSTNAME=$1" >> $ETH1_CONFIG
echo "HOSTNAME=$1" >> $ETH1_CONFIG
echo "IPV6INIT=no" >> $ETH1_CONFIG
echo "MTU=1500" >> $ETH1_CONFIG
echo "NM_CONTROLLED=no" >> $ETH1_CONFIG
echo "ONBOOT=yes" >> $ETH1_CONFIG
echo "TYPE=Ethernet" >> $ETH1_CONFIG
echo "NETWORKING=yes" > $NETWORK_CONFIG
echo "HOSTNAME=$1" >> $NETWORK_CONFIG
echo "NOZEROCONF=yes" >> $NETWORK_CONFIG
===============================================================================================
[root@ci-appliance-template-sk44 network-scripts]# /opt/fusionVM/configureNetwork.sh MantraSK44
===============================================================================================
[
root@ci-appliance-template-sk44 network-scripts]# reboot
===============================================================================================
[root@MantraSK44 ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:50:56:8A:35:26
inet addr:16.125.107.50 Bcast:16.125.111.255 Mask:255.255.248.0
inet6 addr: 2620:0:a07:e40b:250:56ff:fe8a:3526/64 Scope:Global
inet6 addr: fe80::250:56ff:fe8a:3526/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:330 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44075 (43.0 KiB) TX bytes:9603 (9.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
===============================================================================================
[root@MantraSK44 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
DHCP_HOSTNAME=MantraSK44
HOSTNAME=MantraSK44
IPV6INIT=no
MTU=1500
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
PEERDNS=no
USERCTL=no
===============================================================================================
[root@MantraSK44 ~]# reboot
===============================================================================================
After this last reboot the server doesn't have an IP address because the cfg file has
BOOTPROTO=static
What changed the BOOTPROTO to 'static'
===============================================================================================
[root@MantraSK44 ~]# uname -a
Linux MantraSK44 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
New VM deployed from a template
===============================================================================================
I deploy a new VM from a template on ESX 5.5. After I do my initial configuration something changes the BOOTPROTO in the ifcfg-eth1 configuration file from dhcp to static. Any ideas?
------------------------------------------------------------------
[root@ci-appliance-template-sk44 ~]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
===============================================================================================
[root@theTemplate network-scripts]# grep udev /var/log/messages | grep -i rename
Jun 17 11:12:13 ci-appliance-template-sk44 kernel: udev: renamed network interface eth0 to eth1
===============================================================================================
[root@ci-appliance-template-sk44 ~]# cd /etc/sysconfig/network-scripts/
===============================================================================================
[root@theTemplate network-scripts]# cat ifcfg-eth1
HWADDR=""
ONBOOT=yes
BOOTPROTO=static
PEERDNS=no
USERCTL=no
HWADDR=""
(Not sure why HWADDR is in there twice - this is the cfg file create by the OS)
===============================================================================================
[root@ci-appliance-template-sk44 network-scripts]# cat /opt/fusionVM/configureNetwork.sh
#!/bin/bash
ETH1_CONFIG=/etc/sysconfig/network-scripts/ifcfg-eth1
NETWORK_CONFIG=/etc/sysconfig/network
echo "DEVICE=eth1" > $ETH1_CONFIG
echo "BOOTPROTO=dhcp" >> $ETH1_CONFIG
echo "DHCP_HOSTNAME=$1" >> $ETH1_CONFIG
echo "HOSTNAME=$1" >> $ETH1_CONFIG
echo "IPV6INIT=no" >> $ETH1_CONFIG
echo "MTU=1500" >> $ETH1_CONFIG
echo "NM_CONTROLLED=no" >> $ETH1_CONFIG
echo "ONBOOT=yes" >> $ETH1_CONFIG
echo "TYPE=Ethernet" >> $ETH1_CONFIG
echo "NETWORKING=yes" > $NETWORK_CONFIG
echo "HOSTNAME=$1" >> $NETWORK_CONFIG
echo "NOZEROCONF=yes" >> $NETWORK_CONFIG
===============================================================================================
[root@ci-appliance-template-sk44 network-scripts]# /opt/fusionVM/configureNetwork.sh MantraSK44
===============================================================================================
[
root@ci-appliance-template-sk44 network-scripts]# reboot
===============================================================================================
[root@MantraSK44 ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:50:56:8A:35:26
inet addr:16.125.107.50 Bcast:16.125.111.255 Mask:255.255.248.0
inet6 addr: 2620:0:a07:e40b:250:56ff:fe8a:3526/64 Scope:Global
inet6 addr: fe80::250:56ff:fe8a:3526/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:330 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44075 (43.0 KiB) TX bytes:9603 (9.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
===============================================================================================
[root@MantraSK44 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
DHCP_HOSTNAME=MantraSK44
HOSTNAME=MantraSK44
IPV6INIT=no
MTU=1500
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
PEERDNS=no
USERCTL=no
===============================================================================================
[root@MantraSK44 ~]# reboot
===============================================================================================
After this last reboot the server doesn't have an IP address because the cfg file has
BOOTPROTO=static
What changed the BOOTPROTO to 'static'
===============================================================================================
[root@MantraSK44 ~]# uname -a
Linux MantraSK44 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
New VM deployed from a template
===============================================================================================