Carl Stalhood

Saturday, 7 March 2015

Vmware interview questions


1) How does VMotion works? What’s the port number used for it?

Answer

            VMotion is used to migrate a running virtual machine from one ESX host to another host            without any down time.

vMotion:- Live or cold migration of a virtual machine from one physical server to another server is called as vMotion. Now come's the question, how does this happens? How is it possible? does really the user might not face an access disruption. this what the question come in the mind and here a explanation. There are 3 underlying action happening in vMotion. First:- The entire state of a virtual machine is encapsulated by a set of files stored on shared storage such as Fibre Channel or iSCSI Storage Area Network (SAN) or Network Attached,Storage (NAS). VMware vStorage VMFS allows multiple ESX® to access the same virtual machine files concurrently. Second:- The active memory and precise execution state of the virtual machine is rapidly transferred over a high speed network, allowing the virtual machine to instantaneously switch from running on the source ESX host to the destination ESX host. VMotion keeps the transfer period imperceptible to users by keeping track of on-going memory transactions in a bitmap. Once the entire memory and system state has been copied over to the target ESX host, VMotion suspends the source virtual machine, copies the bitmap to the target ESX host, and resumes the virtual machine on the target ESX host. This entire process takes less than two seconds on a Gigabit Ethernet network. Third:- The networks being used by the virtual machine are also virtualized by the underlying ESX host, ensuring that even after the migration, the virtual machine network identity and network connections are preserved. VMotion manages the virtual MAC address as part of the process. Once the destination machine is activated, VMotion pings the network router to ensure that it is aware of the new physical location of the virtual MAC address. Since the migration of a virtual machine with VMotion preserves the precise execution state, the network identity, and the active network connections, the result is zero downtime and no disruption to users.

The port no. used for VMotion is 8000 TCP as protocol.

2) Prerequisites for VMotion

1) CPU compatibility (i.e., source and destination hosts should be of same family i.e., Intel or AMD).

2) Storage should be common or shared storage.

3) Resources should be available on the destination host.

4) Physical network should be same network.

5) Create vmkernel port group in both source and destination hosts.

6) No access of mountable devices.

7) No permission of vmx file.

3) Prerequisites for HA?

1)  CPU compatibility (i.e., source and destination hosts should be of same family i.e., Intel or AMD).

2) Storage should be common or shared storage.

3) Resources should be available on the destination host.

4) Physical network should be same network.

5) Create vmkernel port group in both source and destination hosts.

6) Host should be configured with FQDN.

7) DNS should be configured with Host name.

4) How do DRS works? Which technology used? What are the priority counts to migrate the VM’s?

DRS means Distributed Resource Scheduler. Its main function is Load Balancing Mechanism. VMware DRS allows users to define the rules and policies that decide how virtual machines share resources and how these resources are prioritized among multiple virtual machines.

When a virtual machine experiences increased load, VMware DRS first evaluates its priority against the established resource allocation rules and policies, and if justified, allocates additional resources. Resources are allocated to the virtual machine by either migrating it to another server with more available resources or by making more “space” for it on the same server by migrating other virtual machines to different servers. The live migration of virtual machines to different physical servers is executed completely transparent to end-users through VMware VMotion™.

VMware DRS uses VMware VMotion technology to automatically and transparently move running workloads between systems to provide a level of runtime flexibility unique to virtual environments.

For each migration recommendation, the priority level is limited to the integer range priority 2 to priority 5 (inclusive).

For each migration recommendation, the priority level is limited to the integer range priority 2 to priority 5             (inclusive). It is calculated according to this formula:

6 - ceiling(LoadImbalanceMetric / 0.1 * sqrt(NumberOfHostsInCluster))

Here, ceiling (x) is the smallest integer value not less than x. LoadImbalanceMetric is the current host load standard deviation shown on the cluster's Summary page of the vSphere Client.

      For each host:

1. Compute the load on the host as sum(expected VM loads) / (capacity of host) This value is the host load metric.

2. Compute the standard deviation of the host load metric across all hosts to determine Load balance Metric.

These formulas apply only to ESX/ESXi 4.x and VCenter Server 4.x. They are subject to change.

5) How does snap shot’s works?

Snapshot is a pre-reserved state of a virtual machine.  A VMware snapshot is a copy of the virtual machine's disk file (VMDK) at a given point in time.

6) What are the files will be created while creating a VM and after powering on the VM?

The default files created while the VM is created are

VMX file – Configuration

VMXF file – Supplementational Configuration

VMDK Files – Disk related files, includes .VMDK, -delta.vmdk, -rdm.vmds

