Virtualization Terminology

DataCenter  Its a logical entity defining a set or resources.these set of resources include collection of number of clusters of Virtual meachines ,  Network and Sotrage. The datacenter is highest level of containment of all these resources ( physical and logical )  managed in virtual environment

Storage Its a abstracted view of the physical storage assigned to a data center.It is either iSCSI, or Fiber Channel, or NFS

Cluster set of physical hosts that are treated as a resource pool.Hosts in a cluster share the same  network infrastructure and the same storage. When in a cluster virtual meachines can move  from host to host

Redhat Virutulization KVM Faq's and commands

Min configuration 6GB disk space, 2GB RAM
Recommended   6GB+ Guest OS size , 2GB + Ram required for Guest OS

Check Intel® VT virtualization extensions are enabled .

xm dmesg | grep VMX

example output

(XEN) VMXON is done
(XEN) VMXON is done


VMXON in the output tells that it is on.

Check AMD-V architectures

xm dmesg | grep SVM

example output

(XEN) AMD SVM Extension is enabled for cpu 0
(XEN) AMD SVM Extension is enabled for cpu 1


Installing Redhat Virtulization with yum
----------------------------------------------------------
install "xen" and "kernel-xen" packages

# yum install xen kernel-xen
# yum install virt-manager libvirt libvirt-python libvirt-python python-virtinst

Installing guest with virt-install
---------------------------------------------
# virt-install --name fedora9 --ram 512 --file=/var/lib/xen/images/fedora9.img \
 --file-size=3 --vnc --cdrom=/path=to/fedora9.iso

Giving location of ISO file

virt-install --name nare-Cmd-Ubuntu --ram 512 --file=/var/ns-ubuntu.img   --file-size=8  --cdrom /home/kvm/ubuntu-9.04-desktop-i386.iso 


# virt-install -n rhel5PV -r 500 -f /var/lib/xen/images/rhel5PV.dsk -s 3 --vnc -p

-l\ftp://10.1.1.1/trees/RHEL5-B2-Server-i386/

sudo virsh reboot rhel5PV


--vnc opens a GUI window installation

creating guests with virt-manager
-------------------------------------------------
$ sudo virt-manager &








Note : Use default location for Guest  which is "/var/lib/xen/images/. "
          if you choose different location make sure it is added to your SELinux policy and  relabeled before you  continue with the installation

Creating XML configuration for installed VM

virsh dumpxml NS-test-ubuntu> naresh.xml
Cat naresh.xml will give show the xml file
 
After creating xml file of a VM 
 
virsh --connect qemu:///system
to get connected to virsh prompt and then define the Virtual machine. 
virsh # define /var/lib/libvirt/images/naresh.xml
 
after defining the VM we can issue commands like
 
 
virsh # shutdown NS-test-ubuntuDomain NS-test-ubuntu is being shutdown
 
 
virsh # start NS-test-ubuntuDomain NS-test-ubuntu started
 
 
virsh # list
 Id Name                 State
----------------------------------
  1 storage              running
  8 NS-test-ubuntu       running 
 
nice link for virtulization with KVM on ubuntu-9.10

Why symbolic links can be created across filesystem boundaries ?

Symbolic links use pathname to establish a link and not the inode number.

Path names are also unique making it possible for link creation

ls -l  /home/user1/file1 /tmp/file2

check the inode of both "file1" and "file2" by using the command


ls -i /home/user1/file1
ls -i /tmp/file2


we can find different inode number for both these files.

Disable Root user to login SSH service step by step

1) Log-in as Root
2) Edit /etc/ssh/sshd_config

    There is a parameter

  PermitRootLogin=Yes
 change it to

  PermitRootLogin=No 

3) restart the sshd service and make sure its turned on

    service sshd restart        or 
    /etc/init.d/sshd restart
   
    chkconfig sshd on

Linux Network troubleshooting step by step

Hi after working for 3 years in M3-consulting i have been looking for a job change. I am looking for a job
in Data Centers where i can gain knowledge and also get maximum exposure. I have got calls from IBM,TCS,Oracle and  Kanak, Hexagrid in Hyderabad  in one of the interview they asked me how can you  troubleshoot a network.

Here we go into the topic.

1- First check that your interface (Network adapter ) is enabled or not using:         ifconfig

2- To make sure there is no internal problem.
     ping to the loop back address  ping 127.0.0.1
   if there is no response  service network restart if same repeats check network settings again.

3- check cable problem from ethtool eth0 
         if everything is fine then last line will show
 
                Link detected: yes
 
    
     if link is not detected plug it or change the cable according to need and problem
 
4-check the gateway settings in 
 
/etc/network    and
 /etc/sysconfig/network-scripts/ifcfg-eth0
 
