Posts

Showing posts from September, 2014

Create Redhat Enterprise Linux Template VM in VMware vCenter

You can create a RHEL template VM in your VMware ESXi environment in order to make new VM deployment easier and faster.

You fisrt need to create a normal VM and install your RHEL inside it. You can also install other applications that you may need to have them in all your new VM employments.

After You are done with your installation and configuration of the VM that suppose to be used as Template, we need to carry following task inside guest OS before proceed to convert it to a VMware Template.

1. Flag the system for reconfiguration:

# touch /.unconfigured 

2. Deactivate all the network cards of your VM: 

example for eth0:

# ifdown eth0

Remove the HWADDR entry from the ifcfg-eth* files:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

...
HWADDR=00:50:56:b7:0e:6c
...

and activate you network cards again:

# ifup eth0


3. You need to delete entries regarding the network cards from 70-persistent-net.rules file as well:


# vi /etc/udev/rules.d/70-persistent-net.rules

...
# PCI device 0x15ad:0x07b0 (vmxnet3)
S…

Change a Linux hostname boot persistent

Q: How to change your linux box hostname after you have installed your OS:

A: You can change your hostname temporarily by hostname command.

Getting current hostname:
# hostname
example.domain.com

Change it to desired name:
# hostname test2

# hostname
test2

But if it is not boot persistant and after reboot it goes back to previous hostname. To make it boot persistent we need to change it in the network config file: 
# vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=test2

And after reboot we have the new hostname permanently.