Monday, October 25, 2010

Table of contents

Thursday, October 7, 2010

SSH Connection with Putty

How to enable SSH login for a root user in VMware ESX

How to work with VMware snapshots using the GUI

VMWare Interview Questions & Tips

  1. VMWare Kernel is a Proprietary Kenral and is not based on any of the UNIX operating systems, it's a kernel developed by VMWare Company. 
  2. The VMKernel can't boot it by itself, so that it takes the help of the 3rd party operating system. In VMWare case the kernel is booted by RedHat Linux operating system which is known as service console. 
  3. The service console is developed based up on Redhat Linux Operating system, it is used to manage the VMKernel 
  4. To restart webaccess service on vmware service vmware-webaccess restart – this will restart apache tomcat app 
  5. To restart ssh service on vmware service sshd restart 
  6. To restart host agent(vmware-hostd) on vmware esx server service mgmt-vmware restart 
  7. Path for the struts-config.xml /usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/ 
  8. To start the scripted install the command is    esx ks=nfs:111.222.333.444:/data/KS.config ksdevice=eth0               location                                             device name 
  9. Virtual Network in Simple……………….        Virtual Nic(s) on Virtual Machine(s) ----->         Physical Nic on the ESX Server (Virtual Switch - 56 Ports)  ----->            Physical Switch Port              Should be trunked with all the VLANS to which the VM's need access  All the ESX servers should be configured with Same number of Physical Nics (vSwitches) and Connectivity also should be same, So that vMotion succeeds All the Virtual Machines are connected to one vSwitch with Different VLANS, this means the Physical Nic(vSwitch) needs to be trunked with the same VLANS on the Physical Switch Port 
  10. What are the three port groups present in ESX server networking  1. Virtual Machine Port Group - Used for Virtual Machine Network   2. Service Console Port Group - Used for Service Console Communications   3. VMKernel Port Group - Used for VMotion, iSCSI, NFS Communications 
  11. What is the use of a Port Group?     The port group segregates the type of communication. 
  12. What are the type of communications which requires an IP address for sure ?        Service Console and VMKernel (VMotion and iSCSI), these communications does not happen without an ip address (Whether it is a single or dedicated) 
  13. In the ESX Server licensing features VMotion License is showing as Not used, why?    Even though the license box is selected, it shows as "License Not Used" until, you enable the VMotion option for specific vSwitch 
  14. How the Virtual Machine Port group communication works ?     All the vm's which are configured in VM Port Group are able to connect to the physical machines on the network. So this port group enables communication between vSwitch and Physical Switch to connect vm's to Physical Machine's 
  15. What is a VLAN ?     A VLAN is a logical configuration on the switch port to segment the IP Traffic. For this to happen, the port must be trunked with the correct VLAN ID 
  16. Does the vSwitches support VLAN Tagging? Why?      Yes, The vSwitches support VLAN Tagging, otherwise if the virtual machines in an esx host are connected to different VLANS, we need to install a separate physical nic (vSwitch) for every VLAN. That is the reason vmware included the VLAN tagging for vSwitches. So every vSwitch supports upto 1016 ports, and BTW they can support 1016 VLANS if needed, but an ESX server doesn’t support that many VM’s. :)   
  17. What is Promiscuous Mode on vSwitch ? What happens if it sets to Accept?     If the promiscuous mode set to Accept, all the communication is visible to all the virtual machines, in other words all the packets are sent to all the ports on vSwitch     If the promiscuous mode set to Reject, the packets are sent to inteded port, so that the intended virtual machine was able to see the communication. 
  18. What is MAC address Changes ? What happens if it is set to Accept ?When we create a virtual machine the configuration wizard generates a MAC address for that machine, you can see it in the .vmx (VM Config) file. If it doesn't matches with the MAC address in the OS this setting does not allow incoming traffic to the VM. So by setting Reject Option both MAC addresses will be remains same, and the incoming traffic will be allowed to the VM. 
  19. What is Forged Transmits ? What happens if it is set to Accept ?  When we create a virtual machine the configuration wizard generates a MAC address for that machine, you can see it in the .vmx (VM Config) file. If it doesn't matches with the MAC address in the OS this setting does not allow outgoing traffic from the VM. So by setting Reject Option both MAC addresses will be remains same, and the outgoing traffic will be allowed from the VM. 
  20. What are the core services of VC ?  VM provisioning , Task Scheduling and Event Logging 
  21. Can we do vMotion between two datacenters ? If possible how it will be? Yes we can do vMotion between two datacenters, but the mandatory requirement is the VM should be powered off. 
  22. What is VC agent? and what service it is corresponded to? What are the minimum req's for VC agent installation ?  VC agent is an agent installed on ESX server which enables communication between VC and ESX server.The daemon  associated with it is called vmware-hostd , and the service which corresponds to it is called as mgmt-vmware, in the event of VC agent failure just restart the service by typing the following command at the service console          " service mgmt-vmware restart "VC agent installed on the ESX server when we add it to the VC, so at the time of installtion if you are getting an error like " VC Agent service failed to install ", check the /Opt size whether it is sufficient or not 
  23. How can you edit VI Client Settings and VC Server Settings ? Click Edit Menu on VC and Select Client Settings to change VI settings Click Administration Menu on VC and Select VC Management Server Configuration to Change VC Settings 
  24. What are the files that make a Virtual Machine  ?     .vmx - Virtual Machine Configuration File     .nvram - Virtual Machine BIOS     .vmdk - Virtual Machine Disk file     .vswp - Virtual Machine Swap File     .vmsd - Virtual MAchine Snapshot Database     .vmsn - Virtual Machine Snapshot file     .vmss - Virtual Machine Suspended State file     .vmware.log - Current Log File     .vmware-#.log - Old Log file 
  25. What are the devices that can be added while the virtual Machine running In VI 3.5 we can add Hard Disk and NIC's while the machine running. In vSphere 4.0 we can add Memory and Processor along with HDD and NIC's while the machine running 
  26. How to set the time delay for BIOS screen for a Virtual Machine? Right Click on VM, select edit settings, choose options tab and select boot option, set the delay how much you want. 
  27. What is a template ? We can convert a VM into Template, and it cannot be powered on once its changed to template. This is used to quick provisioning of VM's. 
  28. What to do to customize the windows virtual machine clone,? copy the sysprep files to Virtual center directory on the server, so that the wizard will take the advantage of it. 
  29. What to do to customize the linux/unix virtual machine clone,? VC itself includes the customization tools, as these operating systems are available as open source. 
  30. Does cloning from template happens between two datacenters ? Yes.. it can, if the template in one datacenter, we can deploy the vm from that template in another datacenter without any problem. 
  31. What are the common issues with snapshots? What stops from taking a snapshot and how to fix it ? If you configure the VM with Mapped LUN's, then the snapshot failed. If it is mapped as virtual then we can take a snapshot of it. If you configure the VM with Mapped LUN's as physical, you need to remove it to take a snapshot. 
  32. What are the settings that are taken into to consideration when we initiate a snapshot ? Virtual Machine Configuration (What hardware is attached to it) State of the Virtual Machine Hard Disk file ( To revert back if needed) State of the Virtual Machine Memory (if it is powered on) 
  33. What are the requirements for Converting a Physical machine to VM ? An agent needs to be installed on the Physical machine VI client needs to be installed with Converter Plug-in  A server to import/export virtual machines 
  34. What is VMWare consolidated backup ? It is a backup framework, that supports 3rd party utilities to take backups of ESX servers and Virtual Machines. Its not a backup service. 
  35. To open the guided consolidation tool, what are the user requirements ? The user must be member of administrator, The user should have "Logon as service" privileges - To give a user these privileges, open local sec policy, select Logon as service policy and add the user the user should have read access to AD to send queries