VSWP File – Memory overflow (SWAP) file

VMSD File – Snapshot details

VMSS File – Memory contents of suspended VM

VMSN File – Snapshot Files

NVRAM File – BIOS file

Log files

           After powering on the VM 

           VSWP file

 At VM power on,  a memory swap file is created, it is equal to the memory designated to the VM in its VM settings.  If the ESXi host cannot provide sufficient memory to the VM, and Ballooning cannot be utilized to free memory then the host will use this file as memory overflow.

7) If the VMDK header file corrupt what will happen? How do you troubleshoot?

If VMDK header corrupted following will happen

* Failed to open disk.

* The file specified is not a virtual disk (15) 3023.

* Cannot open the disk or one of the snapshot disks it depends on.

* The file specified is not a virtual disk

To resolve this issue, you have to recreate the VMDK header/descriptor file.

 If the virtual machine is using persistent disks, see Recreating a missing virtual disk (VMDK) header/descriptor file (1002511).  

On products such as VMware Workstation and VMware Server, you need to use the vmware-vdiskmanager utility to create a new disk of the same type and size of the -flat.vmdk file.

In Windows, this utility is located in the install directory of VMware Server or VMware Workstation (C:/Program Files/VMware/).

 To recreate the VMDK header/descriptor file:

If you are using Windows, locate the utility in the install directory of VMware Server or VMware Workstation (C:/Program Files/VMware/).

Run the command:

vmware-vdiskmanager.exe

For example, to create a 20 GB persistent size disk for use with Windows Server 2003 on the e: drive, run the command:

vmware-vdiskmanager.exe -c -s 20GB -a lsilogic -t 2 "e:\newdisk.vmdk"

Note: For more information about vmware-vdiskmanager.exe, consult the Linux man page (man vmware-vdiskmanager) or Windows Help (vmware-vdiskmanager /?).

 Copy the new VMDK descriptor file to the folder where the problematic virtual machine is located, and edit the flat file to which it points so it has the correct name.

8) What are the prerequisites for installing VC and Update manager?

Hardware requirement for installing VC and update manager for ESXi 5.x  

Hardware Requirement

Processor: Intel or AMD x86 processor with two or more logical cores, each with a speed of at least 2GHz

Memory:2GB RAM if Update Manager and vCenter Server are on different machines

4GB RAM if Update Manager and vCenter Server are on the same machine

Networking:10/100 Mbps

Note: For best performance, use a Gigabit connection between vCenter Update Manager and the ESX/ESXi hosts 

vCenter Update Manager 5.x requires a 64-bit operating system and cannot be installed on a 32-bit operating system. When performing an install you must ensure that your operating system is 64-bit capable

update manager requires 32-bit DSN to communicate with database and it requires min 120GB storage space to store patches 

9) I turned on Maintenance mode in an ESX host, all the VM’s has been migrated to another host, but only one VM failed to migrate? What are the possible reasons?

1. Is the VM in the same shared datastore as the other VMs.

2. Is the other host resource setting preventing the vm to be migrated.

3. Post the last set of vmkernel logs to know more about the failure.

4. Is by any chance, any additional disks are configured as RDM.

10) How will you turn start / stop a VM through command prompt?

    There may be times when you can't manage ESX through the GUI, but thankfully you can still manage virtualization from the command prompt.

First, you can list all the VMs on a server using the vmware-cmd -l command. For example,

vmware-cmd -l

Produces

/vmfs/volumes/f27f61fa-1c0f60ae/Test/Test.vmx /vmfs/volumes/f27f61fa-1c0f60ae/savdalvdi01/savdalvdi01.vmx /vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/savdalesxvc.vmx /vmfs/volumes/f27f61fa-1c0f60ae/savdalappv01/savdalappv01 .vmx

Note that you're shown the VMX location for each VMs. You need these paths to actually control the VMs.

To check if a VM is running, specify the VMX file and the getstate switch. For example,

vmware-cmd /vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/ savdalesxvc.vmx getstate

returns

getstate() = off

To start a VM, just use the start switch. For example,

vmware-cmd /vmfs/volumes/f27f61fa-1c0f60ae/savdalesxvc/ savdalesxvc.vmx start

returns

start() = 1

The VM will now be running.

11)  I have upgraded a VM from 4 to 8 GB RAM; it’s getting failed at 90% of powering on? How do you troubleshoot?

12) Storage team provided the new LUN ID to you? How will you configure the LUN in VC? What      would be the block size (say for 500 GB volume size)?

