Monday, June 24, 2019

VMware Interview questions

VMware Interview questions

1.What is a Hypervisor?
It is a program that allows multiple operating systems to share a single hardware host. Each operating system appears to have the host’s processor, memory, and other resources all to itself. However, the hypervisor is actually controlling the host processor and resources, allocating what is needed to each operating system in turn and making sure that the guest operating systems (called virtual machines) cannot disrupt each other.
2.What is a .vmdk file?
This isn’t the file containing the raw data. Instead it is the disk descriptor file which describes the size and geometry of the virtual disk file. This file is in text format and contains the name of the –flat.vmdk file for which it is associated with and also the hard drive adapter type, drive sectors, heads and cylinders, etc. One of these files will exist for each virtual hard drive that is assigned to your virtual machine. You can tell which –flat.vmdk file it is associated with by opening the file and looking at the Extent Description field.
3.What is VMware vMotion?
VMware VMotion enables the live migration of running virtual machines from one physical server to another with zero downtime.
4. What is promiscuous mode in Vmware?
  • Promiscuous mode is a security policy which can be defined at the virtual switch or portgroup level
  • A virtual machine, Service Console or VMkernel network interface in a portgroup which allows use of promiscuous mode can see all network traffic traversing the virtual switch.
  • If this mode is set to reject, the packets are sent to intended port so that the intended virtual machine will only be able to see the communication.
  • Example: In case you are using a virtual xp inside any Windows VM. If promiscuous mode is set to reject then the virtual xp won’t be able to connect the network unless promiscuous mode is enabled for the Windows VM.
·         5. What is a snapshot?
·         A snapshot is a “point in time image” of a virtual guest operating system (VM). That snapshot contains an image of the VMs disk, RAM, and devices at the time the snapshot was taken. With the snapshot, you can return the VM to that point in time, whenever you choose. You can take snapshots of your VMs, no matter what guest OS you have and the snapshot functionality can be used for features like performing image level backups of the VMs without ever shutting them down.
 6. What is VDI?
  • VDI stands for Virtual Desktop Infrastructure where end user physical machine like desktop or laptop are virtualized due to which VMware described VDI as “delivering desktops from the data center”.
  • Once VDI is used the end user connect to their desktop using a device called thin client.
  • The end user can also connect to their desktop using VMware Horizon View installed on any desktop or mobile devices
 7.what is VMware HA?
  • VMware HA i.e. High Availability which works on the host level and is configured on the Cluster.
  • A Cluster configured with HA will migrate and restart all the vms running under any of the host in case of any host-level failure automatically to another host under the same cluster.
  • VMware HA continuously monitors all ESX Server hosts in a cluster and detects failures.
  • VMware HA agent placed on each host maintains a heartbeat with the other hosts in the cluster using the service console network. Each server sends heartbeats to the others servers in the cluster at five-second intervals. If any servers lose heartbeat over three consecutive heartbeat intervals, VMware HA initiates the failover action of restarting all affected virtual machines on other hosts.
  • You can set virtual machine restart priority in case of any host failure depending upon the critical nature of the vm.
NOTE: Using HA in case of any host failure with RESTART the vms on different host so the vms state will be interrupted and it is not a live migration
8. What is storage vMotion?
  • Storage vMotion is similar to vMotion in the sense that “something” related to the VM is moved and there is no downtime to the VM guest and end users. However, with SVMotion the VM Guest stays on the server that it resides on but the virtual disk for that VM is what moves.
  • With Storage vMotion, you can migrate a virtual machine and its disk files from one datastore to another while the virtual machine is running.
  • You can choose to place the virtual machine and all its disks in a single location, or select separate locations for the virtual machine configuration file and each virtual disk.
  • During a migration with Storage vMotion, you can transform virtual disks from Thick-Provisioned Lazy Zeroed or Thick-Provisioned Eager Zeroed to Thin-Provisioned or the reverse.
  • Perform live migration of virtual machine disk files across any Fibre Channel, iSCSI, FCoE and NFS storage


VMware Admin Interview Questions


VMware Admin Interview Questions & Answers.

1. VMWare Kernel is a Proprietary Kenral and is not based on any of the UNIX operating systems, it's a kernel developed by VMWare Company. 