Wednesday, October 6, 2010

commands useful for an admin

These are some of the commands useful for an admin

date --- this is only option available to set time/date
hwclock --- to sync the time to software clock/hardware clock
Esxcfg-vswitch -- virtual switch configuration ., be clear abt port groups
esxcfg-vswif -- service console in the esx server
esxcfg-vmnics-- for setting the speed/mode of operating
esxtop --- to see the performance of esx server
esxupdate -l query -- to see the packages are installed on esx
/etc/sysconfig/network --- to see the network configuration
/etc/passwd -- to see the user accounts
/etc/ssh -- for ssh login properties



Few ESX Commands ** Important Log and their location
===========================================
vmkping - use vmkernel to ping a device
esxcfg-vswif for configuring network interface
vm-support to run diagnostic commands
esxupdate -l query query patches installed on ESX Server
esxcfg-rescan vmhba1 to rescan HBA’s
ps -ef | grep hostd To check hostd is running
esxcfg-mpath -l to list path details
________________________________________
Important Log and their locations

VMKernel Logs = > /var/log/vmware/
VIClient logs = > /var/log/vmware/hostd.log
Virtual Center interaction logs = > /var/log/vmware/vpx/vpxa-*.log
VMWare Patch activity logs = > /var/log/vmware/esxupdate.log
[root@esx2007a config]# cat vmware-sites
FULLTIME_SITES_TID 00000061
+ 1:8042,8042,8043 esx2007e vmware #FT_Agent_Port=8045
+ 2:8042,8042,8043 esx2007d vmware
+ 3:8042,8042,8043 esx2007b vmware
+ 4:8042,8042,8043 esx2007a vmware
+ 5:8042,8042,8043 esx2007c vmware
License server logs = > %ALLUSERSPROFILE%\Application Data\VMware\VMware License Server\lmgrd.log

