Wednesday, 17 August 2016

Configuring IP address in Centos 7

To configure the IP address in centos first find the interface using the command from the command line interface in centos

[root@localhost ~]# nmcli d
DEVICE  TYPE      STATE         CONNECTION
eno1    ethernet  connected     eno1
eno2    ethernet  disconnected  --
lo      loopback  unmanaged     --

You can also use the ip addr command to see the ip address of the interface

\\[root@localhost ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever

Now to configure the ip address from the CLI you need to edit the file using the vi editor
The file name will end with the interface identifier

for example for eno1 the file name will be ifcfg-eno1.

The directory where you will find the file is  /etc/sysconfig/network-scripts
now edit the file using the vi editor

fill the paramater for static configuration as below

TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno1
UUID=973e193a-1da9-444f-ac9d-927c065ad9f3
DEVICE=eno1
ONBOOT=yes
IPADDR=10.9.60.128
NETMASK=255.255.255.0
GATEWAY=10.9.60.254
DNS1=10.9.60.20
DNS2=10.9.60.21


Once that is done

Restart the network service using the command systemctl restart network 

You can also use the  /etc/sysconfig/network to configure the domain and dns etc as follows

HOSTNAME=Hostname
 DNS1=4.4.4.4
DNS2=8.8.8.8
SEARCH=doamin.com



To see the status and IP address of the  interface the command is ip addr

To restart network service command is service network restart 

In centos 6 the command to check interface is ifconfig  

In case of any issue check the  journalctl -xn 

IP link status

ip link show
dmesg | grep eth


Shutdown command is 
systemctl poweroff
shutdown now
shutdown -P now
shutdown -H now
systemctl shutdown 


Reference:
http://www.ducea.com/2006/08/07/how-to-change-the-hostname-of-a-linux-system/
http://www.itzgeek.com/how-tos/linux/centos-how-tos/change-hostname-in-centos-7-rhel-7.html

Cronjob:
https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/

Disable crontab
crontab -e then comment out each line you don't want to run with #.

Tuesday, 16 August 2016

Creating Bootable USB drive using Rufus

To create a bootable pen drive for installing ESXi through USB.

Download the Rufus utility

http://rufus.akeo.ie/

Open the utility by doubleclicking on it .








Select the Device ( USB ) from the device selection button

Select the Partition Scheme ( MBR partition scheme for BIOS or UEFI )

After the above selection click the start button

Thursday, 11 August 2016

Running a 64 bit VM in a nested environment

Nested environment means a hypervisor inside a hyervisor

Esxi 6 has enabled a option to run VM in nested environment . In order to enable this feature you need to enable this setting under a CPU for the VM running a hypervisor in a nested environment.

Below is the path amd the option.

Login to vcenter
Then select the VM ,Right click  the Vm and selcet edit.

In the edit dialogue box that opened as a response ,Select the CPU and the option marked in the screenshot.





















This will enable the nested hypervisor to run any 64 bit VMs.

If you are using the  vcenter client ( c#) the follow the below option to do the same.

You’ll have to add the following setting manually.From the “VM Options” tab expand “Advanced- General” and click on the “Edit configuration…” button. Click “Add Row” and add the line vhv.enable = “TRUE”.


Plz rate this post if you found it useful