2. The VMKernel can't boot it by itself, so that it takes the help of the 3rd party operating system. In VMWare case the kernel is booted by RedHat Linux operating system which is known as service console. 


3. The service console is developed based up on Redhat Linux Operating system, it is used to manage the VMKernel  


4. To restart webaccess service on vmware
service vmware-webaccess restart – this will restart apache tomcat app 


5. To restart ssh service on vmware
service sshd restart 


6. To restart host agent(vmware-hostd) on vmware esx server
service mgmt-vmware restart 


7. Path for the struts-config.xml
/usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/ 



8. To start the scripted install the command is
    esx ks=nfs:111.222.333.444:/data/KS.config ksdevice=eth0
               location                                             device name


9. Virtual Network in Simple……………….

Virtual Nic(s) on Virtual Machine(s) -----> 

Physical Nic on the ESX Server (Virtual Switch - 56 Ports)  ----->

Physical Switch Port Should be trunked with all the VLANS to which the VM's need access  

All the ESX servers should be configured with Same number of Physical Nics (vSwitches) and Connectivity also should be same, So that vMotion succeeds
All the Virtual Machines are connected to one vSwitch with Different VLANS, this means the Physical Nic(vSwitch) needs to be trunked with the same VLANS on the Physical Switch Port



10 What are the three port groups present in ESX server networking
   1. Virtual Machine Port Group - Used for Virtual Machine Network
   2. Service Console Port Group - Used for Service Console Communications
   3. VMKernel Port Group - Used for VMotion, iSCSI, NFS Communications


11. What is the use of a Port Group?
The port group segregates the type of communication.


12. What are the type of communications which requires an IP address for sure ?
   Service Console and VMKernel (VMotion and iSCSI), these communications does not happen without an ip address (Whether it is a single or dedicated)


13. In the ESX Server licensing features VMotion License is showing as Not used, why?
    Even though the license box is selected, it shows as "License Not Used" until, you enable the VMotion option for specific vSwitch

 14. How the Virtual Machineort group communication works ? 
     All the vm's which are configured in VM Port Group are able to connect to the physical machines on the network. So this port group enables communication between vSwitch and Physical Switch to connect vm's to Physical Machine's


15. What is a VLAN ?
     A VLAN is a logical configuration on the switch port to segment the IP Traffic. For this to happen, the port must be trunked with the correct VLAN ID.
16. Does the vSwitches support VLAN Tagging? Why?
     Yes, The vSwitches support VLAN Tagging, otherwise if the virtual machines in an esx host are connected to different VLANS, we need to install a separate physical nic (vSwitch) for every VLAN. That is the reason vmware included the VLANtagging for vSwitches. So every vSwitch supports upto 1016 ports, and BTW they can support 1016 VLANS if needed, but an ESX server doesn’t support that many VM’s. :)  


17. What is Promiscuous Mode on vSwitch ? What happens if it sets to Accept?
     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
     If the promiscuous mode set to Reject, the packets are sent to inteded port, so that the intended virtual machine was able to see the communication.

18. What is MAC address Changes ? What happens if it is set to Accept ?
When we create a virtual machine the configuration wizard generates a MAC address for that machine, you can see it in the .vmx (VM Config) file. If it doesn't matches with the MAC address in the OS this setting does not allow incoming traffic to the VM. So by setting Reject Option both MAC addresses will be remains same, and the incoming traffic will be allowed to the VM.


19. What is Forged Transmits ? What happens if it is set to Accept ?
When we create a virtual machine the configuration wizard generates a MAC address for that machine, you can see it in the .vmx (VM Config) file. If it doesn't matches with the MAC address in the OS this setting does not allow outgoing traffic from the VM. So by setting Reject Option both MAC addresses will be remains same, and the outgoing traffic will be allowed from the VM.


20. What are the core services of VC ?
VM provisioning , Task Scheduling and Event Logging


21. Can we do vMotion between two datacenters ? If possible how it will be?
Yes we can do vMotion between two datacenters, but the mandatory requirement is the VM should be powered off.


22. What is VC agent? and what service it is corresponded to? What are the minimum req's for VC agent installation ?
VC agent is an agent installed on ESX server which enables communication between VC and ESX server.
The daemon  associated with it is called vmware-hostd , and the service which corresponds to it is called as mgmt-vmware, in the event of VC agent failure just restart the service by typing the following command at the service console       

     " service mgmt-vmware restart " 
