Вы находитесь на странице: 1из 62

VMWare interview questions and answers -SvMotion

1.What is SvMotion?
Migration of a virtual machine files and disks from one datastore to another with Zero
downtime.
2. What are the use cases of SvMotion ?

Migrating from Old storage to new storage systems or migrating to different vendor
storage without downtime to VM's.
Performing Scheduled activity like storage upgrades on the source Lun.
Converting VM disk type from Thick to Thin and Thin to Thick.
Migrating the critical virtual machines to high performance storage arrays to improve
performance of virtual Machine.

3. What are Pre-requisites for the SvMotion to Work?

ESX host in which virtual machine is running should have access to source and
destination storage.
ESX host should have configured with the license for svMotion

4. What are the Limitations of SvMotion?

Virtual machines with snapshots cannot be migrated using Storage vMotion.


Virtual machine with virtual compatibility RDM can be migrated with svMotion.If you
convert the mapping file, a new virtual disk is created and the contents of the mapped
LUN are copied to this disk.
For Physical compatibility RDM, only mapping file can be relocated.
Virtual Machines cannot be migrated while the VMware tools installation tools is in
progress.
Virtual Machine should be in powered off state if you want to migrate the VM
simultaneously to different host and storage.

5. Steps involved in VMWare SvMotion ?

svMotion copies all the files expect virtual machine disk and create the directory as
same the Virtual Machine name on the destination storage.
It uses Changed Block tracking to track the virtual machine disk. The change block
tracking knows which region disk includes data. This data will be stored in bitmap and
reside either in memory or in a file.
Pre-copies Virtual machine disk and swap file will start from the source to destination
datastore as the first iteration. once it is completed, It only transfers the region which
were modified or written after the first iteration.
ESX performs fast suspend and resume of the virtual Machine. The final changed
regions will be copied to the destination before the virtual Machine is resumed on the
destination datastore.
Virtual Machine will continue running on the destination datastore and source file and
disk will be deleted.

VMWare Interview Questions and answers -vMotion


1.What is vMotion?
Live migration of a virtual machine from one ESX server to another with Zero downtime .
VMs disk files stay where they are (on shared storage)
2. What are the use cases of vMotion ?