13)  I want to add a new VLAN to the production network? What are the steps involved in that? And how do you enable it?

14)  What’s the difference between Top and ESXTOP command?

 Difference between TOP and ESXTOP commands:-

1. Vmware ESXTOP command is used to for Storage Monitoring.

2. ESX TOP show the service console performance (or) ESX host performance.

3. Monitors overall storage performance per HBA.

4. Monitors storage performance per LUN.

5. Monitors storage performance per VM.

6. TOP command is used to shows how many users are logged in to virtual center.

15)  How will you check the network bandwidth utilization in an ESXS host through command prompt?

 16) How will you generate a report for list of ESX, VM’s, RAM and CPU used in your Vsphere environment?

Two ways to generate report for ESXi,VM,RAM and CPU

A) use the vCenter performance charts, select chart options and chose the the resource & corresponding metrics

B) Go to host>click File>Report>host summary(or)performance

17) What the difference between connecting the ESX host through VC and Vsphere? What are the services involved in that? What are the port numbers’used?

The ports used for connecting ESX host through vsphere  is HTTP port 80 and HTTP port 443

18) Can I deploy a VM by template in different data centres?

Yes we can deploy vm by template in different data centers.

Procedure to deploy VM from template

Right click on template>select deploy a virtual machine 

Start deploy a virtual machine from a template task

>Select virtual machine name and folder>Select resource>Select a data store

19)  I want to increase the system partition size (windows 2003 server- Guest OS) of a VM? How will you do it without any interruption to the end user?

Through Extpart.exe we can increase the partition size (C:\) without any interruption to the end user. Remaining partitions we can increase through diskpart.

20)  Which port number used while 2 ESX transfer the data in between?

21)  Unable to connect to a VC through Vsphere client? What could be the reason? How do you troubleshoot?

                    Cause

This issue occurs if there is a proxy server between the vSphere Client and vCenter Server. The vSphere Client does not support proxy connections to connect to vCenter Server.

Resolution

To resolve this issue, disable the connection to the proxy server.

To disable the connection to the proxy server:

1. Click Start > Control Panel.

2. Click Network and Sharing Center or Network and Internet.

3. Click Internet Options in the left pane.

4. Click the Connections tab.

5. Click LAN Settings.

6. Deselect Use a proxy server for your LAN.

7. Click OK.

8. Click OK to close the Internet Properties window.

22)   Have you ever upgraded the ESX 3.5 to 4.0? How did you do it?

        Yes.

        Steps:- 

1. Login to client environment.

2. Open internet explorer and enter ILO IP. It will login into physical server.

3. Click on resource console at the left pane.

4. Click on launch java at right pane. Console will be opned.

5. Click on ADD Virtal Disk. And select the ISO image of ESX 4.0.

6. Click on power source. And select Cold Boot.

7. Rebooting will start with in server.

8. In between upgrading It will ask for Storage option then we will give server storage i.e., HP\DELL. 

9. Select ESXI overwrite on data store.

10. Reboot is completed. After this provide IP to the server.

23)  What is AAM? Where is it used? How do you start or stop through command prompt?

 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).Upto ESXi 4.1 ‘AAM’ was used as HA agent

service vmware-aam restart

service vmware-aam stop

service vmware-aam start

24)  How will you change the service console IP?

25)  What’s the difference between ESX and ESXi?

         Diff. Btw ESX and ESXi:-

1. ESX supports service console (CLI) command line interface whereas ESXi does not support service console.

2. ESX supports CLI and GUI whereas ESXi supports only GUI

3. ESX supports virtual apps and scripting whereas ESXi also supports virtual apps and scripting after the introduction of Power CLI from ESXi 5.0.

4. ESX versions:- 2.5, 3.0, 3.5, 4.0

ESXi versions:- 3.5, 4.0, 4.1, 5.0, 5.1, 5.5.

26)  What is the Maximum Virtual SCSI adapters per virtual machine?

27)  What is the Maximum Virtual SCSI targets per virtual SCSI adapter?

28)  What is the Maximum IDE controllers per virtual machine?

29)  What is the Maximum Parallel ports per virtual machine?

Answers for Q. no’s 26, 27, 28, 29 are tabulated below.

ESXi versions Max. Virtual SCSI adapters per VM Max. Virtual SCSI targets per virtual SCSI adapters Max. IDE controllers per VM Max. Parallel ports per VM

4.0 42 153 15 3

4.1 41 152 13 3

5.0 42 153 14 3

5.1 4 152 13 3

5.5 4 152

 

No comments:

Post a Comment