VC agent installed on the ESX server when we add it to the VC, so at the time of installtion if you are getting an error like " VC Agent service failed to install ", check the /Opt size whether it is sufficient or not.


23. How can you edit VI Client Settings and VC Server Settings ?
Click Edit Menu on VC and Select Client Settings to change VI settings
Click Administration Menu on VC and Select VC Management Server Configuration to Change VC Settings

24. What are the files that make a Virtual Machine  ?
     .vmx - Virtual Machine Configuration File
     .nvram - Virtual Machine BIOS
     .vmdk - Virtual Machine Disk file
     .vswp - Virtual Machine Swap File
     .vmsd - Virtual MAchine Snapshot Database
     .vmsn - Virtual Machine Snapshot file
     .vmss - Virtual Machine Suspended State file
     .vmware.log - Current Log File
     .vmware-#.log - Old Log file


25. What are the devices that can be added while the virtual Machine running
In VI 3.5 we can add Hard Disk and NIC's while the machine running.

In vSphere 4.0 we can add Memory and Processor along with HDD and NIC's while the machine running 


26. How to set the time delay for BIOS screen for a Virtual Machine?
Right Click on VM, select edit settings, choose options tab and select boot option, set the delay how much you want.


27. What is a template ?
We can convert a VM into Template, and it cannot be powered on once its changed to template. This is used to quick provisioning of VM's.


23. What to do to customize the windows virtual machine clone,?
copy the sysprep files to Virtual center directory on the server, so that the wizard will take the advantage of it.


24. What to do to customize the linux/unix virtual machine clone,?
VC itself includes the customization tools, as these operating systems are available as open source.


25. Does cloning from template happens between two datacenters ?
Yes.. it can, if the template in one datacenter, we can deploy the vm from that template in another datacenter without any problem.
26. What are the common issues with snapshots? What stops from taking a snapshot and how to fix it ?
If you configure the VM with Mapped LUN's, then the snapshot failed. If it is mapped as virtual then we can take a snapshot of it.
If you configure the VM with Mapped LUN's as physical, you need to remove it to take a snapshot.


27. What are the settings that are taken into to consideration when we initiate a snapshot ?
Virtual Machine Configuration (What hardware is attached to it)
State of the Virtual Machine Hard Disk file ( To revert back if needed)
State of the Virtual Machine Memory (if it is powered on)


28. What are the requirements for Converting a Physical machine to VM ?
An agent needs to be installed on the Physical machine
VI client needs to be installed with Converter Plug-in
A server to import/export virtual machines


29. What is VMWare consolidated backup ?
It is a backup framework, that supports 3rd party utilities to take backups of ESX servers and Virtual Machines. Its not a backup service.


30. To open the guided consolidation tool, what are the user requirements ?
The user must be member of administrator, The user should have "Logon as service" privileges - To give a user these privileges,open local sec policy, select Logon as service policy and add the user the user should have read access to AD to send queries


How to boot a Windows VM into Safe Mode in ESX

How to boot a Windows VM into Safe Mode in ESX

Information:
1)      Right Click the VM
2)      Select Edit Settings
a.       Click Options
b.      Select Boot Options
c.       Set the Power-on Boot Delay to 5000ms (5 seconds)
d.      Now the VM will display the BIOS VMWare bios screen for 5 seconds, giving you enough time to click the VM and press F8
3)      Open the console window for the VM. Start the boot process.
4)      Click the console with the mouse to gain focus.
5)      Wait until the VMWare boot screen appears. 

6)      Before the counter reaches 0:00 press the F8 key and don't let up until the Windows Advanced Options Menu appears which will allow selecting the Safe Mode or other options.

Sunday, November 20, 2016

VNC in Linux

