Pages

Thursday, 11 February 2010

Understanding VMware Fault Tolerance

VMware Fault Tolerance (FT) provides continuous availability for applications by creating a live shadow instance of a virtual machine that is in virtual lock-step with the primary instance. By allowing instantaneous failover between the two instances in the event of hardware failure, VMware Fault Tolerance eliminates even the smallest of data loss or disruption.


VMware Fault Tolerance (FT) works by creating an identical copy of a virtual machine. One copy of the virtual machine, called the primary, is in an active state, receiving requests, serving information and running applications. Another copy, called the secondary, receives the same input that is received by the primary.

In an FT environment, one virtual machine runs as a primary and FT runs a secondary virtual machine on a different ESX host. The secondary virtual machine shares the primary's virtual disks. The virtual machines are kept in lock-step via logging information sent over a private network connection. The primary is the sender of this logging information and the secondary only listens. FT is based on VMware Record/Replay technology.


In the event that the primary's ESX host fails, the secondary virtual machine takes over without interrupting applications.
VMware FT provides more continuity than VMware HA because FT does not require a virtual machine restart and the secondary virtual machine immediately comes online with all, or almost all state information preserved.
Virtual machines protected by FT are not handled by VMware HA for restart priority. It is considered disabled in the restart priority.


Determining Node Failure
VMware FT uses network heartbeats to determine when primary and backup hosts are down. Backup goes live and becomes the new primary if it declares the current primary dead.
FT uses an atomic operation on the shared VMFS to distinguish between a failed host from a network failure.

VMware FT Migration Transition States
VMware FT tracks failover operations with a variety of states. For more information on transition states, see - VMware Fault tolerance migration transition states (1010634).

Wednesday, 10 February 2010

How to Disable Client-Side DNS Caching in Windows XP and Windows Server 2003

Windows contains a client-side Domain Name System (DNS) cache. The client-side DNS caching feature may generate a false impression that DNS "round robin" is not occurring from the DNS server to the Windows client computer. When you use the ping command to search for the same A-record domain name, the client may use the same IP address. This behavior is different from Microsoft operating systems earlier than Windows 2000. These operating systems do not include the client-side DNS caching feature. This article describes how to disable DNS caching.


To stop DNS caching, run either of the following commands:
  • net stop dnscache

    -or-
  • sc servername stop dnscache
To disable the DNS cache permanently in Windows, use the Service Controller tool or the Services tool to set the DNS Client service startup type to Disabled. Note that the name of the Windows DNS Client service may also appear as "Dnscache."

Note The overall performance of the client computer decreases and the network traffic for DNS queries increases if the DNS resolver cache is deactivated.

The DNS Client service optimizes the performance of DNS name resolution by storing previously resolved names in memory. If the DNS Client service is turned off, the computer can still resolve DNS names by using the network's DNS servers.

When the Windows resolver receives a positive or negative response to a query, it adds that positive or negative response to its cache, and as a result, creates a DNS resource record. The resolver always checks the cache before querying any DNS server. If a DNS resource record is in the cache, the resolver uses the record from the cache instead of querying a server. This behavior expedites queries and decreases network traffic for DNS queries.

You can use the Ipconfig tool to view and to flush the DNS resolver cache. To view the DNS resolver cache, type ipconfig /displaydns at a command prompt. Ipconfig displays the contents of the DNS resolver cache, including the DNS resource records that are preloaded from the Hosts file and any recently queried names that were resolved by the system. After a certain time period, the resolver discards the record from the cache. The time period is specified in the Time to Live (TTL) associated with the DNS resource record. You can also flush the cache manually. After you flush the cache, the computer must query DNS servers again for any DNS resource records previously resolved by the computer. To delete the entries in the DNS resolver cache, type ipconfig /flushdns at a command prompt.

Friday, 5 February 2010

VMotion a VM with a Internal Network

I've always been under the impression that you could never VMotion a VM that has an active connection to an internal switch (with no link to any pNIC), but you actuall can. In order to do it, you have to add some particular lines in the vpxd.cfg file on the VitualCenter Server itself.

Edit

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\vpxd.cfg