Balance the load on ESX servers (DRS


Save power by shutting down ESX using DPM
Perform patching and maintenance on ESX server (Update Manager or HW
maintenance

3. What are Pre-requisites for the vMotion to Work?

ESX host must be licensed for VMotion


ESX servers must be configured with vMotion Enabled VMkernel Ports.
ESX servers must have compatible CPU's for the vMotion to work
ESX servers should have Shared storage (FB, iSCSI or NFS) and VM's should be
stored on that storage.
ESX servers should have exact similar network & network names

4. What are the Limitations of vMotion?

Virtual machines configured with the Raw Device Mapping(RDM) for clustering
features using vMotion
VM cannot be connected to a CD-ROM or floppy drive that is using an ISO or
floppy image stored on a drive that is local to the host server. The device should be
disconnected before initiating the vMotion.
Virtual Machine cannot be migrated with VMotion unless the destination swapfile
location is the same as the source swapfile location. As a best practice, Place the virtual
machine swap files with the virtual machine configuration file.
Virtual Machine affinity must not be set (aka, bound to physical CPUs).

5. Steps involved in VMWare vMotion ?

A request has been made that VM-1 should be migrated (or "VMotioned") from ESX A
to ESX B.
VM-1's memory is pre-copied from ESX A to ESX B while ongoing changes are
written to a memory bitmap on ESX A.
VM-1 is quiesced on ESX A and VM-1's memory bitmap is copied to ESX B.
VM-1 is started on ESX B and all access to VM-1 is now directed to the copy running
on ESX B.
The rest of VM-1's memory is copied from ESX A all the while memory is being read
and written from VM-1 on ESX A when applications attempt to access that memory on
VM-1 on ESX B.
If the migration is successful, VM-1 is unregistered on ESX A.

VMWare interview questions and answers -Networking


What is Service Console?
The service console is developed based up on Redhat Linux Operating system, it is used to
manage the VMKernel
What are the basic commands to troubleshoot connectivity between vSphere
Client /vCenter to ESX server?
service mgmt-vmware restart (restarts host agent(vmware-hostd) on vmware esx server)
service vmware-vpxa restrat (restarts Vcenter agent service)
service network restart (restarts management networks on ESX)
What is vCenter Agent?

VC agent is an agent installed on ESX server which enables communication between VC and
ESX server. This Agent will be installed on ESX/ESXi will be done when you try to add the
ESx host in Vcenter.
What is the command used to restart SSH, NTP & Vmware Web access?
Service sshd restart
Service ntpd restrat
Service vmware-webaccess restart
What are the types of Ports groups in ESX/ESXi?
There are 3 types of port groups in ESX
1.Service console port group
2.VMkernel Port group
3. Virtual machine port group
There are only 2 types of port group in ESXi
1. Vmkernel Port group
2.Virtual Machine Port group
What is VMKernel ?
VMWare Kernel is a Proprietary kernel of vmwareand is not based on any of the flavors of
Linux operating systems, .VMkernel requires an operating system to boot and manage the
kernel. A service console is being provided when VMWare kernel is booted. Only service
console is based up on Redhat Linux OS not VMkernel.
What is the use of Service Console port ?
Service console port group required to manage the ESX server and it acts as the management
network for the ESX. Vcenter/Vsphere Client uses the service console IP's to communicate
with the ESX server.
What is the use of VMKernel Port ?
Vmkernel port is used by ESX/ESXi for vmotion, ISCSI & NFS communications. ESXi uses
Vmkernel as the management network since it don't have service console built with it.
What is the use of Virtual Machine Port Group?

Virtual Machine port group is used by Virtual machine communication.


How Virtual Machine communicates to another servers in Network ?
All the Virtual Machines which are configured in VM Port Group are able to connect to the
other machines on the network. So this port group enables communication between vSwitch
and Physical Switch by the use of uplink (Physical NIC) associated with the port group.
What is the default number of ports configured with the Virtual Switch?
When the time of Virtual switch created, Vswitch is created with 56 ports by default. We can
extend the no of ports by editing the vswitch properties.

What are the different types of Partitions in ESX server?


/ -root
Swap
/var
/Var/core
/opt
/home
/tmp
What are the security options available for ESX vswitch?
Promiscuous Mode - Reject
MAC Address changes - Accept
Forged Transmits - Accept

What is Promiscuous Mode ?

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. It can be useful
when you are running virtual machines with network sniffers to capture packet in that network.

What is MAC Address changes?


All the virtual machines nics are provide with the MAC address at the time of creation and it is
stored in .VMX file. If the packet doesn't match with the MAC address as same as in the
.VMX file , it does not allow incoming traffic to the VM by setting this option as reject.
If it is set as Accept,ESX accepts requests to change the effective MAC address to other than
the MAC address save din the .VMX file.

What is Forged Transmits ?


Which is same as the Mac Address changes setting but it worked for the outgoing traffic but
the MAC address changes setting is for incoming traffic.
What is a VLAN ?
A VLAN is the Virtual LAN which is used to broke down the Broadcast traffic into many
logical groups. Basically, one physical switch comprise of one broadcast domain. VLAN used
to separate the one broadcast domain into many small pieces to separate the networks within
the broadcast domain.
What are the types of VLAN tagging in Vsphere?
There are 3 types of VLAN tagging available in Vsphere.
1.Virtual Switch Tagging (VST)
2.External Switch Tagging (EST)
3.Virtual Guest Tagging (VGT)
What is VST , EST & VGT?
Please refer my blog post on VST , EST & VGT on the link
http://www.vmwarearena.com/search/label/VLAN%20Tagging/
What are the Traffic Shaping policies available in the Vswitch?

Traffic shaping policies are disabled by default. There are 3 different traffic shaping policy
setting
Average Bandwidth
Peak Bandwidth
Burst Size

Average Bandwidth is defined in KBPS


Peak bandwidth is defined in KBPS
Burst Size is defined in Kilobytes
What are the Load balancing policies available in vswitch?
Route based on the originating virtual switch port ID
Route based on source MAC hash
Route based on IP hash

Route based on the originating virtual switch port ID - Chooses an uplink based on the
virtual port where the traffic entered the virtual switch. The traffic will be always send with
that same uplink until that particular uplink is failed and failed over to another NIC.
Route based on source MAC hash - Choose an uplink based on a hash of the source Ethernet
MAC address.The traffic will be always send with that same uplink until that particular uplink
is failed and failed over to another NIC.
Route based on IP hash - Choose an uplink based on a hash of the source and destination IP

addresses of each packet.

What are the types for Network Failover Detection settings?


Link Status only
Beacon Probing
Link Status only - Relies solely on the link status provided by the network adapter. This detects
failures, such as cable pulls and physical switch power failures, but it cannot detect
configuration errors, such as a physical switch port being blocked by spanning tree or
misconfigured to the wrong VLAN or cable pulls on the other side of a physical switch.
Beacon Probing - Sends out and listens for beacon probes Ethernet broadcast frames sent
by physical adapters to detect upstream network connection failures on all physical Ethernet
adapters in the team. In addition to link status, to determine link failure. This detects many of
the failures which are not detected by Link Status.

What is the command to check the IP address along with the detailed network cards
assigned to the esx server?
Ifconfig -a
Output appears like this
===================================================================
=====
lo

Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9365 errors:0 dropped:0 overruns:0 frame:0
TX packets:9365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8127714 (7.7 MiB) TX bytes:8127714 (7.7 MiB)

vmnic0 Link encap:Ethernet HWaddr 00:0C:29:85:0D:76


UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100772 errors:0 dropped:0 overruns:0 frame:0
TX packets:5103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35475848 (33.8 MiB) TX bytes:402120 (392.6 KiB)
Interrupt:145

vmnic1 Link encap:Ethernet HWaddr 00:0C:29:85:0D:80


UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105895 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35894203 (34.2 MiB) TX bytes:0 (0.0 b)
Interrupt:129
vmnic2 Link encap:Ethernet HWaddr 00:0C:29:85:0D:8A
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105908 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35895750 (34.2 MiB) TX bytes:0 (0.0 b)
Interrupt:137
vmnic3 Link encap:Ethernet HWaddr 00:0C:29:85:0D:94
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105690 errors:0 dropped:0 overruns:0 frame:0
TX packets:228 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35883279 (34.2 MiB) TX bytes:13680 (13.3 KiB)
Interrupt:145
vswif0 Link encap:Ethernet HWaddr 00:50:56:4D:69:D1
inet addr:192.168.0.75 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14893 errors:0 dropped:0 overruns:0 frame:0
TX packets:2575 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:966513 (943.8 KiB) TX bytes:230028 (224.6 KiB)
vswif1 Link encap:Ethernet HWaddr 00:50:56:4F:45:B1
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:11042 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:717158 (700.3 KiB) TX bytes:1260 (1.2 KiB)
===================================================================
======
You can use "ip addr" command also to view the ip information
===================================================================

======
[root@ESXTEST1 etc]# ip addr
1: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: vmnic0: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:76 brd ff:ff:ff:ff:ff:ff
3: vmnic1: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:80 brd ff:ff:ff:ff:ff:ff
4: vmnic2: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:8a brd ff:ff:ff:ff:ff:ff
5: vmnic3: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:94 brd ff:ff:ff:ff:ff:ff
6: vswif0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:4d:69:d1 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.75/24 brd 192.168.0.255 scope global vswif0
7: vswif1: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:4f:45:b1 brd ff:ff:ff:ff:ff:ff
9: vswif2: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:43:92:be brd ff:ff:ff:ff:ff:ff
inet 192.168.0.96/24 brd 192.168.0.255 scope global vswif2
===================================================================
======
what is the command to check the ESX vswitch details, port group and its ip address?
Esxcfg-vswitch -l
Outuput will appear like this:
===================================================================
======
[root@ESXTEST1 ~]# esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0
32
4
32
1500 vmnic0
PortGroup Name
VLAN ID Used Ports Uplinks
Service Console 0
1
vmnic0
VMkernel
0
1
vmnic0
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch1
64
3
64
1500 vmnic2,vmnic1
PortGroup Name
VM-10.0.0 subnet

VLAN ID Used Ports Uplinks


0
0
vmnic2,vmnic1

VM-192.168.0 subnet 0

vmnic2,vmnic1

Switch Name Num Ports Used Ports Configured Ports MTU


vSwitch2
64
4
64
1500 vmnic3

Uplinks

PortGroup Name
VLAN ID Used Ports Uplinks
Service Console 2 0
1
vmnic3
Vmotion
0
1
vmnic3
===================================================================
======
From the above output,
we come to know that we have 3 virtual switches named vSwitch0,vSwitch1 and vSwitch2.
4 uplinks (physical nics in our esx server) Vmnic0,vmnic1,vmnic2,vmnic3.
vswitch0 constains 2 port group (Service Console & VMKernel), vSwitch1 contains 2 virtual
machine port group (VM-10.0.0 subnet & VM-192.168.0 subnet) and Vswitch2 contains 2 port
group (Service Console 2 & Vmotion) port group.
What is command to get the information about Service console ports and its IP address
assigned to it?
esxcfg-vswif -l
Output will appear like this:
===================================================================
======
[root@ESXTEST1 ~]# esxcfg-vswif -l
Name Port Group/DVPort IP Family IP Address
Netmask
Broadcast
Enabled TYPE
vswif0 Service Console IPv4
192.168.0.75
255.255.255.0
192.168.0.255 true
STATIC
vswif1 Service Console 2 IPv4
192.168.0.78
255.255.255.0
192.168.0.255 false STATIC
===================================================================
======
what is the command to get the information about vmkernel ports and its ip address?
esxcfg-vmknic -l
Output will appear like this:
===================================================================
======
[root@ESXTEST1 ~]# esxcfg-vmknic -l
Interface Port Group/DVPort IP Family IP Address
Netmask
Broadcast
MAC Address
MTU TSO MSS Enabled Type

vmk0
VMkernel
IPv4
192.168.0.110
255.255.255.0
192.168.0.255 00:50:56:78:7e:73 1500 65535 true STATIC
vmk1
Vmotion
IPv4
192.168.0.77
255.255.255.0
192.168.0.255 00:50:56:76:42:df 1500 65535 true S
===================================================================
======
what is the command to get the information about physical nics installed on ESX server?
esxcfg-vmknic -l
Output will appear like this:
===================================================================
======
[root@ESXTEST1 sbin]# esxcfg-nics -l
Name PCI
Driver
Link Speed Duplex MAC Address
MTU Description
vmnic0 02:00.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:76 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
vmnic1 02:02.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:80 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
vmnic2 02:03.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:8a 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
vmnic3 02:04.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:94 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
===================================================================
=====
What is command to add the new virtual switch named (vswitch3) to our ESX server?
[root@ESXTEST1 sbin]# esxcfg-vswitch -a vswitch3
Now vswitch3 is created without any port group.
===================================================================
===
Switch Name Num Ports Used Ports Configured Ports MTU
vswitch3
64
1
64
1500

Uplinks

PortGroup Name
VLAN ID Used Ports Uplinks
===================================================================
=====
What is command to add the new port group named (mgmt)to vswitch (vswitch 3) ?

[root@ESXTEST1 sbin]# esxcfg-vswitch -A mgmt vswitch3


now port group "mgmt" is added.
===================================================================
======
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vswitch3
64
1
64
1500
PortGroup Name
VLAN ID Used Ports Uplinks
mgmt
0
0
===================================================================
======

How to add the service console port (vswif2) to our newly created port group "mgmt"
with the ip addr 192.168.0.79 ?
[root@ESXTEST1 sbin]# esxcfg-vswif -a vswif2 -i 192.168.0.79 -n 255.255.255.0 -p "mgmt"
where i is the ip address, n is subnet mask p is to mentione the port group name
===================================================================
======
vswif2 mgmt
IPv4
192.168.0.79
255.255.255.0
192.168.0.255 true
STATIC
===================================================================
======
How to add the vmkernal port (vmk2) to our newly created port group "mgmt" with the
ip addr 192.168.0.83?
[root@ESXTEST1 sbin]# esxcfg-vmknic -a -i 192.168.0.83 -n 255.255.255.0 -p "mgmt"
===================================================================
======
vmk2
mgmt
IPv4
192.168.0.83
255.255.255.0 192.168.0.255
00:50:56:7b:bd:36 1500 65535 true STATIC
===================================================================
======
How to change the ip addresss of the existing service console "vswif2"?
nano /etc/sysconfig/network-scripts/ifcfg-vswif2.

Edit the file with your new id address " 192.168.0.255" then save and exit.
======================================================
DEVICE=vswif2
HOTPLUG=yes
MACADDR=00:50:56:43:92:be
ONBOOT=yes
PORTGROUP=mgmt
BOOTPROTO=static
BROADCAST=192.168.0.255
DHCPV6C=no
IPADDR=192.168.0.96
IPV6INIT=no
IPV6_AUTOCONF=no
NETMASK=255.255.255.0
======================================================
restart the network service for ip change to take effect:
[root@ESXTEST1 sysconfig]# service network restart
Shutting down interface vswif0:
[ OK ]
Shutting down interface vswif2:
[ OK ]
Shutting down loopback interface:
[ OK ]
Bringing up loopback interface:
[ OK ]
Bringing up interface vswif0:
[ OK ]
Another way is to connect to the console of the ESX server and at the shell prompt type in
:esxcfg-vswif -d vswif2
This will delete the existing vswif0 and it will give the message about "nothing to flush".
then type the below command
esxcfg-vswif -a vswif2 -p mgmt -i 192.168.0.97 -n 255.255.255.0
===================================================================
======
[root@ESXTEST1 etc]# esxcfg-vswif -d vswif2
Nothing to flush.
[root@ESXTEST1 etc]# esxcfg-vswif -a vswif2 -p mgmt -i 192.168.0.97 -n 255.255.255.0
[2011-09-17 19:35:46 'Vnic' warning] Generated New MAC address, 00:50:56:43:92:be for
vswif2
Nothing to flush.
===================================================================
======
How to change the ESX host name and default gateway?

edit the below file:


nano /etc/sysconfig/network
======================================
NETWORKING=yes
HOSTNAME=ESXTEST1.lab.com
GATEWAY=192.168.0.20
GATEWAYDEV=vswif0
IPV6_AUTOCONF=no
NETWORKING_IPV6=no
======================================
restart the network service for ip change to take effect:
[root@ESXTEST1 sysconfig]# service network restart
How to edit the ESX host file ?
nano /etc/hosts
Edit the file to make entry to your host file.
==========================================
127.0.0.1
localhost
::1
localhost
192.168.0.75 ESXTEST1.lab.com ESXTEST1
==========================================
How to edit the DNS entry of your ESX server?
nano /etc/resolv.conf
Edit the file to make changes or to make new entry of dns for your ESX server
========================
nameserver 192.168.0.20
search lab.com
=======================
what is the command to query the firewall ports ?
esxcfg-firewall - q

How to open the port in firewall (port no 8877, tcp, incoming , name: test3 ?
esxcfg-firewall -o 8877,tcp,in,test3

VMWare interview questions and answers - HA (High Availability)


What is VMware HA?
As per VMware Definition,
VMware High Availability (HA) provides easy to use, cost effective high availability for
applications running in virtual machines. In the event of server failure, affected virtual
machines are automatically restarted on other production servers with spare capacity
What is AAM in HA?
AAM is the Legato automated availability management. Prior to vSphere 4.1, VMware's HA is
actually re engineered to work with VM's with the help of Legato's Automated Availability
Manager (AAM) software. VMware's vCenter agent (vpxa) interfaces with the VMware HA
agent which acts as an intermediary to the AAM software. From vSphere 5.0, it uses an agent
called FDM (Fault Domain Manager).
What are pre-requites for HA to work?
1.Shared storage for the VMs running in HA cluster
2.Essentials plus, standard, Advanced, Enterprise and Enterprise Plus Licensing
3.Create VMHA enabled Cluster
4.Management network redundancy to avoid frequent isolation response in case of temporary
network issues (preferred not a requirement)
What is maximum number of primary HA hosts in vSphere 4.1?
Maximum number of primary HA host is 5. VMware HA cluster chooses the first 5 hosts that
joins the cluster as primary nodes and all others hosts are automatically selected as secondary
nodes.
How to see the list of Primary nodes in HA cluster?
View the log file named "aam_config_util_listnodes.log" under /var/log/vmware/aam using the
below command
cat /var/log/vmware/aam/aam_config_util_listnodes.log

What is the command to restart /Start/Stop HA agent in the ESX host?


service vmware-aam restart
service vmware-aam stop
service vmware-aam start
Where to located HA related logs in case of troubleshooting?
/Var/log/vmware/aam
What the basic troubleshooting steps in case of HA agent install failed on hosts in HA
cluster?
Below steps are are taken from my blog posts Troubleshooting HA
1. Check for some network issues
2. Check the DNS is configured properly
3. Check the vmware HA agent status in ESX host by using below commands
service vmware-aam status
4. Check the networks are properly configured and named exactly as other hosts in the cluster.
otherwise, you will get the below errors while installing or reconfiguring HA agent.
5. Check HA related ports are open in firewall to allow for the communication
Incoming port: TCP/UDP 8042-8045
Outgoing port: TCP/UDP 2050-2250
6. First try to restart /stop/start the vmware HA agent on the affected host using the below
commands. In addition u can also try to restart vpxa and management agent in the Host.
service vmware-aam restart
service vmware-aam stop

service vmware-aam start


7. Right Click the affected host and click on "Reconfigure for VMWare HA" to re-install the
HA agent that particular host.
8. Remove the affected host from the cluster. Removing ESX host from the cluster will not be
allowed untill that host is put into maintenance mode.
9.Alternative solution for 3 step is, Goto cluster settings and uncheck the vmware HA in to
turnoff the HA in that cluster and re-enable the vmware HA to get the agent installed.
10. For further troubleshooting , review the HA logs under /Var/log/vmware/aam directory.
What is the maximum number of hosts per HA cluster?
Maximum number of hosts in the HA cluster is 32
What is Host Isolation?
VMware HA has a mechanism to detect a host is isolated from rest of hosts in the cluster.
When the ESX host loses its ability to exchange heartbeat via management network between
the other hosts in the HA cluster, that ESX host will be considered as a Isolated.
How Host Isolation is detected?
In HA cluster, ESX hosts uses heartbeats to communicate among other hosts in the cluster.By
default, Heartbeat will be sent every 1 second.
If a ESX host in the cluster didn't received heartbeat for for 13 seconds from any other hosts in
the cluster, The host considered it as isolated and host will ping the configured isolation
address(default gateway by default). If the ping fails, VMware HA will execute the Host
isolation response
What are the different types isolation response available in HA?

Power off All the VMs are powered off , when the HA detects that the network isolation
occurs
Shut down All VMs running on that host are shut down with the help of VMware Tools,
when the HA detects that the network isolation occurs.If the shutdown via VMWare tools not
happened within 5 minutes, VM's power off operation will be executed. This behavior can be
changed with the help of HA advanced options. Please refer my Post on HA Advanced
configuration
Leave powered on The VM's state remain powered on or remain unchanged, when the HA
detects that the network isolation occurs.
How to add additional isolation address for redundancy?
By default, VMWare HA use to ping default gateway as the isolation address if it stops
receiving heartbeat.We can add an additional values in case if we are using redundant service
console both belongs to different subnet.Let's say we can add the default gateway of SC1 as
first value and gateway of SC2 as the additional one using the below value
1. Right Click your HA cluster
2. Goto to advanced options of HA
3. Add the line "das.isolationaddress1 = 192.168.0.1"
4. Add the line "das.isolationaddress2 = 192.168.1.1" as the additional isolation address
To know more about the Advanced HA Options
What is HA Admission control?
As per "VMware Availability Guide",
VCenter Server uses admission control to ensure that sufficient resources are available in a
cluster to provide failover protection and to ensure that virtual machine resource reservations

are respected.
What are the 2 types of settings available for admission control?

Enable: Do not power on VMs that violate availability constraints


Disable: Power on VMs that violate availability constraints
What are the different types of Admission control policy available with VMware HA?
There are 3 different types of Admission control policy available.

Host failures cluster tolerates


Percentage of cluster resources reserved as fail over spare capacity
Specify a fail over host
How the Host Failures cluster tolerates admission control policy works?

Select the maximum number of host failures that you can afford for or to guarantee fail over.

Prior vSphere 4.1, Minimum is 1 and the maximum is 4.


In the Host Failures cluster tolerates admission control policy , we can define the specific
number of hosts that can fail in the cluster and also it ensures that the sufficient resources
remain to fail over all the virtual machines from that failed hosts to the other hosts in cluster.
VMware High Availability(HA) uses a mechanism called slots to calculate both the available
and required resources in the cluster for a failing over virtual machines from a failed host to
other hosts in the cluster.
What is SLOT?
As per VMWare's Definition,
"A slot is a logical representation of the memory and CPU resources that satisfy the
requirements for any powered-on virtual machine in the cluster."
If you have configured reservations at VM level, It influence the HA slot calculation. Highest
memory reservation and highest CPU reservation of the VM in your cluster determines the slot
size for the cluster.
How the HA Slots are Calculated?
I have written a post about how the HA slots are calculated.
How to Check the HA Slot information from vSphere Client?
Click on Cluster Summary Tab and Click on "Advanced Runtime Info" to see the the detailed
HA slots information.

What is use of Host Monitoring status in HA cluster?

Let's take an example, you are performing network maintenance activity on your switches
which connects your one of th ESX host in HA cluster.
what will happen if the switch connected to the ESX host in HA cluster is down?
It will not receive heartbeat and also ping to the isolation address also failed. so, host will think
itself as isolated and HA will initiate the reboot of virtual machines on the host to other hosts in
the cluster. Why do you need this unwanted situation while performing scheduled maintenance
window.
To avoid the above situation when performing scheduled activity which may cause ESX host to
isolate, remove the check box in " Enable Host Monitoring" until you are done with the
network maintenance activity.
How to Manually define the HA Slot size?
By default, HA slot size is determined by the Virtual machine Highest CPU and memory
reservation. If no reservation is specified at the VM level, default slot size of 256 MHZ for
CPU and 0 MB + memory overhead for RAM will be taken as slot size. We can control the HA
slot size manually by using the following values.
There are 4 options we can configure at HA advanced options related to slot size
das.slotMemInMB - Maximum Bound value for HA memory slot size
das.slotCpuInMHz - Maximum Bound value for HA CPU slot Size
das.vmMemoryMinMB - Minimum Bound value for HA memory slot size
das.vmCpuMinMHz - Minimum Bound value for HA CPU slot size
For More HA related Advanced options, Please refer my blog post
How the "Percentage of cluster resources reserved as failover spare capacity" admission
control policy works?

In the Percentage of cluster resources reserved as failover spare capacity admission control
policy, We can define the specific percentage of total cluster resources are reserved for
failover.In contrast to the "Host Failures cluster tolerates admission control policy", It will not
use slots. Instead This policy calculates the in the way below
1.It calculates the Total resource requirement for all Powered-on Virtual Machines in the
cluster and also calculates the total resource available in host for virtual machines.
2.It calculates the current CPU and Memory Failover capacity for the capacity.
3.If the current CPU and Memory Failover capacity for the cluster < configured failover
capacity (ex 25 %)
4.Admission control will not allow to power on the virtual machine which violates the
availability constraints.
How the "Specify a failover host" admission control policy works?

In the Specify a failover host" admission control policy, We can define a specific host as a
dedicated failover host. When isolation response is detected, HA attempts to restart the virtual
machines on the specified failover host.In this Approach, dedicated failover hist will be sitting
idle without actively involving or not participating in DRS load balancing.DRS will not
migrate or power on placement of virtual machines on the defined failover host.
What is VM Monitoring status?
HA will usually monitors ESX hosts and reboot the virtual machine in the failed hosts in the
other host in the cluster in case of host isolation but i need the HA to monitors for Virtual
machine failures also. here the feature called VM monitoring status as part of HA settings.VM
monitoring restarts the virtual machine if the vmware tools heartbeat didn't received with the
specified time using Monitoring sensitivity.

Troubleshooting VMWare HA -Cannot complete the HA Configuration


What the basic troubleshooting steps in case of HA agent install failed on hosts in HA
cluster?
If you are facing any issues related to hosts in the HA cluster , I would recommend to follow
the below basic 10 troubleshooting steps. Most of the time, This will resolve the issues.
Error message will be similar to the below one

1. Check your environment, if any temporary network problem exists


2. Check the DNS is configured properly
3. Check the vmware HA agent status in ESX host by using below commands
service vmware-aam status

4. Check the ESX networks are properly configured and named exactly as other hosts in the
cluster.
otherwise, you will get the below errors while installing or reconfiguring HA
agent.

5. Check HA related ports are open in firewall to allow for the communication
Incoming port: TCP/UDP 8042-8045
Outgoing port: TCP/UDP 2050-2250
6. Try to restart /stop/start the vmware HA agent on the affected host using the below
commands.
In addition, u can also try to restart vpxa and management agent in the Host.
service vmware-aam restart
service vmware-aam stop
service vmware-aam start
7. Right Click the affected host and click on "Reconfigure for VMWare HA" to re-install the
HA agent that particular host.

VMWare HA Advanced Options


Hi, In this blog post, . I am going to cover some of the advanced options can be configured at
HA cluster level. Which are not available direct to edit from the cluster settings but can be
added as the value in the HA advanced options.
Isolation Response Time:By default, VMware HA has the isolation response timeout time is 15000 milliseconds Aka ,15
Seconds. Let's say I want to avoid the restart of Virtual machines in the HA cluster because of
temporary network fluctuation on my environment and i want to increase the isolation response
timeout to 60000 milliseconds ( 60 seconds). The bellow is the steps to configure the isolation
response time.
1. Right Click your HA cluster
2. Goto to advanced options of HA
3. Add the line "das.failuredetectiontime = 60000"

4. Click ok and isolation response time is now set to 60 seconds.

Additional Isolation Address: By default, VMWare HA use to ping default gateway as the isolation address if it stops
receiving heartbeat.We can add an additional values in case if we are using redundant service
console both belongs to different subnet.Let's say we can add the default gateway of SC1 as
first value and gateway of SC2 as the additional one using the below value
1. Right Click your HA cluster
2. Goto to advanced options of HA
3. Add the line "das.isolationaddress1 = 192.168.0.1"
4. Add the line "das.isolationaddress1 = 192.168.1.1" as the additional isolation address

Changing Default Isolation Address:By default, VMWare HA uses default gateway as the isolation address incase if its stop
receiving heartbeat. Let's take an example, In your organization, Firewall policy is blocking
the ICMP ping or your gateway address is not pingable. In that case, HA fells itself that host is
isolated. This default isolation address can be changed using the below value.

1. Right Click your HA cluster


2. Goto to advanced options of HA
3. Add the line "das.usedefaultisolationaddress = False" to disable the usage of default gateway
as isolation response address.

Configuring vMotion network to use for HA heartbeat usage:To configure the HA heartbeat to utilize the nic which is used for Vmotion network. By this
value configured, HA heartbeat communication will be send via the nic which is used for
vmotion communication.
1. Right Click your HA cluster
2. Goto to advanced options of HA
3. Add the line "das.allowVmotionNetworks = True"

Configuring retries for restart of Virtual Machines:When the ESX host is isolated and HA tries to restart the Virtual machine running on the
isolated ESX host to the non-isolated ESS host in the HA cluster. By default, The retry value is
5. You can reduce the value of reties by using the below value
1. Right Click your HA cluster

2. Goto to advanced options of HA


3. Add the line "das.maxvmrestartcount = 2" to set only 2 retry for the restart o the virtual
machines

Ignore the Network redundant warning:We all may be come across the warnings in our HA cluster that " No redundant network for the
management network incase if we don't have redundant service consoles. To vanish the
warnings to appear due to non-redundant service console in cluster, configure the below value
to TRUE.
1. Right Click your HA cluster
2. Goto to advanced options of HA
3. Add the line "das.bypassNetCompatCheck = TRUE " to vanish the warnings from the HA
Cluster.

Configuring Manual HA Slot Size:By default, HA slot size is determined by the Virtual machine Highest CPU and memory
reservation. If no reservation is specified at the VM level, default slot size of 256 MHZ for
CPU and 0 MB + memory overhead for ram will be taken as slot size. We can control the HA
slot size manually by using the following values.
There are 4 options we can configure at HA advanced options related to slot size

das.slotMemInMB - Maximum Bound value for HA memory slot size


das.slotCpuInMHz - Maximum Bound value for HA CPU slot Size
das.vmMemoryMinMB - Minimum Bound value for HA memory slot size
das.vmCpuMinMHz - Minimum Bound value for HA CPU slot size

Changing HA heartbeat interval:By default, HA heart beat interval is 1000 milliseconds i.e 1 seconds. primary HA node will
send heartbeat to other primary and secondary and secondary nodes will only send to primary
node every 1 seconds. this value can be changed using the following option.
1. Right Click your HA cluster
2. Goto to advanced options of HA
3

Add the line "das.failuredetectioninterval = 3000" for heart beat to occur every 3 seconds

Changing default VM shutdown timeout:By default, HA waits for 300 seconds for the VM to be shutdown if the isolation response of
the virtual machine is set as "shutdown" before it performs the virtual machine power off. this
value can be changed using the following values.
1. Right Click your HA cluster

2. Goto to advanced options of HA


3

Add the line "das.isolationShutdownTimeout = 500" to change it to 500 seconds

8. Remove the affected host from the cluster. Removing ESX host from the cluster will not be
allowed untill that host is put into maintenance mode.
9.Alternative solution for 8 step is, Goto cluster settings and uncheck the vmware HA to
turnoff the HA in that cluster and re-enable the vmware HA to get the agent installed from the

scratch.
10. For further troubleshooting , review the HA logs under /Var/log/vmware/aam directory.

VMware Host Profiles -Part 1


Host Profiles:
I am going to write a series of post to cover the Host Profiles in Depth. This is the part1 of
Host Profile series.
In Larger IT virtualized environment, it is very difficult to keep track of configuration changes
and also maintain consistent configuration across all ESX host.Configuring multiple host
manually will prone to human mistakes and also a time consuming process.
Host Profiles helps us to maintains consistent configuration across the datacenter by using
Host Profiles policies and also eliminates Manual host configuration/ Host Profile Policies
captures the blue print of well known configured ESX host in environment and it also acts a
reference host to configure other hosts in environment. These policies capture the blueprint of
a known, validated reference host configuration which is also called as "Golden Image". The
blue print contains the information about the networking, storage, security and other settings.
Use cases of Host Profiles:
Simplify Host configuration process across a large number of hosts by automating host
configuration of multiple hosts in a same exact way and reduce deployment challenges by
faster configuration time and also in more consistent way.
We can use Host profiles to monitor the host configuration deviations by running compliance
check against all the hosts in our environment with reference to the golden profile for auditing
purposes.
A host profile is composed of two parts:
Configuration details - Contains policies that tells how a hosts in the environment should be
configured with the specific configuration settings.
Compliance details - Contains a set of checks to ensure that the host is configured as
specified in the profile
How to Create Host Profiles:
Click on Host Profile icon from Home > Management > Host Profiles

Click on Create Profile

There are 2 options


1. Create Profile from existing host (configured reference host)
2.Import profile

Select the Host which you want it as golden image for your environment

Specify the Name and description for that profile

Click on finish to create the host Profile.

Host profile called "Golden Profile" is created.

Right Click on the created profile to edit or view the settings captured as part of this host
profile.

We can the see the list of configuration settings for the below items:

Memory Reservation Configuration (Service console memory reservation)


Storage configuration (NFS)
Networking Configuration
Date and Time Configuration (NTP settings)
Firewall Configuration
Security Configuration
Service Configuration
Advanced configuration information
User configuration
User Group Configuration
Authentication Configuration (AD Domain)

VMware Host Profile -Part 2


Configuration Policies in Host Profiles
In My previous post on Host profile, Host Profile- Part1 discussed about the overview of host
profile and how to create it. Let's take the detailed look at each configuration setting in this
post.
The below are the list of configuration settings captured as part of host profile information.
Memory Reservation Configuration (Service console memory reservation)
Storage configuration (NFS)
Networking Configuration
Date and Time Configuration (NTP settings)

Firewall Configuration
Security Configuration
Service Configuration
Advanced configuration information
User configuration
User Group Configuration
Authentication Configuration (AD Domain)
Let's look at each of the configurations policy items one by one.
Memory Reservation Configuration:
This setting captures the service console memory reservation settings of the reference ESX
host and this will not be captured in ESXI host.

There are 2 Options to edit these settings in host profile


1.Configure a fixed amount of memory for the service console
We can define the Service Console Memory Reservation size

2. User must explicitly choose the policy option


Apply Hos Profile wizard will prompt the user to enter the desired configuration values before
applying the host profile.Profile will not be applied until the required values are manually
provided by user.

Since ESXi host doesn't have a service console and Memory reservation Configuration for
ESXi host in the host profile will contain any captured information.
The Memory Reservation settings of the reference host in the host profile are abstracted from
the memory reservation configuration of the ESX host.Please refer the below snapshot.

Storage configuration
This setting captures the storage (only NFS) configuration of the reference host. It ensures that
NFS configuration of ESX hosts is consistent across the environment by applying this profile.

There are 2 Options to edit these settings in host profile


1.Create NFS datastore with fixed configuration
If we have our reference host configured NFS. This setting will display the NFS storage
configuration information or we can define it manually to apply to the host while remediation.

2. User must explicitly choose the policy option


Apply Hos Profile wizard will prompt the user to enter the desired configuration values before
applying the host profile.Profile will not be applied until the required values are manually
provided by user.

Compliance Details:
If you have unchecked the "Validate that NFS datastore exists with the following Properties" ,
This particular settings will not be validated as part of compliance check and will not report as
non-complaint when host is not configured with this settings.

The NFS storage settings of the reference host in the host profile are abstracted from the
storage configuration of the ESX host . Please refer the below snapshot.

Date and Time Configuration (NTP settings)


This setting captures the NTP servers and time zone settings of the reference host . It validates
that list of NTP servers and the configured Time Zone is set on the destination host.

There are 2 Options to edit these settings in host profile


1.Configure a fixed NTP configuration

We can manually define the time zone and NTP servers IP address for the ESX to sync the
time with.

2. User must explicitly choose the policy option


Apply Hos Profile wizard will prompt the user to enter the desired configuration values before
applying the host profile.Profile will not be applied until the required values are manually
provided by user.

The Date and Time configuration of the reference host in the host profile are abstracted from
the time configuration of the ESX host . Please refer the below snapshot.

Firewall Configuration
This setting captures the firewall configuration of ESX host and ESXi does not include a
firewall because it runs a limited set of well-known services.

Firewall settings contain the rule set configuration which contains the ports or services specific
firewall configuration. So that the destination host will be configured as exactly as same as the
reference host to maintain consistency among the host in your environment.

The firewall settings of the reference host in the host profile are abstracted from the Security
profile Configuration of the ESX host.

Configuring Storage I/O Control in vSphere 4.1


Storage I/O Control:Storage I/O control is new in vSphere 4.1. We can define the priority of the Virtual machines
based on the business needs by configuring rules and policies. Storage I/O control dynamically
allocates the available I/O resources to the virtual machines based on our defined rules, when
I/O congestion is occurred. Lot of performance issues in virtualization are caused by latency in
storage.
Requirements of Storage I/O Control:vSphere 4.1 or later
Only Fiber channel and ISCSI is supported and not NFS and RDM.
Datastores must be supported by single vCenter server.
Multiple extend datastores are not supported for SIOC.

How Storage I/O Control Works :-

Graphic thanks to VMware.com


The above diagram describes the difference between without & with Storage IO Control.
In the left side of diagram, There are 2 ESX servers which contains a shared LUN without
configured with the storage I/O control. 3 Virtual machines are running in total of 2 hosts. In
the ESX server 1, 2 VMs (VM A with 1500 shares & VM B with 500 Shares) and in ESX
server 2, 1 VM (VM C with 500 shares). If you noticed the VM B & VM C both are configured
with the share value of 500 but VM B is utilizing 12% in the storage array Queue but VM C
with the same share value of 500 utilizing 50 % of Storage Array Queue. This is imbalanced
and we don't have any control over these.
In Right Side of Diagram, There are 2 ESX servers which contains a shared LUN configured
with the storage I/O control. 3 Virtual machines are running in total of 2 hosts. In the ESX
server 1, 2 VMs (VM A with 1500 shares & VM B with 500 Shares) and in ESX server 2, 1
VM (VM C with 500 shares). If you noticed both the VM B & VM C are configured with the
share value of 500 and utilizing the 20% in the storage array Queue unlike the above
imbalanced approach.each VM is given an appropriate allocation of disk resources in the
storage array.

How to enable SIOC in datastore


Right Click the Datastore in which you want to enable the SIOC and select properties

Check the Storage I/O Control Enabled check box to enable the Storage I/O Control for that
particular Datastore.

If you want to edit the Congestion Threshold, Click advanced and enter the Value like 10 ms.
Default value is 30 ms

Configure Shares in Virtual Machines in the above datastore:


To configure the shares and IOPs,Right-click on a Virtual Machine and edit settings.

Goto Resources Tab and select Disk. Select the share type (Low, Normal, High & Custom)
which you want to configure for the Virtual machine and click on OK.

Error 1067 unable to start the VMware Virtual center Server Service
Error 1067 unable to start the VMware Virtual center Server Service
I got a call that our Vcenter server is not working. and I felt ohh thats it....let me start the
Vcenter service. I noticed vcenter service was not started and i tried to start the service, it is
throwing the below error.
"Windows Could not start the VMware VirtualCenter service on local computer. Error 1067:
the process terminated unexpectedly"

I wont say the below is the standard to follow to troubleshoot the issue. It was the approach
which i used to resolve the above issue.
Troubleshooting Step 1:
My first place to troubleshoot the Vcenter service failure is "vpxd.log" on the below location

Windows 2003 - C:\Documents and Settings\All Users\Application Data\VMware\VMware


VirtualCenter\Logs
Windows 2008 - C:\ProgramData\VMware\VMware VirtualCenter\Logs
In VPXD logs, i found the below error
[2012-06-05 03:57:53.047 08104 error 'App'] Failed reading
C:\ProgramData\VMware\VMware VirtualCenter\vpxd.cfg. Line 33. class
Vmacore::Xml::XMLParseException(mismatched tag)
[ 2012-06-05 03:57:53.047 08104 error 'App'] [VpxdMain] Failed to init vmacore
From the above Log, I noticed the line telling me something about the cause for this issue.
Failed reading C:\ProgramData\VMware\VMware VirtualCenter\vpxd.cfg. Line 33. class
Vmacore::Xml::XMLParseException(mismatched tag)
There is a tag mismatched on the "vpxd.cfg" file. which is not allowing to start my vcenter
service.

Troubleshooting Step 2:
I have started my investigation into my Vcenter server configuration file "Vpxd.cfg" and the
error messge telling me that Line 33 is culprit so, I started targetting my line towards 30 to 35
in "vpxd.cfg" file.
===========================================================

==============================================================
First, it looks like the culprit is the below line.

Tried to start the service But no luck again failed and the error message in the vpxd log is
different this time
"the Duplicate loop error"
Troubleshhoting Step 3:
Again my target is Vcenter configuration file "Vpxd.cfg"
===========================================================

==============================================================
This time found the issue and the issue is because of the loop # and # appears twice in Vcenter
configuration file.Removed the extra loop and started the service. It started sucessfully and i
am safe.
The issue appeared because of the configuration file of vcenter was edited as part of standard
hardening but edited with the wrong format sometime before and my server was rebooted as
part of patching process.Configuration changes takes effect if you restart the Virtual center
service. After the reboot, My Vcenter server service was not started.

ESX Server Networks!!!! Networks!!!!! Networks!!!!!! in Command Line

Hey man!!!! wake up.... last friday i was struggled to change the ip address of my collegue's
lab ESX server service console. That struggle leads me to this post. thanks Anil.....
To check the IP address along with the detailed network cards assigned to the esx server:
Ifconfig -a
Output appears like this
===================================================================
=====
lo

Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9365 errors:0 dropped:0 overruns:0 frame:0
TX packets:9365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8127714 (7.7 MiB) TX bytes:8127714 (7.7 MiB)

vmnic0 Link encap:Ethernet HWaddr 00:0C:29:85:0D:76


UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100772 errors:0 dropped:0 overruns:0 frame:0
TX packets:5103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35475848 (33.8 MiB) TX bytes:402120 (392.6 KiB)
Interrupt:145
vmnic1 Link encap:Ethernet HWaddr 00:0C:29:85:0D:80
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105895 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35894203 (34.2 MiB) TX bytes:0 (0.0 b)
Interrupt:129
vmnic2 Link encap:Ethernet HWaddr 00:0C:29:85:0D:8A
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105908 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000

RX bytes:35895750 (34.2 MiB) TX bytes:0 (0.0 b)


Interrupt:137
vmnic3 Link encap:Ethernet HWaddr 00:0C:29:85:0D:94
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105690 errors:0 dropped:0 overruns:0 frame:0
TX packets:228 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35883279 (34.2 MiB) TX bytes:13680 (13.3 KiB)
Interrupt:145
vswif0 Link encap:Ethernet HWaddr 00:50:56:4D:69:D1
inet addr:192.168.0.75 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14893 errors:0 dropped:0 overruns:0 frame:0
TX packets:2575 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:966513 (943.8 KiB) TX bytes:230028 (224.6 KiB)
vswif1 Link encap:Ethernet HWaddr 00:50:56:4F:45:B1
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:11042 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:717158 (700.3 KiB) TX bytes:1260 (1.2 KiB)
===================================================================
======
You can use "ip addr" command also to view the ip information
===================================================================
======
[root@ESXTEST1 etc]# ip addr
1: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: vmnic0: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:76 brd ff:ff:ff:ff:ff:ff
3: vmnic1: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:80 brd ff:ff:ff:ff:ff:ff
4: vmnic2: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:8a brd ff:ff:ff:ff:ff:ff
5: vmnic3: mtu 1500 qdisc noop qlen 1000
link/ether 00:0c:29:85:0d:94 brd ff:ff:ff:ff:ff:ff

6: vswif0: mtu 1500 qdisc pfifo_fast qlen 1000


link/ether 00:50:56:4d:69:d1 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.75/24 brd 192.168.0.255 scope global vswif0
7: vswif1: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:4f:45:b1 brd ff:ff:ff:ff:ff:ff
9: vswif2: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:43:92:be brd ff:ff:ff:ff:ff:ff
inet 192.168.0.96/24 brd 192.168.0.255 scope global vswif2
===================================================================
======
2. To check the ESX vswitch details, port group and its ip address:
Esxcfg-vswitch -l
Outuput will appear like this:
===================================================================
======
[root@ESXTEST1 ~]# esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0
32
4
32
1500 vmnic0
PortGroup Name
VLAN ID Used Ports Uplinks
Service Console 0
1
vmnic0
VMkernel
0
1
vmnic0
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch1
64
3
64
1500 vmnic2,vmnic1
PortGroup Name
VLAN ID Used Ports Uplinks
VM-10.0.0 subnet 0
0
vmnic2,vmnic1
VM-192.168.0 subnet 0
0
vmnic2,vmnic1
Switch Name Num Ports Used Ports Configured Ports MTU
vSwitch2
64
4
64
1500 vmnic3

Uplinks

PortGroup Name
VLAN ID Used Ports Uplinks
Service Console 2 0
1
vmnic3
Vmotion
0
1
vmnic3
===================================================================
======
From the above output,
we come to know that we have 3 virtual switches named vSwitch0,vSwitch1 and vSwitch2.
4 uplinks (physical nics in our esx server) Vmnic0,vmnic1,vmnic2,vmnic3.
vswitch0 constains 2 port group (Service Console & VMKernel), vSwitch1 contains 2 virtual
machine port group (VM-10.0.0 subnet & VM-192.168.0 subnet) and Vswitch2 contains 2 port

group (Service Console 2 & Vmotion) port group.


3. To get the information about Service console ports and its ip address
esxcfg-vswif -l
Output will appear like this:
===================================================================
======
[root@ESXTEST1 ~]# esxcfg-vswif -l
Name Port Group/DVPort IP Family IP Address
Netmask
Broadcast
Enabled TYPE
vswif0 Service Console IPv4
192.168.0.75
255.255.255.0
192.168.0.255 true
STATIC
vswif1 Service Console 2 IPv4
192.168.0.78
255.255.255.0
192.168.0.255 false STATIC
===================================================================
======
4. To get the information about vmkernel ports and its ip address:
esxcfg-vmknic -l
Output will appear like this:
===================================================================
======
[root@ESXTEST1 ~]# esxcfg-vmknic -l
Interface Port Group/DVPort IP Family IP Address
Netmask
Broadcast
MAC Address
MTU TSO MSS Enabled Type
vmk0
VMkernel
IPv4
192.168.0.110
255.255.255.0
192.168.0.255 00:50:56:78:7e:73 1500 65535 true STATIC
vmk1
Vmotion
IPv4
192.168.0.77
255.255.255.0
192.168.0.255 00:50:56:76:42:df 1500 65535 true S
===================================================================
======
5. To get the information about physical nics installed on ESX server
esxcfg-vmknic -l
Output will appear like this:
===================================================================
======
[root@ESXTEST1 sbin]# esxcfg-nics -l
Name PCI
Driver
Link Speed Duplex MAC Address
MTU Description
vmnic0 02:00.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:76 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)

vmnic1 02:02.00 e1000


Up 1000Mbps Full 00:0c:29:85:0d:80 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
vmnic2 02:03.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:8a 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
vmnic3 02:04.00 e1000
Up 1000Mbps Full 00:0c:29:85:0d:94 1500 Intel Corporation
82545EM Gigabit Ethernet Controller (Copper)
===================================================================
======
6. To add the new virtual switch named (vswitch3) to our ESX server.
[root@ESXTEST1 sbin]# esxcfg-vswitch -a vswitch3
Now vswitch3 is created without any port group.
===================================================================
===
Switch Name Num Ports Used Ports Configured Ports MTU
vswitch3
64
1
64
1500

Uplinks

PortGroup Name
VLAN ID Used Ports Uplinks
===================================================================
======
7.To add the new port group named (mgmt)to vswitch (vswitch 3):
[root@ESXTEST1 sbin]# esxcfg-vswitch -A mgmt vswitch3
now port group "mgmt" is added.
===================================================================
======
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vswitch3
64
1
64
1500
PortGroup Name
VLAN ID Used Ports Uplinks
mgmt
0
0
===================================================================
======
8. To add the service console port (vswif2) to our newly created port group "mgmt" with
the ip addr 192.168.0.79

[root@ESXTEST1 sbin]# esxcfg-vswif -a vswif2 -i 192.168.0.79 -n 255.255.255.0 -p


"mgmt"
where i is the ip address, n is subnet mask p is to mentione the port group name
===================================================================
======
vswif2 mgmt
IPv4
192.168.0.79
255.255.255.0
192.168.0.255 true
STATIC
===================================================================
======
9.To add the vmkernal port (vmk2) to our newly created port group "mgmt" with the ip
addr 192.168.0.83
[root@ESXTEST1 sbin]# esxcfg-vmknic -a -i 192.168.0.83 -n 255.255.255.0 -p "mgmt"
===================================================================
======
vmk2
mgmt
IPv4
192.168.0.83
255.255.255.0 192.168.0.255
00:50:56:7b:bd:36 1500 65535 true STATIC
===================================================================
======
10. To change the ip addresss of the existing service console "vswif2".
nano /etc/sysconfig/network-scripts/ifcfg-vswif2.
Edit the file with your new id address " 192.168.0.255" then save and exit.
======================================================
DEVICE=vswif2
HOTPLUG=yes
MACADDR=00:50:56:43:92:be
ONBOOT=yes
PORTGROUP=mgmt
BOOTPROTO=static
BROADCAST=192.168.0.255
DHCPV6C=no
IPADDR=192.168.0.96
IPV6INIT=no
IPV6_AUTOCONF=no
NETMASK=255.255.255.0
======================================================
restart the network service for ip change to take effect:
[root@ESXTEST1 sysconfig]# service network restart
Shutting down interface vswif0:
[ OK ]
Shutting down interface vswif2:
[ OK ]

Shutting down loopback interface:


Bringing up loopback interface:
Bringing up interface vswif0:

[ OK ]
[ OK ]
[ OK ]

Another way is to conncet to the console of the ESX server and at the shell prompt type in
:esxcfg-vswif -d vswif2
This will delete the existing vswif0 and it will give the message about "nothing to flush".
then type the below command
esxcfg-vswif -a vswif2 -p mgmt -i 192.168.0.97 -n 255.255.255.0
===================================================================
======
[root@ESXTEST1 etc]# esxcfg-vswif -d vswif2
Nothing to flush.
[root@ESXTEST1 etc]# esxcfg-vswif -a vswif2 -p mgmt -i 192.168.0.97 -n 255.255.255.0
[2011-09-17 19:35:46 'Vnic' warning] Generated New MAC address, 00:50:56:43:92:be for
vswif2
Nothing to flush.
===================================================================
======
11. To Edit the hostname and default gateway.
edit the below file:
nano /etc/sysconfig/network
======================================
NETWORKING=yes
HOSTNAME=ESXTEST1.lab.com
GATEWAY=192.168.0.20
GATEWAYDEV=vswif0
IPV6_AUTOCONF=no
NETWORKING_IPV6=no
======================================
restart the network service for ip change to take effect:
[root@ESXTEST1 sysconfig]# service network restart
12.To edit the host file:
nano /etc/hosts

Edit the file to make entry to your host file.


==========================================
127.0.0.1
localhost
::1
localhost
192.168.0.75 ESXTEST1.lab.com ESXTEST1
==========================================
13. To edit the DNs entry of your ESX server
nano /etc/resolv.conf
Edit the file to make changes or to make new entry of dns for your ESX server
========================
nameserver 192.168.0.20
search lab.com
=======================
14.To query the firewall ports
esxcfg-firewall - q
15. to open the port in firewall (port no 8877, tcp, incoming , name: test3
esxcfg-firewall -o 8877,tcp,in,test3