commands for N/W config via console

here is few commands for N/W config via console

esxcfg-vswitch -a vSwitch0
esxcfg-vswitch -L vmnic0 vSwitch0
esxcfg-vswitch -A "Service Console" vSwitch0
esxcfg-vswitch -v "vlanno" -P "Service Console" vSwitch0
esxcfg-vswif -a vswif0 -i X.x.x.x -n x.x.x.x -p "Service Console"
esxcfg-vswitch -l
esxcfg-vswif -l
esxcfg-nics -l
esxcfg-vmknic -l

how to check the network traffic ?

u can use esxtop to know the traffic on nic card

how to check portgroup / vlan settings in DMZ network in ESX env?

Specify the DMZ vlan id to the port group to move the machines to DMZ

how to check portgroup in esx?

u can list all the port groups using
esxcfg-vswitch -l
every vlan is having vlan id In vmware terminology ...
port group = vlan .
But 1 or more port group may belong to same vlan
this is not possible in normal switch

What is difference B/w vmotion & virtual center manager

Virtual center is a management console for all ESX and VM's.
vMotion is a application that we can do using management console - virtual center.

How to find the disk type for VM

to find if the disk is
RDM disk
Thick disk
Thin disk
But we do not have option to find if its a Eagerzeroedthick disk.
Above disks can be found by:
Right click on the VM -> Edit settings -> right side under "disk provisioning" look for the option "Type" to see if its thick, thin disk or RDM (physical) disk.

How many type of disk in VM ?( falt, thin .etc)

There are 5 types of Disk in ESX.
1. Zeroedthick
2. Eagerzeroedthick
3. Thin
4. Thick
5. RDM
An other type of disk is used in workstation which is 2GB sparse disk.
Zeroedthick (default) .
Space required for the virtual disk is allocated during creation. Any data remaining on the physical device is not erased during creation, but will be zeroed out at a later time during virtual machine read and write operations.
Eagerzeroedthick
Space required for the virtual disk is allocated at creation time. Unlike with the zeroedthick format, the data remaining on the physical device is zeroed out during creation. Disks in this format might take much longer to create than other types of disks.
Thick
Space required for the virtual disk is allocated during creation. This type
of formatting doesn't zero out any old data that might be present on this allocated space.
Thin
Thin-provisioned virtual disk. Unlike with the thick format, space required
for the virtual disk is not allocated during creation, but is supplied, zeroed out, on demand at a later time.
RDM
Direct access to storage LUN. Other disks are called as Virtual disk and RDM is called as Physical disk. Unlike others the information is not stored on datastore or in a File, but stored on the LUN directly. This is presented using NPIV to the VM's

How Is ESX Server Different from GSX Server?

ESX Server is designed for up to 16 processor departmental and enterprise servers, and runs its virtualization layer natively on hardware. VMware GSX Server is designed for up to four processor workgroup and departmental servers. It runs as an application on top of a host operating system.

Full Form of ESX

  ESX -- Enterprise Server X
  GSX -- Group Server X

FAQS

1) How many VM create in per HOST
Depend upon the fact that we are using HA or not .
Look at the below link
http://www.vmware.com/pdf/vsphere4/r40/vsp_40_config_max.pdf
2) What are features in Vsphere compare with ESX3.5
Hot swap
VAPP
Profiles
Storage Vmotion
FT
etc.......
> Online Storage VMontion is possible in Vsphere.

ESX Versions

ESX comes in two main versions
  1) ESX
      > Managed with a built-in service console or the vSphere command-line Interface(VCLI)
      > Available as an installable DVD boot image
  2) ESXi
      > Managed with a BIOS-like direct console or vCLI
      > A high-securty,32MB footprint
      > ESXi Installable - Available as an installable CD-ROM boot image
      > ESXi Embedded - ESX image preinstalled as firmware or burned onto an external USB key by the            hardware vendor

ESX/ESXi Features

  > ESX/ESXi can use standad and distributed virtul switches,nic teaming, and VLANs
  > can use the VMware vStorage VMFS(Virtual Machine File System) for storing virtual machines.
  > can be managed by vmware vCenter Server
  > Can take advanage of various VMware vSphere features.such as VMware VMotion
  > Can be accessed using the VMware vSphere client

ESX / ESXi : Virtualization Platform

ESX / ESXi : Virtualization Platform
  > ESX and ESXi are bare-metal,efficient and reliable hypervisors running directly on servers.
  > ESX and ESXi abstract CPU,Memory,Storage,and networking multiple virtual machines

