Protected: High Availability.

This content is password protected. To view it please enter your password below:



Attach a disk/DVD to VM in KVM Host



Attach DVD/Disk attached to KVM host. Just change the source dev to match what was assigned to your usb when it was plugged in.
Create a xml file as below.

<disk type=’block’ device=’disk’>
<driver name=’qemu’ type=’raw’ cache=’none’/>
<source dev=’/dev/sr0’/>
<target dev=’vdc’ bus=’virtio’/>

<disk type=’block’ device=’disk’>
<driver name=’qemu’ type=’raw’/>
<source dev=’/dev/sdb’/>
<target dev=’sdb’ bus=’scsi’/>

Then execute the command.

virsh attach-device vmserverID /path/to/disk/usb.xml.

Also try xml with the below format.

<hostdev mode ‘subsystem’ type=’usb’>


<vendor id=’0x03f0’/>

<product id=’0x4217’/>



Where vendor ID and product ID could be obtained from the below command.


Bus 002 Device 018: ID 03f0:4217 Hewlett-Packard EWS CM1015

Application Upgrade

Upgrade applications in CentOS.

PHP && MySQL installation or upgrade.

CentOS/RHEL 7.x:

rpm -Uvh
rpm -Uvh
CentOS/RHEL 6.x:

rpm -Uvh
rpm -Uvh

CentOS/RHEL 5.x:

rpm -Uvh
rpm -Uvh

Now, remove all the old php packages installed and update with new php packages.

Note:- yum install php55w-mysql.x86_64  — This is required for integration of PHP with MySQL


Ref url:-



How to use two Python Versions.

Default python version is ‘2.6.6’ in CentOS – 6 and this cannot be uninstalled as this is required for ‘yum’ and other utilities to work. It is possibe to install alternate Python version.

yum install -y centos-release-SCL
yum install -y python27

/usr/local/bin/python -V –>This will show new version of Python.

/usr/bin/python -V –>This will show old version of Python.
How to install Python 2.7.6 on CentOS 6.3.

yum groupinstall “Development tools”
yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel
yum install sqlite-devel

cd /opt
wget –no-check-certificate
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure –prefix=/usr/local
make && make altinstall
Ref url:-




AutoProtect kernel module failed to enable.

Packages to be installed.
*kernel-devel-$(uname –r)
*kernel-headers-$(uname –r)

#locate ap-kernelmodule.tar.gz
#tar -xf ap-kernelmodule.tar.gz
#cd ap-kernelmodule
#cd bin.ira
#mv * /opt/Symantec/autoprotect/
#/etc/init.d/autoprotect restart
#/etc/init.d/rtvscand restart
#/opt/Symantec/symantec_antivirus/sav info -a




Symantec installation error.

Issue:- Installation requires 32bits glibc library. Please install it and try again.

soln:-yum install glibc.i686 libgcc.i686 libX11.i686



How to copy files with progress bar.

Use ‘pv’ utility.

How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command



Iiptables and firewalld


Provide  Dynamic management of firewall. See below some examples.

firewall-cmd –zone=public –add-port=80/tcp        //Open  port 80
firewall-cmd –zone=public –add-port=80/tcp –permanent           //To make policy permanent
firewall-cmd –zone=public –add-forward-port=port=80:proto=tcp:toport=8080        //Redirect port 80 to 8080
firewall-cmd –permanent –zone=public –add-forward-port=port=80:proto=tcp:toport=8080   //To make policy permanent

firewall-cmd  --zone=public --add-rich-rule="rule family="ipv4" source address="" port protocol="tcp" port="4567" accept" --permanent //OPen service from particular IP
firewall-cmd –reload //Reload firewall-cmd
iptables-save | grep ” //Verify


More details, refer url:-



IPtable – Allow connection from single IP.

iptables -I INPUT -s <IP> -m state –state NEW,RELATED,ESTABLISHED -j ACCEPT
iptables -I OUTPUT -o eth0 -m state –state NEW,RELATED,ESTABLISHED -j ACCEPT
iptables -P INPUT DROP
iptables -P OUTPUT DROP

Refer below url for connection states