VM Post Provision Steps

Steps to do after provisioning a VM to enable connectivity to the internet and assign an IP address

--OLD OS RELEASES--

Edit the following file:
/etc/sysconfig/network-scripts/ifcfg-ens192

vi /etc/sysconfig/network-scripts/ifcfg-ens192
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static #Changed from dhcp to static or none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens192
UUID=590dc84a-35ac-40bd-a3d9-0e62950e5018
DEVICE=ens192
ONBOOT=yes #Changed from no to yes
IPADDR=172.16.1.17 #Add IP address
NETMASK=255.255.255.0 #Add netmask
GATEWAY=172.16.1.254 #Add gateway
DNS1=8.8.8.8 #Add DNS entry 1 (max 3)
DNS2=8.8.8.4 # Add DNS entry 2
[root@slr-app-server network-scripts]#

Restart network:
systemctl restart network

Set the hostname of the server:
hostnamectl set-hostname slr-app-server

Check ping connectivity:
ping 8.8.8.8

Reboot the server to confirm that post-provisioning steps were a success.


--NEW OS RELEASES--

Newer OS releases use nmcli to configure network connectivity.

[root@localhost network-scripts]# nmcli device status
DEVICE  TYPE      STATE      CONNECTION
ens34   ethernet  connected  ens34
lo      loopback  connected (externally) lo

[root@localhost network-scripts]# nmcli connection show
NAME   UUID                                  TYPE      DEVICE
ens34  7f5bb589-3c95-39a4-8721-2729f7ff4ed7   ethernet  ens34
lo     7f3309af-7136-4973-957a-a671b6df90eb   loopback  lo

[root@localhost network-scripts]# nmcli connection modify ens34 \
  ipv4.addresses 192.10.100.63 \
  ipv4.gateway 192.10.100.1 \
  ipv4.dns "8.8.8.8 8.8.8.4" \
  ipv4.method manual
  
[root@localhost network-scripts]# nmcli connection down ens34

[root@localhost network-scripts]# nmcli connection up ens34

Set a new hostname to the server.

hostnamectl set-hostname <new-hostname>

Comments

Popular posts from this blog

Installing Oracle Database 19c on Linux 8 (OL8) Server

Oracle GoldenGate Real-Time Replication (Unidirectional)

Installing WebLogic 12.2.1 on Oracle Linux 8 Server