Tuesday, October 5, 2010

VSphere Components

  • VMWare ESX/ESXi
  • VMWare VCenter Server
  • VMware VSphere Client
  • VMWare VSphere Web access
  • VMWare vStorage VMFS
  • VMWare Virtual SMP.

Why Use virtual Machines ?

Physical Machines :
           > Difficult to move or copy
           > Bound to a specific set of hardware components
           > Often has short life cycle
           > Requires personal contact to upgrade hardware
Virtual Machines :
          > Easy to move and copy
                * Encapsulate into files
                * Independent of physical hardware
          > Easy to manage
                * Isolated from other virtual machines running on the same physical hardware
                * Insulated from physical hardware changes

What is Virtual Machine

From user's perspective, it is a software platform that,like a physical computer,runs an operating system and applications.
from the hypervisor's perspective, it is a discrete set of file.these are the main file :
                 > Configuration Files
                 > Virtual harddisk files
                 > NVRAM Settings file
                 > Log file

What is Virtualization

*  Virtualization is technology that transforms hardware into software.
*  Virtualization allows you to run multiple Operating Systems as virtual Machines on a single computer
*  Each copy of an operating system is installed into a virtual machine.
*  Virtualization is not simulation and emulation

Monday, October 4, 2010

Teaming,Cloning,Snapshot and Record-Play

Teaming :
  • Group of Virtual Machines start & Stop at a time.
  • Teaming available only in the workstation.
  • The extension of teaming configuration file is .vmtm
  • When we start the team then it tackes some delay between the vms this delay is called as delay time.
  • By default delay time is 10sec.
Cloning :

  • Creating same image
  • there are 2 types of clones 1) Linked Clone 2 ) Full Clone
  • Linked clone is nothing but it won't copy the original files but it creates a linked file. 
  • the disadvantage is If we remove the original VM then the second VM is won't work.
  • the advantage with the linked clone is it occupies less space and time.

VM Files and Extesions

1 ) .vmdk (Dot vmdk) - vm harddisk files,guest os,softwares
2 ) .vmx  (dot vmx) - vm configuration files such as vmware,location,memory,hard disk information
3 ) .log (dot log) - Log Files
4 ) .vmsd (dot vmsd) - Snapshot descriptions
5 ) .nvram (dot nvram) - non volatile RAM
6 ) .vmtm (dot vmtm)- Teaming Extension.

Saturday, October 2, 2010

FAQ's

 1) How many iSCSI targets will ESX support 8 for 3.01
 Ans: 64 for 3.5
2) What is Vmotion
 Ans: Ability to move running vm from one host to another3) What is the Maximum Host Failure allowed in a cluster
 Ans:

Thursday, September 23, 2010

VMWare WorkStation

  • VMWare Workstation is a desktop product.
  • We can not install VmWare Workstation and VMWare Server on the same system.
  • Default interfaces for VMWare workstation are vmnet1 and vmnet8.
  • when we create vm we have two option
    1. Typical
    2. Custom
  • when we select custom then it asks what type of network it is

    1. Bridging
    2. NAT
    3. Host Only
    4. Custom
    Bridging : Every thing is communicated through default local area network.  

    NAT : which uses vmnet8 interface.

    • NAT is default.
    Host Only : which uses vmnet1 interface.
    Custom: Manually set the interfaces.
  • in virtual machine 2 types of hard disks
    1. Thin Provisional
    2. Thick Provisional
    Thin Provisional 
    • Hard disk dynamically allocated.
    Thick Provisional 
    • Reserved Memory.

VMWare Introduction

Advantages of VMWare
  • We can run multiple OS simultaneously. where as in normal PC we can install upto 4 OS but we can not run simultaneously.
  • Reduce H/W,Maintenance and Cost. In the real time we need to maintain number of physical servers instead of that one physical server with VMWare Product is enough to run multiple OS.
  • we can use idle resources not wasted.like CPU utilization,memory etc.
  • Flexibility of working with OS.where as in our PC we can not minimize or maximize OS like windows (Example like notepad we can open notepad,minimize it and close it exactly same).
  • VMWare is a virtualization  Technology software.
Virtual Environment Vendors and Products.

  • Microsoft     -  VPC ,Virtual Sever- these products also called as Hyper-V
  • XEN            -  XEN Server,XEN Citrix
  • VMWARE   - Host Based Products,Bare Model(This is also called as Hyper Visor)
Host Based Products

  • VMWare Workstation
  • VMWare Server (Previously called as GSX )
  • VMWare Player
  • VMWare Converter
Bare Model or Hyper Visor
  • ESX Server 4.0 also called as VSphere
Host Based Architecture





Bare Model Architecture