and add the following lines to the bottom of the cfg file.

< test >
< compatiblenetworks >
< vmonvirtualintranet >false< /vmonvirtualintranet >
< /compatiblenetworks>
< /test >
< /migrate >


You have to create this section at the end of the vpxd.cfg file but still in the section.

Note: This is not supported by VMware but is very handy and you also need to remove the spaces in the < >!

Thursday, 4 February 2010

ESXTOP

Esxtop allows monitoring and collection of data for all system resources: CPU, memory, disk and network.
Understanding all the information in esxtop can seem like quiet a lot to take it at first but once you use esxtop and understand all the information you wont stop using it.

The following keys are the ones I use the most.
open console session or ssh to ESX(i) and type:
esxtop

By default the screen will be refreshed every 5 seconds, change this by typing:
s 2

Changing views is easy type the following keys for the associated views:
c = cpu 
m = memory 
n = network 
i = interrupts 
d = disk adapter 
u = disk device 
v = disk VM

To Ad/Remove fields:
:f

Changing the order:
o

Saving all the settings you’ve changed:
W
To capture the information and export it to a CSV use the following command:
esxtop -b -d 2 -n 100> esxtopcapture.csv

Where “-b” stands for batch mode, “-d 2″ is a delay of 2 seconds and “-n 100″ are 100 iterations. In this specific case esxtop will log all metrics for 200 seconds.

Help:?

here are a few of the metric thresholds that i use


DisplayMetricThresholdExplanation
CPU%RDY10Overprovisioning of vCPUs, excessive usage of vSMP or a limit(check %MLMTD) has been set. See Jason’s explanation for vSMP VMs
CPU%CSTP100Excessive usage of vSMP. Decrease amount of vCPUs for this particular VM. This should lead to increased scheduling opportunities.
CPU%MLMTD0If larger than 0 the world is being throttled. Possible cause: Limit on CPU.
CPU%SWPWT1VM waiting on swapped pages to be read from disk. Possible cause: Memory overcommitment.
CPUTIMER/S (H)1000High timer-interrupt rate. It may be possible to reduce this rate and thus reduce overhead. The amount of overhead increases with the number of vCPUs assigned to a VM.
MEMMCTLSZ (I)1If larger than 0 host is forcing VMs to inflate balloon driver to reclaim memory as host is overcommited.
MEMSWCUR (J)1If larger than 0 host has swapped memory pages in the past. Possible cause: Overcommitment.
MEMSWR/s (J)1If larger than 0 host is actively reading from swap(vswp). Possible cause: Excessive memory overcommitment.
MEMSWW/s (J)1If larger than 0 host is actively writing to swap(vswp). Possible cause: Excessive memory overcommitment.
MEMN%L (F)80If less than 80 VM experiences poor NUMA locality. If a VM has a memory size greater than the amount of memory local to each processor, the ESX scheduler does not attempt to use NUMA optimizations for that VM and “remotely” uses memory via “interconnect”.
NETWORK%DRPTX1Dropped packages transmitted, hardware overworked. Possible cause: very high network utilization
NETWORK%DRPRX1Dropped packages received, hardware overworked. Possible cause: very high network utilization
DISKGAVG (H)25Look at “DAVG” and “KAVG” as the sum of both is GAVG.
DISKDAVG (H)25Disk latency most likely to be caused by array.
DISKKAVG (H)5Disk latency caused by the VMkernel, high KAVG usually means queuing. Check “QUED”.
DISKQUED (F)1Queue maxed out. Possibly queue depth set to low. Check with array vendor for optimal queue depth value.
DISKABRTS/s (K)1Aborts issued by guest(VM) because storage is not responding. For Windows VMs this happens after 60 seconds by default. Can be caused for instance when paths failed or array is not accepting any IO for whatever reason.
DISKRESETS/s (K)1The number of commands reset per second.
For a more detailed view over ESXTOP read the followign VMware article.

Wednesday, 3 February 2010

Active Directory Interview Questions