And check DNS settings in
 
 /etc/resolv.conf 
 
system-config-network 
netstat
route 
service iptables stop

( only disable the firewall for testing and dont forget to turn it on)

check boot messages if eth card is detected at boot time or not

cat /var/log/dmesg | grep -i eth0

or

dmesg | grep -i eth0

to check table of network interfaces

netstat -i


for more advanced troubleshooting

lspci | less

or
lspci | grep ethernet

to check all PCI buses and devices connected to them

These are enough to troubleshoot if still problem persist try installing drivers , check kernel related problems , check is there any need to recompile the kernel etc


Difference between Various Shells in Linux/Unix



                                     sh   csh  ksh  bash tcsh zsh  rc   es 
 
Job control                          N    Y    Y    Y    Y    Y    N    N
Aliases                              N    Y    Y    Y    Y    Y    N    N
Shell functions                      Y(1) N    Y    Y    N    Y    Y    Y
"Sensible" Input/Output redirection  Y    N    Y    Y    N    Y    Y    Y
Directory stack                      N    Y    Y    Y    Y    Y    F    F
Command history                      N    Y    Y    Y    Y    Y    L    L
Command line editing                 N    N    Y    Y    Y    Y    L    L
Vi Command line editing              N    N    Y    Y    Y(3) Y    L    L
Emacs Command line editing           N    N    Y    Y    Y    Y    L    L
Rebindable Command line editing      N    N    N    Y    Y    Y    L    L
User name look up                    N    Y    Y    Y    Y    Y    L    L
Login/Logout watching                N    N    N    N    Y    Y    F    F
Filename completion                  N    Y(1) Y    Y    Y    Y    L    L
Username completion                  N    Y(2) Y    Y    Y    Y    L    L
Hostname completion                  N    Y(2) Y    Y    Y    Y    L    L
History completion                   N    N    N    Y    Y    Y    L    L
Fully programmable Completion        N    N    N    N    Y    Y    N    N
Mh Mailbox completion                N    N    N    N(4) N(6) N(6) N    N
Co Processes                         N    N    Y    N    N    Y    N    N
Builtin artithmetic evaluation       N    Y    Y    Y    Y    Y    N    N
Can follow symbolic links invisibly  N    N    Y    Y    Y    Y    N    N
Periodic command execution           N    N    N    N    Y    Y    N    N
Custom Prompt (easily)               N    N    Y    Y    Y    Y    Y    Y
Sun Keyboard Hack                    N    N    N    N    N    Y    N    N
Spelling Correction                  N    N    N    N    Y    Y    N    N
Process Substitution                 N    N    N    Y(2) N    Y    Y    Y
Underlying Syntax                    sh   csh  sh   sh   csh  sh   rc   rc
Freely Available                     N    N    N(5) Y    Y    Y    Y    Y
Checks Mailbox                       N    Y    Y    Y    Y    Y    F    F
Tty Sanity Checking                  N    N    N    N    Y    Y    N    N
Can cope with large argument lists   Y    N    Y    Y    Y    Y    Y    Y
Has non-interactive startup file     N    Y    Y(7) Y(7) Y    Y    N    N
Has non-login startup file           N    Y    Y(7) Y    Y    Y    N    N
Can avoid user startup files         N    Y    N    Y    N    Y    Y    Y
Can specify startup file             N    N    Y    Y    N    N    N    N
Low level command redefinition       N    N    N    N    N    N    N    Y
Has anonymous functions              N    N    N    N    N    N    Y    Y
List Variables                       N    Y    Y    N    Y    Y    Y    Y
Full signal trap handling            Y    N    Y    Y    N    Y    Y    Y
File no clobber ability              N    Y    Y    Y    Y    Y    N    F
Local variables                      N    N    Y    Y    N    Y    Y    Y
Lexically scoped variables           N    N    N    N    N    N    N    Y
Exceptions                           N    N    N    N    N    N    N    Y

Key to the table above.

Y Feature can be done using this shell.

N Feature is not present in the shell.

F Feature can only be done by using the shells function
mechanism.

L The readline library must be linked into the shell to enable
this Feature.

Notes to the table above

1. This feature was not in the orginal version, but has since become
almost standard.
2. This feature is fairly new and so is often not found on many
versions of the shell, it is gradually making its way into
standard distribution.
3. The Vi emulation of this shell is thought by many to be
incomplete.
4. This feature is not standard but unoffical patches exist to
perform this.
5. A version called 'pdksh' is freely available, but does not have
the full functionality of the AT&T version.
6. This can be done via the shells programmable completion mechanism.
7. Only by specifing a file via the ENV environment variable.

Source of this article