VNC server config I am trying to configure VNC server following instructions below VNC Server configuration Setting up VNC server in RHEL or Fedora. 1. up2date vnc-server (RHEL) or yum install vnc-server (Fedora) if you don't have it installed. 2. Edit /etc/sysconfig/vncservers as root. Uncomment the line: VNCSERVERS="1:put_the_user_you_will_log_in_as_here" The server will default to the resolution of the machine, so if you are going to connect to a desktop with a high resolution monitor from a laptop you will want to uncomment and set the following line also: VNCSERVERARGS[1]="-geometry 1024x768" 3. chkconfig vncserver on 4. su to the user that you will be logging in as. 5. Run vncpasswd and set the password. 6. Now run vncserver. This will create the needed initialization files. 7. Edit /home/user/.vnc/xstartup and uncomment the two lines there to get a normal desktop when you log in. 8. Now kill the Xvnc task and delete the lock files in the .vnc directory 9. service vncserver start (there might be some other lock files you need to delete; I can't remember now - check any error messages here) 10. Unfirewall 5901 tcp to allow remote connections 11. Connect from the remote machine using servername:1 To attach to the session that is running on the monitor of the machine - the session of currently logged in local user, use krfb (on the server) and krdc (on the client) for KDE, and vino for Gnome. --------------------------------------------------------------------------- I am unable to execute step 7: Edit /home/user/.vnc/xstartup and uncomment the two lines there to get a normal desktop when you log in. If I go under /home directory - I do not see any thing their. It is blank. How will I be able to implement step7. I am totally a windows person and newbie to Linux

Mount Windows CDROM in Linux

Make sure your have samba configured and running smbmount //192.188.101.133/D /mnt/cd -o username=mpasha,workgroup=saudilighting,password=userpwd

Get Tape Serial Num in Linux

[root@vmbackup dev]# sg_inq /dev/st0 standard INQUIRY: PQual=0 Device_type=1 RMB=1 \[ANSI_version=3] version=0x03 \[AERC=0] \[TrmTsk=0] NormACA=0 HiSUP=0 Resp_data_format=2 SCCS=0 ACC=0 ALUA=0 3PC=0 Protect=0 BQue=0 EncServ=0 MultiP=0 MChngr=0 \[ACKREQQ=0] Addr16=1 \[RelAdr=0] WBus16=1 Sync=1 Linked=0 \[TranDis=0] CmdQue=0 Clocking=0x3 QAS=0 IUS=0 length=96 (0x60) Peripheral device type: tape Vendor identification: HP Product identification: Ultrium 2-SCSI Product revision level: F48D Product serial number: HUL3M04080

Forcefully unmount a Linux disk partition

How do I forcefully unmount a Linux disk partition? It happens many times you try to unmount a disk partition or mounted CD/DVD disk and if you try to unmount device, which is accessed by other users, then you will get error umount: /xxx: device is busy. However, Linux/FreeBSD comes with fuser command to kill forcefully mounted partition. Understanding device error busy error What happens basically, is that Linux / UNIX will not allow you to unmount a device that is busy. There are many reasons for this (such as program accessing partition or open file) , but the most important one is to prevent data loss. Try the following command to find out what processes have activities on the device/partition. If your device name is /dev/sdb1, enter the following command as root user: # lsof | grep '/dev/sda1' Output: vi 4453 vivek 3u BLK 8,1 8167 /dev/sda1Above output tells that user vivek has a vi process running that is using /dev/sda1. All you have to do is stop vi process and run umount again. As soon as that program terminates its task, the device will no longer be busy and you can unmount it with the following command: # umount /dev/sda1 Following disussion allows you to unmout device and partition forcefully using Linux commands. Linux fuser command to forcefully unmount a disk partition Suppose you have /dev/sda1 mounted on /mnt directory then you can use fuser command as follows: WARNING! These examples may result into data loss if not executed properly (see "Understanding device error busy error" for more information). Type the command to unmount /mnt forcefully: # fuser -km /mnt Where, -k : Kill processes accessing the file. -m : Name specifies a file on a mounted file system or a block device that is mounted. In above example you are using /mnt Linux umount command to unmount a disk partition You can also try umount command with –l option: # umount -l /mnt Where, -l : Also known as Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. This option works with kernel version 2.4.11+ and above only. If you would like to unmount a NFS mount point then try following command: # umount -f /mnt Where, -f: Force unmount in case of an unreachable NFS system Caution: Using these commands or option can cause data loss for open files; programs which access files after the file system has been unmounted will get an error.

Question 8 Explanation

Compartments are the primary building blocks you use to organize your cloud resources. You use compartments to organize and isolate your res...