Wednesday, April 1, 2015

VMware scenario based interview questions

  1. vMotion failed at 14%. What could be the possible reasons ?

Issue

While performing vMotion, the operation fails at 14% with the below error :


A general system error occurred: Migrtion to host failed with erro Connection closed by remote host, possibly due to timeout (0xbad003f).


Migrate virtual machine:A general system error occurred: Migration to host failed with error Connection closed by remote host, possibly due to timeout (0xbad003f).


vMotion migration [-1062729272:1406020861428172] (19-71629048648008) failed to receive... 


Scenarios


Scenario 1: Your management network and vmotion network are in the same subnet using the same physical NIC.



Consider the case, where the management network and vmotion network are in the same subnet and you have assigned a VLAN id to the vMotion network, the operation fails at 14%. 


My first point will be to avoid using same IP subnet for both management and vmotion networks. Because if you use the same subnet, all the vmotion traffic will be forwarded to the physical NIC connected to the management network. This is because, by default all traffic from vmkernel portgroups from the same subnet will be forwarded to the first NIC configured in the ESXi for that IP subnet. Obviously this will be the management network.


And if you still stick to the plan of using same subnet, please make sure that you have not assigned any VLAN id to the vMotion portgroup.


What happens when we assign a VLAN to the vMotion portgroup ? vMotion vmknic will try to communicate with the default gateway and since the default gateway is not tagged with the VLAN id you choose for vMotion, the operation fails.

Scenario 2: Your management network and vmotion network are in the same subnet using different physical NIC (may be using different vswitches as well).


The comments in the above scenario applies to this scenario also. It doesn't matter if you have created a new vSwitch or a new portgroup or a dedicated physical NIC for the vmotion network, if your management network is in the same subnet, do not assign a VLAN id to the portgroup. 


Scenario 3: Your management network and vmotion network in different subnet.


In this case you need to check the physical switch configuration.


2. How to extend a logical volume in Windows 2003 hosted in VMware ?

Scenario

You have a single vmdk file of 200 GB and it has two logical volumes C & D with 100 GB each. Suppose you need to add another 100 GB to the D drive making it 200 GB. What would you do ?


The steps are simple and straight forward.


  • Change the VMDK size using vSphere client to 300 GB (Exisiting 200 GB + required space).
  • Log in to the VM and ensure that the added disk space is available to the VM as 'Unallocated' space
  • Execute the below commands in command prompt
    • diskpart
    • list volume
    • select volume 
    • extend


3. CentOS Network interface is not detecting after VMware clone ?

Symptom: 

Eth0 interface will not be present for a Centos VM after cloning. Only the loopback networking interface will be available. If you try to turn up the interface manually (using the command ifup eth0 or ifup-eth0), you will receive the below error.


Device eth0 does not seem to be present, delaying initialisation 


Root Cause:


When you clone a Centos VM from a template, a new NIC card will be created for the cloned VM. In other terms, a new MAC address will be generated for the NIC of the cloned machine. This change happens only in VMware perspective and no modification is made in Centos. Therefore the kernel will be still searching for the NIC with old MAC address and hence fails.



Resolution:


1. Update the exisiting ethernet configuration file to reflect the new MAC address. 


Check the new MAC address using vSphere client and modify the ifcfg-eth0 interface configuration using the command:



vi /etc/sysconfig/networking/devices/ifcfg-eth0


Replace HWADDR with the new MAC address 


2. Remove the kernel's networking interface rules file


rm -f /etc/udev/rules.d/70-persistent-net.rules


3. Reboot the VM


4.SQL servers hosted in VMs are facing performance degradation. How to confirm whether it is a SQL related issue or VMware related issue ?

No comments:

Post a Comment