Active Directory Interview Questions
1. What’s the difference between local, global and universal groups? Domain local groups assign access permissions to global domain groups for local domain resources. Global groups provide access to resources in other trusted domains. Universal groups grant access to resources in all trusted domains.
2. I am trying to create a new universal user group. Why can’t I? Universal groups are allowed only in native-mode Windows Server 2003 environments. Native mode requires that all domain controllers be promoted to Windows Server 2003 Active Directory.
3. What is LSDOU? It’s group policy inheritance model, where the policies are applied toLocal machines, Sites, Domains and Organizational Units.
4. Where are group policies stored? %SystemRoot%System32\GroupPolicy
5. What is GPT and GPC? Group policy template and group policy container.
6. Where is GPT stored? %SystemRoot%\SYSVOL\sysvol\domainname\Policies\GUID
7. You change the group policies, and now the computer and user settings are in conflict. Which one has the highest priority? The computer settings take priority.
8. How can you restrict running certain applications on a machine? Via group policy, security settings for the group, then Software Restriction Policies.
9. How frequently is the client policy refreshed? 90 minutes.
10. You want to create a new group policy but do not wish to inherit. Make sure you check Block inheritance among the options when creating the policy.
11. What hidden shares exist on Windows Server 2003 installation? Admin$, Drive$, IPC$, NETLOGON, print$ and SYSVOL.
12. How many passwords by default are remembered when you check "Enforce Password History Remembered"? User’s last 6 passwords.
13. What are the 5 FSMO roles?  
Schema Master: The schema master domain controller controls all updates and modifications to the schema. To update the schema of a forest, you must have access to the schema master. There can be only one schema master in the whole forest.
Domain naming master: The domain naming master domain controller controls the addition or removal of domains in the forest. There can be only one domain naming master in the whole forest.
Infrastructure Master: The infrastructure is responsible for updating references from objects in its domain to objects in other domains. At any one time, there can be only one domain controller acting as the infrastructure master in each domain.
Relative ID (RID) Master: The RID master is responsible for processing RID pool requests from all domain controllers in a particular domain. At any one time, there can be only one domain controller acting as the RID master in the domain.
PDC Emulator: The PDC emulator is a domain controller that advertises itself as the primary domain controller (PDC) to workstations, member servers, and domain controllers that are running earlier versions of Windows. For example, if the domain contains computers that are not running Microsoft Windows XP Professional or Microsoft Windows 2000 client software, or if it contains Microsoft Windows NT backup domain controllers, the PDC emulator master acts as a Windows NT PDC. It is also the Domain Master Browser, and it handles password discrepancies. At any one time, there can be only one domain controller acting as the PDC emulator master in each domain in the forest.
14. How do you transfer the roles? For the schema master first register the regsvr32 schmmgmt.dll, then add the Active Directory Schema snap-in in to an MMC.
Transfer the Domain Naming Master Role, go to Active Directory Domains and Trusts and Right-click Active Directory Domains and Trusts and then click Operations Master.
Transferring the RID Master, PDC Emulator, and Infrastructure Master Roles start ADCU and in the console tree, right-click Active Directory Users and Computers, point to All Tasks, and then click Operations Master.
15. Where is the AD database held? %systemroot%/ntds
16. What is a sysvol folder? The sysvol is a shared folder that shared between all other DC’s within a domain, it contains things like GPO’s, NETLOGON folder and system policies.  It also must be stored on NTFS
17. What are AD application partitions?  Application Directory Partition is a partition space in Active Directory which an application can use to store that application specific data. This partition is then replicated only to some domain controllers for redundancy reasons. The application directory partition can contain any type of data except security principles (users, computers, groups)
18. What is the Global Catalog? The global catalog contains a complete replica of all objects in Active Directory for its Host domain, it also stores a partial, read-only replica of all other domains directory partitions in the forest. 
19. Why not make all DCs in a large forest as GCs? The reason that all DCs are not is that in large forests the DCs would all have to hold a reference to every object in the entire forest which could be quite large and and in return prove a replication burden. 
20. What is an AD site? A Site object in AD represents a physical geographic location that hosts networks. Sites contain subnets and sites can be used to assign Group Policy Objects.  Sites can be linked to other Sites by a cost value that represents the speed, reliability, availability, or other real property of a physical resource.