VMWARE L2 INTERVIEW QUESTION
We are elaborate VMware interview questions and answers which is mention below
What is Virtual Standard Switch?
Virtual Standard Switch stands for Virtual Standard Switch is responsible for communication of VMs hosted on a single physical host. It works like a physical switch automatically detects a VM which want to communicate with other VM on a same physical server.
What is Virtual Distributed Switch?
Virtual Distributed Switch stands for Virtual Distributed Switch acts as a single switch in whole virtual environment and is responsible to provide central provisioning, administration, and monitoring of virtual network.
What is VM Kernal adapter?
VMKernel adapter provides network connectivity to the ESXi host to handle network traffic for vMotion, IP Storage, NAS, Fault Tolerance, and vSAN. For each type of traffic such as vMotion, vSAN etc. separate VMKernal adapter should be created and configured.
What is vmotion
With the help of VMotion we can live migration of running virtual machines from one physical server to another with zero downtime, continuous service availability, and complete transaction integrity. It is transparent to users.
What are network security policies/modes on vSwitch?
There are three types of network security policies
MAC address change
What is promiscuous mode on vSwitch?
The default mode is Reject. If Accept is selected, VM will receive all traffic port group via vSwitch.
What is MAC address changes network policy?
MAC address are set to accept by default. This means the virtual switch does not compare the source and effective MAC addresses of operating system and virtual network adapter. If this option is set to reject, the virtual switch compares the source MAC address being transmitted by the operating system with the effecttive MAC address for its virtual network adapter to see if they are the same. If the MAC addresses are different, the virtual switch drops the frame, virtual adapter does not receive any more frames until it changes the effective MAC address to match the initial MAC address.
What is Forged transmits network policy?
Forged transmissions are set to accept by default. This means the virtual switch does not compare the source and effective MAC addresses. The Forged Transmits option setting affects traffic transmitted from a virtual machine. If this option is set to reject, the virtual switch compares the source MAC address being transmitted by the operating system with the effective MAC address for its virtual network adapter to see if they are the same. If the MAC addresses are different, the virtual switch drops the frame. The guest operating system will not detect that its virtual network adapter cannot send packets using the different MAC address. To protect against MAC address impersonation, all virtual switches will have forged transmissions set to reject.
How many disk types are in VMware?
Thick Provisioned Lazy Zeroes
Thick provision means all the space designated for the virtual disk files is reserved when the VM is created. Lazy zero means that blocks containing older data on the storage device are only cleared when the virtual machine writes new data to the disk for the first time.
Thick Provision Eager Zeroes
The description “thick provision” simply means that all the space that is required for the virtual disk files is reserved when the VM is created. Eager Zeroes means that blocks on the physical storage device are formatted with zeros to overwrite any older data.
Thin Provisioning is VMware vSphere Technology allows Virtual Disk storage allocation on demand. In other words, allocate storage space only when VM needs it.
In thin provisioning, all of the VM’s configured storage doesn’t get allocated to VM during creation. Instead, space allocation happens as when VM virtual disk starts growing.
What is VMFS?
VMFS is a file system for a VM in VMware vSphere. VMFS is a datastore that responsible for storing virtual machine files. VMFS can also store large files which size can up to 64TB in vSphere 6.0
Difference between VMFS 5 & VMFS 6
How many maximum hosts can manage a vCenter Server in vSphere 6.0and 6.5?
In vSphere 6.0 &6.5, a single vCenter Server can manage up to 1000 and 2000 hosts either in Windows or in vCenter Appliance
What is DRS?
DRS stands for Distributed Resource Scheduler; that automatically balances available resources among various hosts by using cluster or resource pools. It also place VM when VM is restart or start on the host. With the help of HA, DRS can move VMs from one host to another to balance the available resources among VMs.
What is the difference between clone, snapshot and template?
A clone is a copy of an existing virtual machine. The existing virtual machine is called the parent of the clone. When the cloning operation is complete, the clone is a separate virtual machine.
A snapshot is a copy of the virtual machine’s disk file at a given point in time. Snapshots provide a change log for the virtual disk and are used to restore a VM to a particular point in time when a failure or system error occurs.
Or when we take a snapshot, it captures the state of the virtual machine settings and the virtual disk. If you are taking a memory snapshot, you also capture the memory state of the virtual machine. These states are saved to files that reside with the virtual machine’s base files.
A template is a master copy of a virtual machine that can be used to create many clones.
How Fault Tolerance Works
VMware Fault Tolerance provides continuous availability for virtual machines by creating and maintaining a Secondary VM that is identical to, and continuously available to replace, the Primary VM in the event of a failover situation.
You can enable Fault Tolerance for most mission critical virtual machines. A duplicate virtual machine, called the Secondary VM, is created and runs in virtual lockstep with the Primary VM. VMware vLockstep captures inputs and events that occur on the Primary VM and sends them to the Secondary VM, which is running on another host. Using this information, the Secondary VM’s execution is identical to that of the Primary VM. Because the Secondary VM is in virtual lockstep with the Primary VM, it can take over execution at any point without interruption, thereby providing fault tolerant protection.
The Primary and Secondary VMs continuously exchange heartbeats. This exchange allows the virtual machine pair to monitor the status of one another to ensure that Fault Tolerance is continually maintained. A transparent failover occurs if the host running the Primary VM fails, in which case the Secondary VM is immediately activated to replace the Primary VM. A new Secondary VM is started and Fault Tolerance redundancy is reestablished within a few seconds. If the host running the Secondary VM fails, it is also immediately replaced. In either case, users experience no interruption in service and no loss of data.
Elaborate Virtual Machine Files
|.vmx||vmname.vmx||The primary configuration file, which stores virtual machine settings. If you created the virtual machine with an earlier version of Workstation on a Linux host, this file might have a .cfg extension.|
|.log||vmname.log||The main log file. If you need to troubleshoot a problem, refer to this file. This file is stored in the same directory as the .vmx file.|
|.nvram||vmname.nvram||The NVRAM file, which stores the state of the virtual machine BIOS. This file is stored in the same directory as the .vmx file.|
|.vmdk||vmname.vmdk||Virtual disk files, which store the contents of the virtual machine hard disk drive. These files are stored in the same directory as the .vmx file.|
|A virtual disk is made up of one or more virtual disk files. The virtual machine settings show the name of the first file in the set. This file contains pointers to the other files in the set.|
|If you specify that all disk space should be allocated when the virtual disk is created, these files start at the maximum size and do not grow. Almost all of the file content is virtual machine data. A small portion of the file is allotted to virtual machine overhead.|
|If the virtual machine is connected directly to a physical disk, the virtual disk file stores information about the partitions that the virtual machine is allowed to access.|
|Earlier VMware products use the .dsk extension for virtual disk files.|
|vmname-s###.vmdk||If you specified that the files can increase, filenames include an s in the file number, for example, Windows 7-s001.vmdk.|
|If you specified that the virtual disk is divided into 2GB sections, the number of files depends on the size of the virtual disk. As data is added to a virtual disk, the files increase to a maximum of 2GB each.|
|vmname-f###.vmdk||If all disk space was allocated when the disk was created, filenames include an f, for example, Windows 7-f001.vmdk.|
|vmname–disk–###.vmdk||If the virtual machine has one or more snapshots, some files are redo log files. These files store changes made to a virtual disk while the virtual machine is running. The ### indicates a unique suffix that Workstation adds to avoid duplicate file names.|
|.vmem||uuid.vmem||The virtual machine paging file, which backs up the guest main memory on the host file system. This file exists only when the virtual machine is running or if the virtual machine fails. It is stored in the working directory.|
|snapshot_name_number.vmem||Each snapshot of a virtual machine that is powered on has an associated .vmem file, which contains the guest operating system main memory, saved as part of the snapshot.|
|.vmsd||vmname.vmsd||A centralized file for storing information and metadata about snapshots. It is stored in the working directory.|
|.vmsn||vmname.Snapshot.vmsn||The snapshot state file, which stores the running state of a virtual machine at the time you take that snapshot. It is stored in the working directory.|
|vmname.Snapshot###.vmsn||The file that stores the state of a snapshot.|
|.vmss||vmname.vmss||The suspended state file, which stores the state of a suspended virtual machine. It is stored in the working directory.|
|Some earlier VMware products used the .std extension for suspended state files.|
What is virtual memory ballooning
Virtual memory ballooning is a computer memory reclamation technique used by a hypervisor to allow the physical host system to retrieve unused memory from certain guest virtual machines (VMs) and share it with others. Memory ballooning allows the total amount of RAM required by guest VMs to exceed the amount of physical RAM available on the host. When the host system runs low on physical RAM resources, memory ballooning allocates it selectively to VMs.
When the ESXi host memory state is High, None of the action will be taken by hypervisor expect Transparent page sharing. In understand about Transparent Page sharing, take a look at my post “Understanding TPS”. Memory Ballooning will be active
Ex- Over commitment means nothing but you can allocated more memory to your virtual machines than the actual available memory of the ESX host. Let’s assume,your ESXi host having total memory of 40 GB but you have 10 virtual machines and each configured with 4 GB with the total of 40 GB memory. But actually total memory available at your ESXi host is just 30 GB. This over commitment can be achieved with the help of memory management techniques and also not all the VM’s will be utilizing 100% of memory allocated at all the times. If it happens, ESXi host will actively use its memory reclamation techniques to handle this situation efficiently.
Below are the Memory Management techniques available as part of ESXi host
1. Transparent Page Sharing
2. Memory ballooning
3. Memory Compression
4. Hypervisor-level memory swapping
Memory reclamation techniques such as ( Memory ballooning, Compression or swapping) will come into action based on the amount of ESXi free host memory. There are 4 different ESXi host states
High -> By default Transparent Page sharing will be always running
Soft -> Memory ballooning will be activate,when ESXi enters the soft state and remains active until ESXi is back to high state
Hard & Low -> Memory compression and hypervisor-level memory swapping are used by ESXi when ESX is in the hard or low state
Low -> If the host’s memory usage is above the Low state, ESXi host will stop creating the new pages for Virtual machines and continues compressing and swapping until free up more memory.
With prior to the vSphere 5, High was set by default at 6%, Soft at 4%, Hard at 2%, and Low at 1%. If the ESXi host free memory is less than the mentioned percentage , ESXi uses the respective memory-reclamation techniques to reclaim the memory but think about the Host configured with more memory. It is not necessary to protect that much free memory. Let’s take a example, ESXi 5.0 host can run with 2 TB of memory. Using these defined values as in the pre-vsphere 5.0, Host will start to reclaim the memory even if has 100 GB of free memory. This is really not a great option. So with vSphere 5.x, This predefined values has been changed to effectively handle the host reclamation techniques for the ESXi host configured with more memory.
With vSphere 5, High state level will be adjusted according to the amount of memory in the host. Below is the calculation
High -> 900 MB for 28 GB + 1 % of all memory above 28 GB (If host is having more than 28 GB of memory)
Soft -> 2/3 of High (64% of High)
Hard -> 1/3 of High (32 % of High)
Low -> 1/6 of High (16 % of High)
Verify the Current ESXi Host Memory State
esxtop and Press m
What is Vmware HA
It protects against a server failure by restarting the virtual machines on other hosts within the cluster
It protects against application failure by continuously monitoring a virtual machine and resetting it in the event that a failure is detected.
After vSphere HA is configured, no actions are required to protect new virtual machines. They are automatically protected
Hosts in the cluster are monitored and in the event of a failure, the virtual machines on a failed host are restarted on alternate hosts
When you create a vSphere HA cluster, a single host is automatically elected as the master host. The master host communicates with vCenter Server and monitors the state of all protected virtual machines and of the slave hosts.
Different types of host failures are possible, and the master host must detect and appropriately deal with the failure. The master host must distinguish between a failed host and one that is in a network partition or that has become network isolated. The master host uses network and datastore heartbeating to determine the type of failure
When the master host in a vSphere HA cluster cannot communicate with a slave host over the management network, the master host uses datastore heartbeating to determine whether the slave host has failed, is in a network partition, or is network isolated. If the slave host has stopped datastore heartbeating, it is considered to have failed and its virtual machines are restarted elsewhere.
How does VMware vSphere 5’s FDM select a master?
The master/slave architecture vSphere 5’s Fault Domain Manager (FDM) uses for monitoring vSphere HA clusters uses an election process to determine which host is to be the master. This election process occurs any time the existing master fails, is shut down, or is placed into maintenance mode. It also occurs when vSphere HA is enabled, or when a management network partition occurs. The election process takes about 10 to 15 seconds.
The election process is defined by an algorithm with two published rules. For the first, the host with access to the greatest number of datastores wins. In the case of a tie, the second rule kicks in: The host with the lexically-highest Managed Object ID (MOID) is chosen. Care must be taken when attempting to rig this election because lexically here means, for example, that host-99 is in fact higher than host-100.
ESXi 6.5/6.x Partition layout
What is VMware HA Admission Control Policy?
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.
Three types of admission control are available.
Host- Ensures that a host has sufficient resources to satisfy the reservations of all virtual machines running on it.
Resource Pool- Ensures that a resource pool has sufficient resources to satisfy the reservations, shares, and limits of all virtual machines associated with it.
VMware HA- Ensures that sufficient resources in the cluster are reserved for virtual machine recovery in the event of host failure.
Admission control imposes constraints on resource usage and any action that would violate these constraints is not permitted. Examples of actions that could be disallowed include the following:
■Powering on a virtual machine.
■Migrating a virtual machine onto a host or into a cluster or resource pool.
■Increasing the CPU or memory reservation of a virtual machine.
Of the three types of admission control, only VMware HA admission control can be disabled. However, without it there is no assurance that all virtual machines in the cluster can be restarted after a host failure. VMware recommends that you do not disable admission control, but you might need to do so temporarily, for the following reasons:
■If you need to violate the failover constraints when there are not enough resources to support them (for example, if you are placing hosts in standby mode to test them for use with DPM).
■If an automated process needs to take actions that might temporarily violate the failover constraints (for example, as part of an upgrade directed by VMware Update Manager).
■If you need to perform testing or maintenance operations.
How to (quickly) match a moRef ID to a name in VMware vSphere
Every object within a vSphere environment is internally tracked, and referred to, by a unique identifier called moRef ID (“Managed Object Reference ID”).
Every virtual infrastructure object managed by vSphere (datacenters, clusters, hosts, datastores, VMs, vApps, vSwitches and so on) has a moRef ID.
What is the moRef ID?
This identifier is composed of a prefix stating the object type, followed by a numerical ID. For example:
It is important to note that this identifier is guaranteed to be unique only within a single vCenter instance. In this article by William Lam it is explained that an additional identifier called InstanceUUID (unique for a given vCenter) was introduced in vSphere 5.0 that, when coupled with the moRef ID, gives a truly globally unique value.
Quick note: the moRef ID is not to be confused with VMs’ UUID. This universally unique value is stored in the SMBIOS and is conceptually similar to the unique BIOS system identifier in physical systems. This value, unlike the moRef ID, can be duplicated even within the same vCenter, for example as a result of a cloning operation, or a restore from backup.
Looking up moRef IDs using PowerCLI
Connect-VIServer <vcenter_or_host> -User <foo\bar> -Password
Get-VM | ft -Property Name,ID –AutoSize
VMware L3 Interview Question or Advance level interview question on VMware
Hyper-v interview questions and answers