new notes

66
Windows PowerShell Interview questions SharePoint 2010 Q. What is Windows Powershell ? Ans. Windows PowerShell is a new Windows command-line shell designed especially for system administrators. In the SharePoint administration context, Windows PowerShell is another administration tool that supersedes the existing Stsadm.exe. Q. How is Windows Powershell different from Stsadm ? Ans. Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. In addition to that it also gives you access to the file system on the computer so that you can access registry,digital signature certificate etc.. Q. What are cmdlet's? Ans. Windows PowerShell introduces the concept of a cmdlet which are simple build in commands, written in a .net language like C# or VB. Q. Can you Create PowerShell scripts for deploying components in SharePoint ? Ans. If you are creating a webpart with VS 2010 then you can deploy it using ctrl + f5. However, to activate the webpart feature you can write a powershell script (.ps1) and execute it after dpeloyment. Q. Where is Powershell located in sharePoint ? Ans. On the Start menu, click All Programs -> Click Microsoft SharePoint 2010 Products -> Click SharePoint 2010 Management Shell. Q. If you need going to install a webpart or any custom solution in SharePoint 2010 using PowerShell What permissions do you need? Ans. In order to use Windows PowerShell for SharePoint 2010 Products, a user must be a member of the SharePoint_Shell_Access role on the configuration and content database. In addition to this, the user must also be a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed. See Details Permissions for Windows PowerShell - SPShellAdmin Q. How to list all the commands in PowerShell ? Ans. Get-Command * commands gets you all the Powershell commands. For more commands see Here

Upload: shivakumar-s-kadakal

Post on 25-Nov-2015

20 views

Category:

Documents


5 download

DESCRIPTION

New Notes

TRANSCRIPT

Windows PowerShell Interview questions SharePoint 2010Q. What is Windows Powershell ?Ans. Windows PowerShell is a new Windows command-line shell designed especially for system administrators. In the SharePoint administration context, Windows PowerShell is another administration tool that supersedes the existing Stsadm.exe.

Q. How is Windows Powershell different from Stsadm ?Ans. Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. In addition to that it also gives you access to the file system on the computer so that you can access registry,digital signature certificate etc..Q. What are cmdlet's?

Ans. Windows PowerShell introduces the concept of a cmdlet which are simple build in commands, written in a .net language like C# or VB.

Q. Can you Create PowerShell scripts for deploying components in SharePoint ?

Ans. If you are creating a webpart with VS 2010 then you can deploy it using ctrl + f5. However, to activate the webpart feature you can write a powershell script (.ps1) and execute it after dpeloyment.

Q. Where is Powershell located in sharePoint ?

Ans. On the Start menu, click All Programs -> Click Microsoft SharePoint 2010 Products -> Click SharePoint 2010 Management Shell.

Q. If you need going to install a webpart or any custom solution in SharePoint 2010 using PowerShell What permissions do you need?

Ans. In order to use Windows PowerShell for SharePoint 2010 Products, a user must be a member of the SharePoint_Shell_Access role on the configuration and content database. In addition to this, the user must also be a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed. See DetailsPermissions for Windows PowerShell - SPShellAdmin

Q. How to list all the commands in PowerShell ?

Ans. Get-Command * commands gets you all the Powershell commands. For more commands see Here

An A-Z Index of Windows PowerShell 2.0 commandsa Get-Acl Get permission settings for a file or registry key Set-Acl Set permissions Active Directory Account, Computer, Group and User cmdlets Get-Alias gal Return alias names for Cmdlets Import-Alias ipal Import an alias list from a file New-Alias nal Create a new alias. Set-Alias sal Create or change an alias Get-AuthenticodeSignature Get the signature object associated with a file Set-AuthenticodeSignature Place a signature in a .ps1 script or other fileb Begin Function BEGIN block BITS Background Intelligent Transfer Service cmdletsc Set-Location cd/chdir/sl Set the current working location Get-ChildItem dir/ls/gci Get child items (contents of a folder or registry key) Clear-Host clear/cls Clear the screen Clear-Item cli Remove content from a variable or an alias Get-Command gcm Retrieve basic information about a command Measure-Command Measure running time Trace-Command Trace an expression or command Add-Computer Add a computer to the domain Checkpoint-Computer Create a system restore point (XP) Remove-Computer Remove the local computer from a workgroup or domain Restart-Computer Restart the operating system on a computer Restore-Computer Restore the computer to a previous state Stop-Computer Stop (shut down) a computerReset-ComputerMachinePassword Reset the machine account password for the computer Test-ComputerSecureChannel Test and repair the secure channel to the domain Add-Content ac Add to the content of the item Get-Content cat/type/gc Get content from item (specific location) Set-Content sc Set content in the item (specific location) Clear-Content clc Remove content from a file/item Get-Command gcm Get basic information about cmdlets Invoke-Command icm Run command Enable-ComputerRestore Enable System Restore on a drive Disable-ComputerRestore Disable System Restore on a drive Get-ComputerRestorePoint Get the restore points on the local computer Test-Connection Ping one or more computers ConvertFrom-CSV Convert object properties (in CSV format) into CSV objects ConvertTo-CSV Convert .NET Framework objects into CSV variable-length strings ConvertTo-Html Convert the input into an HTML table ConvertTo-Xml Convert the input into XML ConvertFrom-SecureString Convert a secure string into an encrypted standard string ConvertTo-SecureString Convert an encrypted standard string into a secure string Copy-Item copy/cp/ci Copy an item from a namespace location Export-Counter Export Performance Counter data to log files Get-Counter Get performance counter data Import-Counter Import performance counter log files Get-Credential Get a security credential (username/password) Get-Culture Get region information (language and keyboard layout)d Get-ChildItem Dir/ls/gci Get child items (contents of a folder or registry key) Get-Date Get current date and time Set-Date Set system time on the host system Remove-Item Del/erase/rd/rm/rmdir Delete an item Compare-Object diff/compare Compare the properties of objects Do Loop while a condition is Truee End Function END block Get-Event Get events in the event queue Get-WinEvent Get events from event logs and event trace logs New-Event Create a new event Remove-Event Delete events from the event queue Unregister-Event Cancel an event subscription Wait-Event Wait until a particular event is raised Clear-EventLog Delete all entries from an event log Get-Eventlog Get event log data Limit-EventLog Limit the size of the event log New-Eventlog Create a new event log and a new event source Remove-EventLog Delete an event log Show-EventLog Display an event log Write-EventLog Write an event to an event log Get-EventSubscriber Get event subscribersRegister-EngineEvent Subscribe to powershell eventsRegister-ObjectEvent Subscribe to .NET events Register-WmiEvent Subscribe to a WMI event Get-ExecutionPolicy Get the execution policy for the shell Set-ExecutionPolicy Change the execution policy (user preference) Export-Alias epal Export an alias list to a file Export-Clixml Produce a clixml representation of powershell objects Export-Console Export console configuration to a file Export-Csv epcsv Export to Comma Separated Values (spreadsheet) Exit-PSSession Exit Exit Powershell (or exit a script)f ForEach-Object foreach Loop for each object in the pipeline ( % ) ForEach Loop through values in the pipeline For Loop through items that match a condition Format-Custom fc Format output using a customized view Format-List fl Format output as a list of properties, each on a new line Format-Table ft Format output as a table Format-Wide fw Format output as a table listing one property only Export-FormatData Save formatting data from the current session Get-FormatData Get the formatting data in the current sessiong Get-Item gi Get a file/registry object (or any other namespace object) Get-ChildItem dir/ls/gci Get child items (contents of a folder or registry key)h Get-Help help Open the help file Add-History Add entries to the session history Clear-History clhy Delete entries from the session history Get-History history/h/ghy Get a listing of the session history Invoke-History r/ihy Invoke a previously executed Cmdlet Get-Host Get host information (PowerShell Version and Region) Clear-Host clear/cls Clear the screen Read-Host Read a line of input from the host console Write-Host Write customized output to the host/screen Get-HotFix Get Installed hotfixesi if Conditionally perform a command Import-Clixml Import a clixml file and rebuild the PS object Import-Csv ipcsv Take values from a CSV list and send objects down the pipeline Invoke-Command Run commands on local and remote computers Invoke-Expression iex Run a PowerShell expression Get-Item gi Get a file object or get a registry (or other namespace) object Invoke-Item ii Invoke an executable or open a file (START) New-Item ni Create a new item in a namespace Remove-Item rm/del/erase/rd/ri/rmdir Remove an item Set-Item si Change the value of an item Clear-ItemProperty clp Remove the property value from a property Copy-ItemProperty cpp Copy a property along with it's value Get-ItemProperty gp Retrieve the properties of an object Move-ItemProperty mp Move a property from one location to another New-ItemProperty Set a new property Remove-ItemProperty rp Remove a property and its value Rename-ItemProperty rnp Renames a property at its location Set-ItemProperty sp Set a property at the specified location to a specified valuej Get-Job gjb Get PowerShell background jobs that are running Receive-Job rcjb Get PowerShell background job results Remove-Job rjb Delete a PowerShell background job Start-Job sajb Start a PowerShell background job Stop-Job spjb Stop a PowerShell background job Wait-Job wjb Wait for a background jobk Stop-Process kill/spps Stop a running processlUpdate-List Add and remove items from a collection Get-Location pwd / gl Get and display the current location Pop-Location popd Set the current working location from the stack Push-Location pushd Push a location to the stack Set-Location cd/chdir/sl Set the current working locationm Send-MailMessage Send an email message Add-Member Add a member to an instance of a PowerShell object Get-Member gm Enumerate the properties of an object Get-Module gmo Get the modules imported to the session Import-Module ipmo Add a module to the session New-Module nmo Create a new dynamic module (only in memory) Remove-Module rmo Remove a module from the current session Move-Item mv/move/mi Move an item from one location to anothero Compare-Object diff/compare Compare the properties of objects Group-Object group Group objects that contain the same value Measure-Object Measure the properties of an object New-Object Create a new .Net object Select-Object select Select properties of objects Sort-Object sort Sort objects by property value Where-Object Filter the objects passed along the command pipeline Out-Default Send output to default Out-File Send output to a file Out-GridView ogv Send output to an interactive table Out-Host oh Send output to the host Out-Null Send output to null Out-Printer lp Send the output to a printer Out-String Send objects to the host as stringsp Param Script Parameters Powershell Launch a powershell session Convert-Path cvpa Convert a ps path to a provider path Join-Path Combine a path and child-path Resolve-Path rvpa Resolves the wildcards in a path Split-Path Return part of a path Test-Path Return true if the path exists, otherwise return false Get-Pfxcertificate Get pfx certificate information Pop-Location popd Set the current working location from the stack Push-Location pushd Push a location to the stack Process Function PROCESS block Get-Process ps/gps Get a list of processes on a machine Debug-Process Attach a debugger to a running process Start-Process start/saps Start one or more processes Stop-Process kill/spps Stop a running process Wait-Process Wait for a process to stop Enable-PSBreakpoint ebp Enable a breakpoint in the current console Disable-PSBreakpoint dbp Disable a breakpoint in the current console Get-PSBreakpoint gbp Get the currently set breakpoints Set-PSBreakpoint sbp Set a breakpoint on a line, command, or variable Remove-PSBreakpoint rbp Delete breakpoints from the current console Get-PSDrive gdr Get drive information (DriveInfo) New-PSDrive mount/ndr Install a new drive on the machine Remove-PSDrive rdr Remove a provider/drive from its location Get-PSProvider Get information for the specified provider Set-PSdebug Turn script debugging on or off Enter-PSSession etsn Start an interactive session with a remote computer Exit-PSSession exsn End an interactive session with a remote computer Export-PSSession epsn Import commands and save them in a PowerShell module Get-PSSession gsn Get the PSSessions in the current session Import-PSSession ipsn Import commands from another session New-PSSession nsn Create a persistent connection to a local or remote computer Remove-PSSession rsn Close PowerShell sessions Disable-PSSessionConfiguration Deny access to PS session configuration Enable-PSSessionConfiguration Enable PS session configuration Get-PSSessionConfiguration Get the registered PS session configuration Register-PSSessionConfiguration Create and register a new PS session configuration Set-PSSessionConfiguration Change properties of a registered session configuration Unregister-PSSessionConfiguration Delete registered PS session configuration New-PSSessionOption Advanced options for a PSSession Add-PsSnapIn asnp Add snap-ins to the console Get-PsSnapin gsnp List PowerShell snap-ins on this computer Remove-PSSnapin rsnp Remove PowerShell snap-ins from the consoleq Quest AD cmdlets Read and write to Active Directoryr Get-Random Get a random number Read-Host Read a line of input from the host console Remove-Item rm/del/erase/rd/ri/rmdir Remove an item Rename-Item ren/rni Change the name of an existing item Rename-ItemProperty Rename a property of an item Run/Call & Run a command (call operator)s Select-Object select Select properties of objects Select-XML Find text in an XML string or document Send-MailMessage Send an email message Get-Service gsv Get a list of services New-Service Create a new service Restart-Service Stop and then restart a service Resume-Service Resume a suspended service Set-Service Change the start mode/properties of a service Start-Service sasv Start a stopped service Stop-Service spsv Stop a running service Suspend-Service Suspend a running service Sort-Object sort Sort objects by property value Set-StrictMode Enforce coding rules in expressions & scripts Start-Sleep sleep Suspend shell, script, or runspace activity Switch Multiple if statements ConvertFrom-StringData Convert a here-string into a hash table Select-String Search through strings or files for patternst Tee-Object tee Send input objects to two places New-Timespan Create a timespan object Trace-Command Trace an expression or command Get-Tracesource Get components that are instrumented for tracing. Set-Tracesource Trace a PowerShell component Start-Transaction Start a new transaction Complete-Transaction Commit the transaction Get-Transaction Get information about the active transaction Use-Transaction Add a command or expression to the transaction Undo-Transaction Roll back a transaction Start-Transcript Start a transcript of a command shell session Stop-Transcript Stop the transcription process Add-Type Add a .NET Framework type to a PowerShell session Update-TypeData Update extended type configurationu Get-Uiculture Get the ui culture information Get-Unique gu Get the unique items in a collection Update-Formatdata Update and append format data files Update-Typedata Update the current extended type configurationv Clear-Variable clv Remove the value from a variable Get-Variable gv Get a powershell variable New-Variable nv Create a new variable Remove-Variable rv Remove a variable and its value Set-Variable set/sv Set a variable and a valuew New-WebServiceProxy Create a Web service proxy object Where-Object where/? Filter input from the pipeline Where Filter objects from the pipeline While Loop while a condition is True Write-Debug Write a debug message to the host display Write-Error Write an object to the error pipeline Write-Host Write customized output to the host/screen Write-Output write/echo Write an object to the pipeline Write-Progress Display a progress bar Write-Verbose Write a string to the host's verbose display Write-Warning Write a warning message Set-WmiInstance Create or update an instance of an existing WMI class Invoke-WmiMethod iwmi Call WMI methods Get-WmiObject gwmi Get WMI class information Remove-WmiObject rwmi Delete an instance of a WMI class Connect-WSMan Connect to the WinRM service on a remote computer Disconnect-WSMan Disconnect from the WinRM service on a remote computer Test-WSMan Test whether the WinRM service is running Invoke-WSManAction Invoke an action on a specified object Disable-WSManCredSSP Disable Credential Security Service Provider (SSP) authentication Enable-WSManCredSSP Enable Credential SSP authentication Get-WSManCredSSP Get the Credential SSP configuration New-WSManInstance Create a new instance of a management resource Get-WSManInstance Display management information (XML or value) Set-WSManInstance Modify the management information related to a resourceRemove-WSManInstance Delete a management resource instance Set-WSManQuickConfig Configure the local computer for remote management New-WSManSessionOption Options for WSMan commands # Comment / Remark . (source) Run a command script in the current shell & (call) Run a command script % Alias for ForEach-Object ? Alias for Where-Object $variable = "value" Define a variable also: ${n!a#me} = "value" @(...) Force an expression to be evaluated as an arrayVMware Interview Questions and answers: Difference between Clone and Template:- CloneTemplate

Clone creates an exact copy of a running Virtual Machine at the time of cloning processTemplate acts as a baseline image with the predefined configuration as per organization standards

Cloning a virtual machine creates a exact duplicate copy of the virtual machine with the same configuration and installed software without performing any additional settings.Create a template to create a master image of a virtual machine from which you can deploy multiple virtual machines

You can create a clone of existing installed and Configured running virtual machine by right clicking the VM and Clone.You can create a template by converting a virtual machine to a template, cloning a virtual machine to a template, or cloning another template

VM clones are best suited in test and development environments where you want to create, test and work with exact copies of production servers without disturbing production servers by creating clone of the production virtual machine.Templates are best suited for production environments where you want the mass deployment of virtual machines along with the installed OS and basic software, configured policy as per the security policy of your organization as a base Machine. Once template is deployed, you can install software depend on the role of the server like IIS,Database

VM Clones are not suited for mass deployment of Virtual MachinesTemplates are best suited for Mass Deployment of Virtual Machines

We Cannot Convert back the Cloned MachineYou can convert the template back to virtual machine to update the base template with the latest released patches and updates and to install or upgrade any software and again convert back to template to be used for deployment of virtual machines with latest patches.

Cloned Virtual Machine Can be powered onTemplates cannot be powered on

You cannot Clone a Virtual Machine if you have connected directly to ESX/ESXi host using vSphere ClientYou cannot create a template of a Virtual Machine if you have connected directly to ESX/ESXi host using vSphere Client

You can customize the guest operating system of the clone to change the virtual machine name, network settings, and other properties. This prevents conflicts that can occur if a virtual machine and a clone with identical guest operating system settings are deployed simultaneously.You can also Customize the guest operating system while deploying from template

Clone of a virtual machine can be created when the virtual machine is powered onConvert virtual Machine to template cannot be performed, when Virtual machine is powered on. Only Clone to Template can be performed when VM is powered on

What is the difference between VMware ESX and VMware ESXi?VMware ESX and VMware ESXi are both bare-metal hypervisors that install directly on the server hardware. Both provide industry-leading performance and scalability; the difference resides in the architecture and the operational management of VMware ESXi. Although neither hypervisor relies on an OS for resource management, VMware ESX relies on a Linux operating system, called the service console, to performtwo management functions: executing scripts and installing third party agents for hardware monitoring, backup or systems management. The service console has been removed from ESXi, drastically reducing the hypervisor footprint and completing the ongoing trend of migrating management functionality from the local command line interface to remote management tools. The smaller code base of ESXi represents a smaller attack surface and less code to patch, improving reliability and security. The functionally of the service console is replaced by remote command line interfaces and adherence to system management standardsHow is VMware ESXi different than VMware vSphere?VMware ESXi is a hypervisor that partitions a physical server into multiple virtual machines.VMware vSphere is the industrys first cloud operating system that drastically reduces ongoing costs and increases control over delivery of service levels while still preserving the flexibility to choose between any type of OS, application and hardware architecture. VMware vSphere offers organizations high availability and centralized management functionality that span across multiple ESXi hosts such as live migration, protection against hardware failures, power management, and automatic load balancing. VMware vSphere relies on a hypervisor to partition servers. Customers can choose to deploy either VMware ESX or VMware ESXi as part of the VMware vSphere suite. All the functionality of VMware vSphere is supported on both VMware ESX and VMware ESXi. In fact, VMware vSphere supports server resource pools that contain both hypervisors.How do I use VMware vCenter Server to manage my VMware ESXi hosts?VMware vCenter Server provides centralized management for ESXi hosts and their virtual machines. To manage an ESXi host with vCenter Server, you must have a vCenter Server Agent license, which is included in all editions of VMware vSphereWhat is the difference between VMware ESXi and VMware Server?VMware ESXi is an enterprise-class hypervisor that offers a bare-metal architecture for near-native performance, features like memory de-duplication to increase consolidation ratios and a cluster file system for managing VM files on shared storage. VMware ESXi and VMware ESX are the critical foundations for a dynamic and flexible virtual infrastructure.VMware Server installs as an application on Windows or Linux, relying on the operating system for resource management. This limits the performance and scalability. VMware Server is popular for test and development activities. Virtual machines created using VMware Server can run on VMware ESXi, but they must first be converted using the free VMware Converter.Is it possible to download a virtual appliance into an ESXi environment for evaluation?Yes. If you are running VMware vSphere Client 2.5 and later along with ESXi 3.5 or ESX 3.5 or later, it is possible to access a list of downloadable virtual appliances for evaluation into an ESXi environment. To access that list of virtual appliances, open your VMware vSphere client, select "Virtual Appliance" from the file menu, and then select "Import...". When you select Import from the VMware Virtual Appliance Marketplace and click Next, you will be sent to a page where you can download the appliancesHow do I use VMware vCenter Server to manage my VMware ESXi hosts?VMware vCenter Server provides centralized management for ESXi hosts and their virtual machines. To manage an ESXi host with vCenter Server, you must have a vCenter Server Agent license, which is included in all editions of VMware vSphere.VMware 4.1 Questions & answer:-1. What is HA?VMware HA delivers the availability needed by many applications running in virtual machines, independent of the operating system and application running in it. VMware HA provides uniform, cost-effective failover protection against hardware and operating system failures within your virtualized IT environment. Monitors virtual machines to detect operating system and hardware failures. Restarts virtual machines on other physical servers in the resource pool without manual intervention when server failure is detected. Protects applications from operating system failures by automatically restarting virtual machines when an operating system failure is detected.

2. How HA works?VMware HA continuously monitors all servers in a resource pool and detects server failures. An agent placed on each server maintains a heartbeat with the other servers in the resource pool and a loss of heartbeat initiates the restart process of all affected virtual machines on other servers. VMware HA ensures that sufficient resources are available in the resource pool at all times to be able to restart virtual machines on different physical servers in the event of server failure. Restart of virtual machines is made possible by the Virtual Machine File System (VMFS) clustered file system which gives multiple ESX Server instances read-write access to the same virtual machine files, concurrently. VMware HA is easily configured for a resource pool through VirtualCenter.Key Features of VMware HA

Automatic detection of server failures. Automate the monitoring of physical server availability. HA detects server failures and initiates the virtual machine restart without any human intervention. Resource checks. Ensure that capacity is always available in order to restart all virtual machines affected by server failure. HA continuously monitors capacity utilization and reserves sparecapacity to be able to restart virtual machines. Automatic restart of virtual machines. Protect any application with automatic restart in a different physical server in the resource pool. Intelligent choice of servers (when used with VMware Distributed Resource Scheduler (DRS)). Automate the optimal placement of virtual machines restarted after server failure.The VMware HA SolutionWith VMware HA, a set of ESX Server hosts is combined into a cluster with a shared pool of resources. VMware HA monitors all hosts in the cluster. If one of the hosts fails, VMware HA immediately responds by restarting each affected virtual machine on a different host.

Using VMware HA has a number of advantages: Minimal setup and startup. The New Cluster wizard is used for initial setup. Hosts and new virtual machines can be added using the Virtual Infrastructure Client. Reduced hardware cost and setup. In a traditional clustering solution, duplicate hardware and software must be available, and the components must be connected and configured properly. When using VMware HA clusters, you must have sufficient resources to accommodate the number of hosts for which you want to guarantee failover. However, the VirtualCenter Server takes care of all other aspects of the resource management. VMware HA "democratizes" high availability by making it available and cost-justifiable for any application, regardless of hardware and operating system platform. VMware HA is focused on hardware failure, not on operating system or software failure. If you need greater levels and guarantees of availability to handle those situations, you can consider using both VMware HA and traditional high availability approaches together.

VMware HA FeaturesUsing a cluster enabled for VMware HA provides the following features: Automatic failover is provided on ESX Server host hardware failure for all running virtual machines within the bounds of failover capacity.VMware HA provides automatic detection of server failures and initiates the virtual machine restart without any human intervention. VMware HA can take advantage of DRS to provide for dynamic and intelligent resource allocation and optimization of virtual machines after failover. After a host has failed and virtual machines have been restarted on other hosts, DRS can provide further migration recommendations or migrate virtual machines for more optimum host placement andbalanced resource allocation. VMware HA supports easy-to-use configuration and monitoring using VirtualCenter. HA ensures that capacity is always available (within the limits of specified failover capacity) in order to restart all virtual machines affected by server failure (based on resource reservations configured for the virtual machines.) HA continuously monitors capacity utilization and "reserves" spare capacity to be able to restart virtual machines. Virtual Machines can fully utilize spare failover capacity when there hasn't been a failure.

3. What is DRS?

Align Resources to Meet Business NeedsVMware DRS continuously monitors utilization across resource pools and intelligently aligns resources with business needs, enabling us to: Dynamically allocate IT resources to the highest priority applications. Create rules and policies to prioritize how resources are allocated to virtual machines. Give IT autonomy to business organizations. Provide dedicated IT infrastructure to business units while still achieving higher hardware utilization through resource pooling. Empower business units to build and manage virtual machines within their resource pool while giving central IT control over hardware resources.

Balance Your Computing CapacityVMware DRS continuously balances computing capacity in resource pools to deliver the performance, scalability and availability not possible with physical infrastructure. VMware DRS allows us to: Improve service levels for all applications. VMware DRS continuously balance capacity will ensure that each virtual machine has access to appropriate resources at any point in time. Easily deploy new capacity. VMware DRS will seamlessly take advantage of the additional capacity of new servers added to a resource pool by redistributing virtual machines without system disruption. Automate planned server maintenance. VMware DRS can automatically migrate all virtual machines off physical servers to enable scheduled server maintenance with zero downtime. Dramatically increase system administrator productivity. Enable system administrators to monitor and effectively manage more IT infrastructure.

Reduce Energy Consumption in the DatacenterVMware Distributed Power Management (DPM) continuously optimizes power consumption in the datacenter. When virtual machines in a DRS cluster need fewer resources, such as during nights and weekends, DPM consolidates workloads onto fewer servers and powers off the rest to reduce power consumption. When virtual machine resource requirements increase (such as when users log into applications in the morning), DPM brings powered-down hosts back online to ensure service levels are met.VMware Distributed Power Management allows IT organizations to: Cut ongoing power and cooling costs by up to 20% in the datacenter during low utilization time periods. Automate management of energy efficiency in the datacenterVMware DRS (with DPM) is included in the VMware vSphere Enterprise and Enterprise Plus edition. DRS and DPM leverage VMware vMotion (live migration) to balance load and optimize power consumption with no downtime. FeaturesThe following is a list of the key features of VMware DRS. Aggregation of physical server resources. Manage CPU and memory across a group of physical servers as a uniform shared pool of resources. Flexible hierarchical organization. Organize resource pools hierarchically to match available IT resources to the business organization. VMware DRS ensures that resource utilization is maximized while business units retain control and autonomy of their infrastructure. Resource pools can be flexibly added, removed, or reorganized as business needs or organization change. Priority Settings. Assign priorities in the form of shares or reservations to virtual machines within resource pools and to sub resource pools to reflect business priorities. For example, the production sub resource pool can have higher shares of the total resources in a cluster and business critical applications within the production resource pool can have fixed guarantees(reservations) of CPU bandwidth and memory, Management of sets of virtual machines running a distributed application. Optimize the service level of distributed applications by controlling the aggregate allocation of resources for the entire set of virtual machines running the distributed application. Affinity Rules. Create rules that govern placement of virtual machines on physical servers. For example, a group of virtual machines can be set to always run on the same server for performance reasons. Alternatively, certain virtual machines can be set to always run on different servers to increase availability. New in vSphere 4.1 is the ability to restrict placement of virtual machines to a group of physical servers in a cluster. This is useful for controlling the mobility of virtual machines that run software licensed for a specific group of physical servers. In addition, this feature can be used to keep sets of virtual machines on different racks or blade systems for availability reasons. Power Management. Reduce energy consumption in the datacenter by using the Distributed Power Management (DPM) feature of DRS to consolidate workloads and power off servers when they are not needed by the virtual machines in the cluster. When resource requirements of virtual machines increase, DPM brings hosts back online so service levels can be met. Manual and Automatic Mode. VMware DRS collects resource usage information from servers and virtual machines, and then generates recommendations to optimize virtual machine allocation. These recommendations can be executed automatically or manually. o Initial placement. When a virtual machine is first powered on, VMware DRS either automatically places the virtual machine on the most appropriate physical server or makes a recommendation. o Continuous optimization. VMware DRS continuously optimizes resource allocations based on defined resource allocation rules and resource utilization. The resource allocation changes can be automatically executed by performing live migration of virtual machines through vMotion. Alternatively, in manual mode, VMware DRS provides execution recommendations for system administrators. Maintenance mode for servers. Perform maintenance on physical servers without disruption to virtual machines and end users. When a physical server is placed in maintenance mode, VMware DRS identifies alternative servers where the virtual machines can run. Based on automation mode settings, the virtual machines are either automatically moved to use the alternative servers, or the system administrator performs the move manually using the VMware DRS recommendations as a guideline. Large-scale management. Manage CPU and memory across up to 32 servers and 1280 virtual machines per DRS cluster.

4. What is vMotion?Experience Game-changing Virtual Machine MobilityVMware vMotion technology, leverages the complete virtualization of servers, storage and networking to move an entire running virtual machine instantaneously from one server to another. VMware vMotion uses VMwares cluster file system to control access to a virtual machines storage. During a vMotion, the active memory and precise execution state of a virtual machine is rapidly transmitted over a high speed network from one physical server to another and access to the virtual machines disk storage is instantly switched to the new physical host. Since the network is also virtualized by the VMware host, the virtual machine retains its network identity and connections, ensuring a seamless migration process.

VMware vMotion allows you to: Perform live migrations with zero downtime, undetectable to the user. Continuously and automatically optimize virtual machines within resource pools. Perform hardware maintenance without scheduling downtime and disrupting business operations. Proactively move virtual machines away from failing or underperforming servers.

Reliably Manage Live Migrations with EaseBenefit from the reliability and manageability derived from a production-proven product used by thousands of customers for years. Live migration of virtual machines across your infrastructure is surprisingly simple with functionality that lets you: Perform multiple concurrent migrations to continuously optimize a virtual IT environment. Identify the optimal placement for a virtual machine in seconds with a migration wizard providing real-time availability information. Migrate any virtual machine running any operating system across any type of hardware and storage supported by vSphere, including Fibre Channel SAN, NAS and iSCSI SAN. Prioritize live migrations to ensure that mission-critical virtual machines maintain access to the resources they need. Schedule migrations to happen at pre-defined times, and without an administrators presence. Maintain an audit trail with a detailed record of migrations.

How Does VMware VMotion Work?

Live migration of a virtual machine from one physical server to another with VMware VMotion is enabled by threeunderlying technologies.

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 installations of VMware 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.

Key Features of vMotion.

Reliability.Proven by thousands of customers in production environments since 2004, VMotion continues to set the standard for the most dependable live migration capabilities.

Performance.Perform live migrations with downtime unnoticeable to the end users. Optimal use of CPU and network resources ensures that the live migrations occur quickly and efficiently.

Interoperability.Migrate virtual machines running any operating system across any type of hardware and storage supported by VMware ESX. Support for Fibre Channel SAN.Implement live migration of virtual machines utilizing a wide range of up to 4GB Fibre Channel SAN storage systems. NAS and iSCSI SAN support. Implement live migration of virtual machines with lower-cost,more easily managed shared storage. Customizable CPU compatibility settings. Ensure that virtual machines can be migrated across differentversions of hardware. Enable virtual machines to benefit from the latest CPU innovations. New - Enhanced VMotion Compatibility. Live migrate virtual machines across different generations ofhardware. Migrate virtual machines from older servers to new ones without disruption or downtime.

Manageability Migration wizard.Quickly identify the best destination for a virtual machine using real-time information provided by migration wizard. Multiple concurrent migrations.Perform multiple concurrent migrations to continuously optimize virtual machine placement across the entireIT environment. Priority levels.Assign a priority to each live migration operation to ensure that the most important virtual machines always have access to the resources they need. Scheduled migration tasks.Automate migrations to happen at pre-defined times, and without an administrators presence. Migration audit trail.Maintain a detailed record of migration operations, including date/time and the administrators responsible for initiating them.

5. What is VMware Storage VMotion?VMware Storage VMotion is a component of VMware vSphere that provides an intuitive interface for live migration of virtual machine disk files within and across storage arrays with no downtime or disruption in service. Storage VMotion relocates virtual machine disk files from one shared storage location to another shared storage location with zero downtime, continuous service availability and complete transaction integrity. Storage VMotion enables organizations to perform proactive storage migrations, simplify array migrations, improve virtual machinestorage performance and free up valuable storage capacity. Storage VMotion is fully integrated with VMware vCenter Server to provide easy migration and monitoring.

How is VMware Storage VMotion Used in the Enterprise?

Customers use VMware Storage VMotion to:

Simplify array migrations and storage upgrades.The traditional process of moving data to new storage is cumbersome, time-consuming and disruptive. With Storage VMotion, IT organizations can accelerate migrations while minimizing or eliminating associated service disruptions, making it easier, faster and more cost-effective to embrace new storage platforms and file formats, take advantage of flexible leasing models, retire older, hard-to-manage storage arrays and to conduct storage upgrades and migrations based on usage and priority policies. Storage VMotion works with any operating system and storage hardware platform supported by VMware ESX, enabling customers to use a heterogeneous mixof datastores and file formats.

Dynamically optimize storage I/O performance.Optimizing storage I/O performance often requires reconfiguration and reallocation of storage, which can be ahighly disruptive process for both administrators and users and often requires scheduling downtime. With StorageVMotion, IT administrators can move virtual machine disk files to alternative LUNs that are properly configured todeliver optimal performance without the need for scheduled downtime, eliminating the time and cost associated with traditional methods.

Efficiently manage storage capacity.Increasing or decreasing storage allocation requires multiple manual steps, including coordination between groups, scheduling downtime and adding additional storage. This is then followed by a lengthy migration of virtual machine disk files to the new datastore, resulting in significant service downtime. Storage VMotion improves this process by enabling administrators to take advantage of newly allocated storage in a non-disruptive manner. Storage VMotion can also be used as a storage tiering tool by moving data to different types of storage platforms based the data value, performance requirements and storage costs.

How Does VMware Storage VMotion Work?

VMware Storage VMotion allows virtual machine storage disks to be relocated to different datastore locations with no downtime, while being completely transparent to the virtual machine or the end user.

Before moving a virtual machines disk file, Storage VMotion moves the home directory of the virtual machine to the new location. The home directory contains meta data about the virtual machine (configuration, swap and log files). After relocating the home directory, Storage VMotion copies the contents of the entire virtual machine storage disk file to the destination storage host, leveraging changed block tracking to maintain data integrity during the migration process. Next, the software queries the changed block tracking module to determine what regions of the disk were written to during the first iteration, and then performs a second iteration of copy, where those regions that were changed during the first iteration copy (there can be several more iterations).

Once the process is complete, the virtual machine is quickly suspended and resumed so that it can begin using the virtual machine home directory and disk file on the destination datastore location. Before VMware ESX allows the virtual machine to start running again, the final changed regions of the source disk are copied over to the destination and the source home and disks are removed.

This approach guarantees complete transactional integrity and is fast enough to be unnoticeable to the end user.

Key Features of VMware Storage VMotion

Complete transaction integrity.No interruption or downtime for users and applications during virtual machine storage disk migrations.

Interoperability.Storage VMotion can migrate storage disk files for virtual machines running any operating system across any type of hardware and storage supported by VMware ESX.

1) How we manage the licenses, i.e. timely updating licenses, briefly explain?

2) If we found HA issue, what are steps we should follow to resolve the issues?

To troubleshoot HA errors:

Note: Most of these troubleshooting steps are done on the ESX console. 1.Run this command to verify that host name is in lowercase and is fully qualified:

hostname

2.Run this command to verify that hostname is shortname only and is in lowercase:

hostname s

3.Run this command to verify that the correct service console IP is displayed:

hostname i

4.Verify that the host name in /etc/hosts is lowercase and both FQDN and shortname are present. 5.Verify that the search domain is present in the /etc/resolv.conf file and is in lowercase. 6.Verify that the host name in /etc/sysconfig/network is FQDN and is in lowercase. 7.Verify that the host name in the /etc/vmware/esx.conf file is FQDN and is in lowercase. 8.Verify that the system name returned by the uname -a command is in lowercase. 9.Verify that the host name is in your DNS server and is in lowercase. To do this, run these commands: a.nslookup

Where is the name of the host.

This command should return the service console IP.

b.nslookup

Where is the FQDN name of the host.

This command should return the service console IP.

c.nslookup

Where is the IP address of the host.

This command should return the FQDN of the host

10.Make sure the route for the service console is correct. To do this, from each host, ping the other hosts in the environment. 11.Verify that all primary service consoles have the same name. 12.Verify that all primary service consoles are in the same IP subnet. 13.If the vmkernel port group of vMotion is on same vSwitch as primary Service Console port group, add das.allowVmotionNetworks=1 to the advanced settings of HA. 14.If the host has multiple service consoles, add das.allowNetwork0 to the Advanced HA Settings of the cluster to ensure that only the primary service console is allowed. For more information, see Incompatible HA Networks appearing when attempting to configure HA (High Availability) (1006541). 15.Verify that you have the appropriate licenses available for HA. To do this, in LM Tools, perform a status enquiry and verify that you have VC_DAS licenses available. If you are unable to configure HA after verifying these troubleshooting steps: 1.Run this command on the ESX host to stop vpxa:

service vmware-vpxa stop

The host appears as not responding in the vCenter Server after a while.

2.Run these commands to uninstall aam: 1.rpm -qa | grep aam 2.rpm -e (package names output from command above) 3.rpm -e (other package names output from command above) 4.find / -name aam Note: Ensure to delete the directories listed by this command.

3.Disconnect the ESX host from the vCenter Server.4.Re-connect the host to the vCenter Server. This forces the VPXA package and the the HA packages to re-deploy.5.Re-configure all the hosts for HA.6.Upgrade to ESX 3.5 U4 or later and vCenter Server 2.5U4 or later.7.After upgrading, add das.bypassNetCompatCheck=true to the Advanced HA Settings of the cluster, if it continues to have issues.If your issue continues to exist after performing these steps, contact your network or storage administrator.3) Redundancy between NICs in an ESX server & how many minimum NICs required for esx

4) Minimum requirements for VMotion configure?

5) How licenses calculated/purchased for VMware environment?Mware View licensing comes in two versions: a bundled version (end-to-end solution) or an add-on. The bundled version is best used when you have a dedicated VMware vCenter cluster for your VDI environment. This licensing type allows you to run the number of VDI VMs you purchased and includes licenses for the VMware ESX hosts that you run the VDI VMs on. Licenses for the hosts are called VMware vSphere 4 for Desktops licenses. VMware vCenter Server desktop licenses are also included. Because a VMware View environment also has supporting servers, such as View Manager, vCenter Server, and any other connection broker or any management or performance monitoring

6) What are the partitions of an ESX server?Service Console Partitions and Sizes for Each ESX Server Host

Mount Point Partition Size Description

/dev/sda (Primary)

/boot ext3 250 MB Change for additional space for upgrades

N/A swap 1600 MB Change for maximum service console swap size

/ ext3 5120 MB Change for additional space in root

/dev/sda (Extended)

/var ext3 4096 MB Create partition to avoid overfilling root with log files

/tmp ext3 1024 MB Create partition to avoid overfilling root with temporary files

/opt ext3 2048 MB Create partition to avoid overfilling root with VMware HA log files

/home ext3 1024 MB Create partition to avoid overfilling root with agent / user files

vmkcore 100 MB Pre-configured

Free Space (Optional) Auto-configured and used for local VMFS-3 volume (needed for virtual machines running Microsofts Clustering Software.

7) Whether we need licenses for HA, DRS feature?Yes,

8) What should be the main reason for purple screen errors?Purple Screen of DeathA Purple Screen of Death as seen in VMware ESX Server 3.0 In the event of a hardware error, the vmkernel can 'catch' a Machine Check Exception.This results in an error message displayed on a purple console screen. This is colloquially known as a PSOD, or Purple Screen of Death.

Upon displaying a PSOD, the vmkernel writes debug information to the core dump partition. This information, together with the error codes displayed on the PSOD can be used by VMware support to determine the cause of the problem.

9) How to configure virtual switches & what is port-group & what is VLAN?This article describes the various VLAN tagging methods used with ESXi/ESX.

Virtual LAN (VLAN) implementation is recommended in ESXi/ESX networking environments because: It integrates ESXi/ESX into a pre-existing network It secures network traffic It reduces network traffic congestion iSCSI traffic requires an isolated networkhere are three methods of VLAN tagging that can be configured on ESXi/ESX: External Switch Tagging (EST) Virtual Switch Tagging (VST) Virtual Guest Tagging (VGT) External Switch Tagging (EST) All VLAN tagging of packets is performed on the physical switch. ESXi/ESX host network adapters are connected to access ports on the physical switch. The portgroups connected to the virtual switch must have their VLAN ID set to 0. For more information, see Sample Configuration - ESXi/ESX connecting to physical switch via VLAN access mode and External Switch VLAN Tagging (EST Mode) (1004127). See this example snippet of a code from a Cisco switch port configuration:

switchport mode accessswitchport access vlan xVirtual Switch Tagging (VST) All VLAN tagging of packets is performed by the virtual switch before leaving the ESXi/ESX host. The ESXi/ESX host network adapters must be connected to trunk ports on the physical switch. The portgroups connected to the virtual switch must have an appropriate VLAN ID specified. For more information, see Configuring a VLAN on a portgroup (1003825). For a sample of VST, see Sample configuration of virtual switch VLAN tagging (VST Mode) (1004074). See this example snippet of code from a Cisco switch port configuration:

switchport trunk encapsulation dot1qswitchport mode trunkswitchport trunk allowed vlan x,y,zspanning-tree portfast trunk Note: The Native VLAN is not tagged and thus requires no VLAN ID to be set on the ESXi/ESX portgroup.Virtual Guest Tagging (VGT) All VLAN tagging is performed by the virtual machine. You must install an 802.1Q VLAN trunking driver inside the virtual machine. VLAN tags are preserved between the virtual machine networking stack and external switch when frames are passed to/from virtual switches. Physical switch ports are set to trunk port. For more information, see Sample configuration of virtual machine (VM) VLAN Tagging (VGT Mode) in ESX (1004252). See this example snippet of code from a Cisco switch port configuration:

switchport trunk encapsulation dot1qswitchport mode trunkswitchport trunk allowed vlan x,y,zspanning-tree portfast trunk

10) Whether HA use VMotion or not?No, it requires DRS.

11) Whether DRS use VMotion or not?yes

12) What are processes & port numbers for virtual center, HA running in ESX?Ports and descriptions:80 Required for direct HTTP connections. Port 80 redirects requests to HTTPS port 443.443 - Listens for connections from the vSphere Client, vSphere Web Access Client, and other SDK clients. Open port 443 in the firewall to enable the vCenter Server system to receive data from the vSphere Client.

389 - This port is used for Lightweight Directory Access Protocol (LDAP) services. Who says LDAP, says Active Directory Services for the vCenter Server group.

636 SSL port of the local instance for vCenter Linked Mode. Its the port of the local vCenter Server ADAM Instance.

902 - Used to send data to managed hosts. To send data to your ESX or ESXi hosts. Also this port is used for remote console access to virtual machines from vSphere Client. This port must not be blocked by firewalls between the server and the hosts or between hosts.

902/903 - Used by the vSphere Client to display virtual machine consoles.8080 vCenter Management Webservices HTTP.8443 - Secure connections for vCenter Management Webservices HTTPS.60099 - Used to stream inventory object changes to SDK clients. Firewall rules for this port on the vCenter Server can be set to block all, except from and to localhosts if the clients are installed on the same host as the vCenter Server service.

--------Various services are installed when you deploy vCenter, in total 5 services are installed----------

1.VMware VirtualCenter Server: Heart of vCenter2.VMware mount service for VirtualCenter: used during cloning operation or while deploying from template3.VMware VirtualCenter management webservices: Web management services run on it.4.VMwareVCMSDS:ADAM services for linked mode5.VMware vCenter orchestrator configuration: use for vCenter orchestrator

13) In ESX2.5.2 how we take backups of vm files?

----------------------------------------------------------------------------------------------------------------------14) Explain the purpose of Redo log files?

-------------------------------------------------------------------------------------------------------------------------15) VM is not able to power off, how to trouble shoot d issues?

Powering off the virtual machine

To determine if you must use the command line, attempt to power off the virtual machine:1.Connect VMware Infrastructure (VI) Client to the Virtual Center Server. Right-click on the virtual machine and click Power off. 2.Connect VI Client directly to the ESX host. Right-click on the virtual machine and click Power off.

If this does not work, you must use the command line method. Determining the virtual machine's state1.Determine the host on which the virtual machine is running. This information is available in the virtual machine's Summary tab when viewed in the VI Client page. 2.Log in as root to the ESX host using an SSH client. 3.Run the following command to verify that the virtual machine is running on this host:

# vmware-cmd -l

The output of this command returns the full path to each virtual machine running on the ESX host. Verify that the virtual machine is listed, and record the full path for use in this process. For example:

# /vmfs/volumes///.vmx

4.Run the following command to determine the state in which the ESX host believes the virtual machine to be operating:

# vmware-cmd getstate

If the output from this command is getstate() = on, the VirtualCenter Server may not be communicating with the host properly. This issue must be addressed in order to complete the shutdown process.

If the output from this command is getstate() = off, the ESX host may be unaware it is still running the virtual machine. This article provides additional assistance in addressing this issue. Powering off the virtual machine while collecting diagnostic information using the vm-support script

Use the following procedure when you want to investigate the cause of the issue. This command attempts to power off the virtual machine while collecting diagnostic information. Perform these steps in order, as they are listed in order of potential impact to the system if performed incorrectly.

Perform these steps first: 1.Determine the WorldID with the command:

# vm-support -x

2.Kill the virtual machine by using the following command in the home directory of the virtual machine:

# vm-support -X

This can take upwards of 30 minutes to terminate the virtual machine.

Note: This command uses several different methods to stop the virtual machine. When attempting each method, the command waits for a pre-determined amount of time. The timeout value can be configured to be 0 by adding -d0 to switch to the vm-support command.If the preceding steps fail, perform the following steps for an ESX 3.x host:1.List all running virtual machines to find the VMID of the affected virtual machine with the command:

# cat /proc/vmware/vm/*/names

2.Determine the master world ID with the command:

# less -S /proc/vmware/vm/####/cpu/status

3.Scroll to the right with the arrow keys until you see the group field. It appears similar to:

Groupvm.####

4.Run the following command to shut the virtual machine down with the group ID:

# /usr/lib/vmware/bin/vmkload_app -k 9 ####If the preceding steps fail, perform the following steps for an ESX 4.x host:1.List all running virtual machines to find the vmxCartelID of the affected virtual machine with the command:

# /usr/lib/vmware/bin/vmdumper -l

2.Scroll through the list until you see your virtual machine's name. The output appears similar to:

vmid=5151 pid=-1 cfgFile="/vmfs/volumes/4a16a48a-d807aa7e-e674-001e4ffc52e9/mdineeen_test/vm_test.vmx" uuid="56 4d a6 db 0a e2 e5 3e-a9 2b 31 4b 69 29 15 19" displayName="vm_test" vmxCartelID=####

3.Run the following command to shut the virtual machine down with the vmxCartelID:# /usr/lib/vmware/bin/vmkload_app -k 9 ####Powering off the virtual machine using the vmware-cmd command

This procedure uses the ESX command line tool, and attempts to gracefully power off the virtual machine. It works if the virtual machine's process is running properly and is accessible. If unsuccessful, the virtual machine's process may not be running properly and may require further troubleshooting.1.From the Service Console of the ESX host, run the following command:

vmware-cmd stop

Note: is the complete path to the configuration file, as determined in the previous section. To verify that it is stopped, run the command:

# vmware-cmd getstate

2.From the Service Console of the ESX host, run the command:# vmware-cmd stop hard

Note: is the complete path to the configuration file, as determined in the previous section. To verify that it is stopped, run the command:

# vmware-cmd getstate

3.If the virtual machine is still inaccessible, proceed to the next section. Using the ESX command line to kill the virtual machine

If the virtual machine does not power off using the steps in this article, it has likely lost control of its process. You need to manually kill the process at the command line.

Caution: This procedure is potentially hazardous to the ESX host. If you do not identify the appropriate process id (PID), and kill the wrong process, it may have unanticipated results. If you are not comfortable with the following procedure, contact VMware Technical Support and open a Service Request. Please refer to this article when you create the SR.1.To determine if the virtual machine process is running on the ESX host, run the command:

# ps auxwww |grep -i .vmx

The output of this command appears similar to the following if the .vmx process is running:root 3093 0.0 0.3 2016 860 ? S< Jul30 0:17 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user -# name=VMware ESX Server;version=3.5.0;licensename=VMware ESX Server;licenseversion=2.0 build-158874; -@ pipe=/tmp/vmhsdaemon-0/vmx569228e44baf49d1; /vmfs/volumes/49392e30- 162037d0-17c6-001f29e9abec//.vmx

The process ID (PID) for this process is in bold. In this example, the PID is 3093. Take note of this number for use in the following steps. Caution: Ensure that you identify the line specific only to the virtual machine you are attempting to repair. If you continue this process for another virtual machine the one in question, you can cause downtime for the other virtual machine.If the .vmx process is listed, it is possible that the virtual machine has lost control of the process and that it must be stopped manually.

2.To kill the process, run the command:# kill

3.Wait 30 seconds and check for the process again. 4.If it is not terminated, run the command:

# kill -9

5.Wait 30 seconds and check for the process again. 6.If it is not terminated, the ESX host may need to be rebooted to clear the process. This is a last resort option, and should only be attempted if the preceding steps in this article are unsuccessful.

16) Why we use two different ports for licenses, and what r those port No.?27000 --- License transactions from ESX Server 3i to the license server (lmgrd.exe).|Outgoing TCP|27010 --- License transactions from ESX Server 3i to the license server (vmwarelm.exe).|Outgoing TCP|

17) VC server is not coming up, how to troubleshoot?

18) Difference between ESX3.5 & 4.0?

Features ESX 3.5ESX 4

Linked ModeNo Linked Mode SupportLinked Mode Support Introduced in vSphere 4.0

Host ProfilesNo Host ProfilesHost Profiles is Introduced in vSphere 4.0

Centralized LicenseRequire dedicated License serverLicense can be managed within vCenter server

Performance chartYesLot More enhancements

Events and Alarms YesLot More enhancements

Fault toleranceNot AvailableAvailable from vSphere 4.0

Storage VMotionSVMotion available only with CLISVMotion available in GUI

VMotionYesYes

Virtual CPUs per host192512

Virtual Machines per host170320

Logical processors per host3264

RAM per host256 GB1 TB

Maximum Service console Memory800 MB800 MB

DRSYesYes

VMware Data RecoveryBackup using VCB (VMware Consolidated backup)VMware Data Recovery and VCB support

Enhanced VMotion Compatibility (EVC)No EVCEVC is introduced in vSphere 4.0

VMware HA Admission Control Yes but without options to reservefailover capacityAdmission Control is improved to provide more flexible configuration options to reserve failover capacity.

High Availability Clustering with Windows Server 2000, 2003, 2008 Not AvailableAvailable in vSphere 4.0

Serial Attached SCSI (SAS) Not AvailableAvailable to support MSCS on win 2008

Hosts per storage volume3264

Fiber Channel paths to LUN3216

NFS Datastores3264

Hardware iSCSI initiators per host24

Virtual Machine Hot Add SupportNOYes

Number of virtual CPUs per virtual machine48

Virtual Hardware version47

RAM per virtual machine64 GB255 GB

virtual machine swap file Size65532MB255GB

VMDirectPath for Virtual MachinesNOYes

Vmkernel32 Bit64 bit

Service Console32 Bit64 bit

Concurrent remote console sessions1040

Virtual Disk Thin ProvisioningNo Thin ProvisioningThin Provisioning introduced in vSphere 4.0

VMware Paravirtualized SCSI (PVSCSI)Not availablehigh-performance storage adapters that offer greater throughput and lower CPU utilization for virtual machines

Hot Extend for Virtual DisksOnly Via VCLI using vmkfstoolsAvailable via GUI

Hot plug support for virtual devicesNoYes

VMXNET Generation 3 Not AvailableYes

vNetwork Distributed SwitchNot AvailableAvailable from vSphere with Enterprise Plus License

Private VLAN Support Not AvailableAvailable with DVSwitch

Network VmotionNot AvailableAvailable with DVSwitch

3rd Party Distributed Switch Support Not AvailableWe can use Cisco Nexus 1000v with DVSwitch

IPv6 SupportYesYes

NICs per VM410

Standard vSwitches per host127248

Virtual NICs per standard vSwitch10164088

8 way SMPNo Only 4 wayYes

Update ManagerYesYes

DPM ExperimentalFully supported with PMI and iLO Remote Power On

License TypesVMware Infrastructure FoundationVMware Infrastructure StandardVMware Infrastructure EnterprisevSphere EssentialsvSphere Essentials PlusvSphere StandardvSphere AdvancedvSphere EnterprisevSphere Enterprise Plus

vShield Zone Not SupportedSupported

19) Briefly describe about update Manager, is it possible to update the powered off vms by update manager?

20) Explain VMware Snapshot & what is d command to take a snapshot?

21) Suppose we have 3 port groups configured in a single Vswitch (connected to single physical NIC of the esx host) with 3 different VLANs so how d VMs from one VLAN will communicate to another VM of different VLAN?

22) What is d command to list all the running VMs & registered VMs?

Run the vm-support -x command to show which virtual machines are currently running on the ESX host.

Run the vmware-cmd -l command to display the names of the virtual machines registered on this host.

23) What is d command to list d HBAs?

esxcfg-scsidevs -a (-a|--hbas Print HBA devices with identifying information)

esxcfg-scsidevs -A (-A|--hba-device-list Print a mapping between HBAs and the devices it provides paths to.)

24) What r d P2V conversion processes/tools available, how we can perform d P2V of a Linux server with d help of CLI commands (in case no specific tools available)?Converting a powered on Windows operating system (P2V)Source Destination TCP Ports UDP Ports Notes

Converter server to Source computer 445, 139, 9089, 9090 137, 138 If the source computer uses NetBIOS, port 445 is not required. If NetBIOS is not being used, ports 137, 138, and 139 are not required. If in doubt, make sure that none of the ports are blocked.Note: Unless you have installed Converter server to the source computer, the account used for authentication to the source computer must have a password, the source computer must have network file sharing enabled, and it cannot be using Simple File Sharing. Converter server to VirtualCenter 443 Only required if the conversion target is VirtualCenter. Converter client to Converter server 443 Only required if a custom installation was performed and the Converter server and client portions are on different computers. Source computer to ESX 443, 902 If the conversion target is VirtualCenter then only port 902 is required.

Converting a powered on Linux operating system (P2V)Source Destination TCP Ports Notes Converter server to Source computer 22 The Converter server must be able to establish an SSH connection with the source computer. Converter client to Converter server 443 Only required if a custom installation was performed and the Converter server and client portions are on different computers. Converter server to VirtualCenter 443 Only required if the conversion target is VirtualCenter. Converter server to ESX 443, 902, 903 If the conversion target is VirtualCenter, only ports 902 and 903 are required. Converter server to Helper virtual machine 443 Helper virtual machine Source computer 22 The helper virtual machine must be able to establish an SSH connection with the source computer. By default the helper virtual machine gets its IP address assigned by DHCP. If there is no DHCP server available on the network chosen for the target virtual machine you must manually assign it an IP address.

Converting an existing virtual machine (V2V)Source Destination TCP Ports UDP Ports Notes

Converter server to File share path 445, 139 137, 138 This is only required for standalone virtual machine sources or destinations.

If the computer hosting the source or destination path uses NetBIOS, port 445 is not required. If NetBIOS is not being used, ports 137, 138, and 139 are not required. If in doubt, make sure that none of the ports are blocked. Converter client to Converter server 443 Only required if a custom installation was performed and the Converter server and client portions are on different computers. Converter server to VirtualCenter 443 Only required if the target is VirtualCenter. Converter server to ESX 443, 902 If the conversion target is VirtualCenter, only port 902 is required.

25) What is d command to check d status of a VM?vmware-cmd getstate

Retrieve the list of VMs in inventory with the following command:vmware-vim-cmd vmsvc/getallvms

[root@ESX-SRV-94 /]# vmware-vim-cmd vmsvc/getallvmsVmid Name File Guest OS Version Annotation160 VMVXP-1 [SAN-STORE-2] VMVXP-1/VMVXP-1.vmx winXPProGuest vmx-07240 Ubuntu [ESX-Storage-94-2] Ubuntu/Ubuntu.vmx ubuntuGuest vmx-07

Then query each VM with their VMID:vmware-vim-cmd vmsvc/power.getstate

For example:vmware-vim-cmd vmsvc/power.getstate 160

[root@ESX-SRV-94 /]# vmware-vim-cmd vmsvc/power.getstate 160Retrieved runtime infoPowered on

26) What is d command to rescan the HBAs?

esxcfg-rescan

27) How to find the world ID of a particular VM and what is d VMware proprietary command to kill the same?

vm-support -xesxcli vms vm list

List all running virtual machines on the system to see the World ID of the virtual machine you want tostop.esxcli vms vm list

2 Stop the virtual machine by running the following command.

esxcli vms vm kill --type --world-id

The command supports three --type options. Try the types sequentially (soft before hard, hard beforeforce). The following types are supported through the --type option:. soft Gives the VMX process a chance to shut down cleanly (like kill or kill -SIGTERM). hard Stops the VMX process immediately (like kill -9 or kill -SIGKILL). force Stops the VMX process when other options do not work.If all three options do not work, reboot your ESX/ESXi host to resolve the issue.

28) what is d command to add a route in esx to communicate to different network segment?

Configure the route using the command:

#route add -net 142.121.56.0 netmask 255.255.254.0 gw 224.58.175.1 Add the following line to /etc/rc.local so that route is set on boot:

#/sbin/route add -net 142.121.56.0 netmask 255.255.254.0 gw 224.58.175.1 To ensure the route holds on reboot, create an executable file.

To create an executable file:1.Login to the ESX host using a SSH client. 2.Change the directory to /etc/init.d . 3.Run this command to create a file called routes:

#vi routes

4.Add this code to the file:

##! /bin/bash # case "$1" in 'start') echo "Adding additional routes... "

/sbin/route add -net 172.31.3.0 netmask 255.255.255.0 gw 172.31.8.1; echo ;; *) echo "Usage: $0 { start }" ;; esac

5.Save the file and exit the vi editor.

6.Run this command to make the file executable:#chmod 777 routes

7.Change the directory to /etc/rc3.d. 8.Run this command to create a symbolic link to that file:#ln /etc/init.d/routes

9.Reboot the ESX host for the changes to take effect.

29) What is d default size of the swap partition & SC MEMORY?

1600MB SWAP, 400 MB (MAX 800MB)

30) How to increase SC memory after the esx build?

ESX Host 8GB RAM -> Default allocated Service Console RAM = 300MBESX Host 16GB RAM -> Default allocated Service Console RAM = 400MBESX Host 32GB RAM -> Default allocated Service Console RAM = 500MBESX Host 64GB RAM -> Default allocated Service Console RAM = 602MBESX Host 96GB RAM -> Default allocated Service Console RAM = 661MBESX Host 128GB RAM -> Default allocated Service Console RAM = 703MBESX Host 256GB RAM -> Default allocated Service Console RAM = 800MB

cp /etc/vmware/esx.conf /etc/vmware/esx.conf.oldcp /boot/grub/grub.conf /boot/grub/grub.conf.old/bin/sed -i -e s/272/800/ /etc/vmware/esx.conf/bin/sed -i -e s/512/800/ /etc/vmware/esx.conf/bin/sed -i -e s/272M/800M/ /boot/grub/grub.conf/bin/sed -i -e s/512M/800M/ /boot/grub/grub.conf/bin/sed -i -e s/277504/818176/ /boot/grub/grub.conf/bin/sed -i -e s/523264/818176/ /boot/grub/grub.conf

31) What r d port No. for Vmotion & VMware converter? ESX 4.x 8000 TCP ESX/ESXi Host (VM Target) TO ESX/ESXi Host (VM Source) VMotion Communication on VMKernel Interface ESX 4.x 8000 TCP ESX/ESXi Host (VM Source) TO ESX/ESXi Host (VM Target) VMotion Communication on VMKernel Interface

ESXi 4.x 8000 TCP ESX/ESXi Host (VM Target) TO ESX/ESXi Host (VM Source) VMotion Communication on VMkernel Interface ESXi 4.x 8000 TCP ESX/ESXi Host (VM Source) TO ESX/ESXi Host (VM Target) VMotion Communication on VMkernel Interface

Converter 4.x 22 TCP Helper Virtual Machine Source Computer to be converted Required for conversion of Linux-based source computers (data flows from source to VM)

Converter 4.x 22 TCP vCenter Converter Server Source Computer to be converted Required for conversion of Linux-based source computers

Converter 4.x 137 UDP vCenter Converter Server Source Computer to be converted For hot migration. Not required if the source computer does not use NetBIOS

Converter 4.x 138 UDP vCenter Converter Server Source Computer to be converted For hot migration. Not required if the source computer does not use NetBIOS

Converter 4.x 139 TCP vCenter Converter Server Source Computer to be converted For hot migration. Not required if the source computer does not use NetBIOS

Converter 4.x 443 TCP vCenter Converter Client vCenter Converter Server Only required if the Converter Client and Converter Server were installed on different systems

Converter 4.x 443 TCP Source Computer to be converted ESX/ESXi Host Required for destination VM access when target is ESX/ESXi/vCenter

Converter 4.x 443 TCP Source Computer to be converted vCenter Server Required if vCenter Server is the conversion target

Converter 4.x 443 TCP vCenter Converter Server vCenter Server Required if vCenter Server is the conversion target

Converter 4.x 443 TCP vCenter Converter Server ESX/ESXi Host Required for system conversion

Converter 4.x 443 TCP vCenter Converter Server Helper Virtual Machine Required for conversion of Linux-based source computers

Converter 4.x 445 TCP vCenter Converter Server Source Computer to be converted Required for system conversion. Not required if the source computer uses NetBIOS

Converter 4.x 902 TCP Source Computer to be converted ESX/ESXi Host Required for data transport during cloning of system to be converted to target ESX/ESXi Host

Converter 4.x 9089, 9090 TCP vCenter Converter Server Source Computer to be converted Required for system conversion. Remote agent deployment

32) How to create Vmkcore partition after the esx build?

using parted we can create vmkcore partition if there is free space availabe else first free up about 100MB space on disk by resizing the root or any other partion on the disk and then create new vmkcore partion with fc filesystem and reboot the host.

33) What r d agents will install, after adding an esx in VC server?

Vmware vcenter Agent

34) What r d port No. for VMware management service?

8080, 8443 VMware vCenter 4 Management Web Services - HTTP and HTTPS

35) What is d max No of VMs can run per host?320

36) What r all d files going to b create after a vm build?.vmx, .vmfx, .vmsd, .vmdk (when start 3 more files are created --- .log, vswp, .nvram)37) What r d location of VC server log files?C:\ProgramData\VMware\VMware VirtualCenter\Logs

38) What r d necessary log files in ESX server?

esx server logs

VMWare ESX Server Logs

1) Vmkernel

a. Location: /var/log/b. Filename: vmkernel c. This log records information related to the vmkernel and virtual machines

2) Vmkernel Warnings

a. Location: /var/log/b. Filename: vmkwarningc. This log records information regarding virtual machine warnings

3) Vmkernel Summarya. Location: /var/log/b. Filename: vmksummaryc. This log records information used to determine uptime and availability statistics for ESX Server. This log is not easily readable by humans, import into a spreadsheet or database for use.d. For a summary of the statistics in an easily viewed file, see vmksummary.txt

4) ESX Server Boot Log

a. Location: /var/logb. Filename: boot.logc. Log file of all actions that occurred during the ESX server boot.

5) ESX Server Host Aagent Log a. Location: /var/log/vmware/b. Filename: hostd.log c. Contains information on the agent that manages and configures the ESX Server host and its virtual machines (Search the file date/time stamps to find the log file it is currently outputting to).

6) Service Console

a. Location: /var/log/

b. Filename: messages

c. Contain all general log messages used to troubleshoot virtual machines on ESX Server.

7) Web Access

a. Location: /var/log/vmware/webAccess

b. Filename: various files in this location

c. Various logs on Web access to the ESX Server.

8) Authentication Log

a. Location: /var/log/

b. Filename: secure

c. Contains the records of connections that require authentication, such as VMware daemons and actions initiated by the xinetd daemon.

9) VirtualCenter HA Agent Log

a. Location: /var/log/vmware/aam/

b. Filename: aam_config_util_*.log

c. These files contain information about the installation, configuration, and connections to other HA agents in the cluster.

10) Virtual Center Agent

a. Location: /var/log/VMware/vpx

b. Filename: vpxa.log

c. Contains information on the agent that communicates with the VirtualCenter Server.

11) Virtual Machine Logs

a. Location: The same directory as the virtual machines configuration files are placed in.

b. Filename: vmware.log

c. Contains information when a virtual machine crashes or ends abnormally.

Virtual Center Installation Logs

1) The following install logs are located in the %TEMP% directory of the user that installed Virtual Center

a. vmlic.log i. Contains various test results for provided license file during the installation.b. redist.log i. Contains MDAC/MCAD QFE rollup installation information c. vmmsde.log i. Contains MSDE installation information d. vmls.log i. The License server installation log.e. vmosql.log i. The Virtual Center database creation log filef. vminst.log i. Virtual Center installation log fileg. VCDatabaseUpgrade.log i. Results on upgrading the VC Database.h. vmmsi.log i. The VI client installation log. Vpxd-0.log is a small log from the starting the client the first time.

Virtual Center Logs

1) Location: a. C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs

2) Name: vpxd-#.log (# is one digit, 0-9) a. vpxd-index contains the # of the currently active log file

3) Logs rotate each time vpxd is started, and also when it reaches 5 MB in size VI Client Logs1) Location: User %TEMP%\vpx2) Name: viclient-#.log (# is one digit, 0-9) 3) Logs rotate each time VI Client is started, and is should be used for client-specific diagnostics

Miscellaneous Logs

1) Core Dumpa. Location: %USERPROFILE%\Application Data\VMware

2) License Server Debug Loga. Location: %SystemRoot%\Tempb. Filename: lmgrd.log i. This file is overwritten each time the service startsc. This file contains various information about the license file and server.

3) Web Access (Tomcat) Logs

a. Location: C:\Program Files\VMware\Infrastructure\VirtualCenter Server\tomcat\logs

b. Filename: various files

c. All the Tomcat logs are here

esx-console logssysboot-vmkernel-boot.log , sysboot-dmesg-boot.log, sysboot-vmkernel-late.log, sysboot-dmesg-late.og, sysboot.log

cd /vmfs/volumes/ESX-Storage-94-1/esxconsole-4c44398f-4238-b888-226e-001e0bcd236a/logs/

Core-dump location

cd vmfs/volumes/ESX-Storage-94-1/esxconsole-4c44398f-4238-b888-226e-001e0bcd236a/core-dumps

39) What is ESXTOP command and how to use this command (with all the fields/options)?

Esxtop version 4.1.0Secure mode OffEsxtop: top for ESXThese single-character commands are available:

^L - redraw screenspace - update displayh or ? - help; show this textq - quitInteractive commands are:fF Add or remove fieldsoO Change the order of displayed fieldss Set the delay in seconds between updates# Set the number of instances to displayW Write configuration file ~/.esxtop41rck Kill a worlde Expand/Rollup Cpu StatisticsV View only VM instancesL Change the length of the NAME fieldl Limit display to a single group

Sort by:U:%USED R:%RDY N:GIDSwitch display:c:cpu i:interrupt m:memory n:networkd:disk adapter u:disk device v:disk VM p:power mgmt

Hit any key to continue:

9:26:17pm up 9 days 45 min, 149 worlds; CPU load average: 0.02, 0.06, 0.06PCPU USED(%): 2.5 32 38 0.3 19 0.5 0.3 0.4 2.2 57 0.0 0.0 0.3 24 0.3 50 AVG: 14PCPU UTIL(%): 3.4 34 41 0.5 26 1.0 0.7 0.7 2.7 65 0.2 0.2 0.6 29 0.6 60 AVG: 16CCPU(%): 0 us, 2 sy, 97 id, 0 wa ; cs/sec: 108

ID GID NAME NWLD %USED %RUN %SYS %WAIT %RDY %IDLE %OVRLP %CSTP %MLMTD %SWPWT1 1 idle 16 1351.56 1497.67 0.00 0.00 122.22 0.00 0.94 0.00 0.00 0.0059 59 Ubuntu 7 229.64 264.45 0.00 441.37 0.02 138.50 0.79 0.00 0.00 0.0011 11 console 1 1.65 2.66 0.03 98.24 0.07 98.23 0.01 0.00 0.00 0.0060 60 VMVXP-1 5 1.08 1.56 0.00 500.00 0.10 199.79 0.01 0.00 0.00 0.007 7 helper 77 0.04 0.05 0.00 7700.00 0.01 0.00 0.00 0.00 0.00 0.008 8 drivers 10 0.01 0.01 0.00 1000.00 0.00 0.00 0.00 0.00 0.00 0.0056 56 vmkiscsid.4303 2 0.01 0.01 0.00 200.00 0.00 0.00 0.00 0.00 0.00 0.0049 49 storageRM.4292 1 0.00 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 0.0019 19 vmkapimod 9 0.00 0.00 0.00 900.00 0.00 0.00 0.00 0.00 0.00 0.002 2 system 7 0.00 0.00 0.00 700.00 0.00 0.00 0.00 0.00 0.00 0.009 9 vmotion 4 0.00 0.00 0.00 400.00 0.00 0.00 0.00 0.00 0.00 0.0047 47 FT 1 0.00 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 0.0048 48 vobd.4291 6 0.00 0.00 0.00 600.00 0.00 0.00 0.00 0.00 0.00 0.0052 52 net-cdp.4300 1 0.00 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 0.0053 53 net-lbt.4301 1 0.00 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 0.0057 57 vmware-vmkauthd 1 0.00 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 0.00

The following optional switches, relevant to esxtop in batch mode, can be used:

a Shows all statistics and not what is specified in the default configuration file, if it exists.b Runs esxtop in batch mode.c Loads a user-defined configuration file instead of the ~/.esxtop310rc default.d Specifies the delay between statistics updates; the default is 5 seconds and the minimum is 2.n Specified the number of statistics updates to capture before exiting.

For example, the following command would run esxtop in batch mode, updating all statistics to the file perfstats.csv every 10 seconds for 360 iterations (a total of 60 minutes) before exiting:

esxtop -a -b -d 10 -n 360 > perfstats.csv

40) What is d location of esx dump file and how to read it?

Core-dump location

cd vmfs/volumes/ESX-Storage-94-1/esxconsole-4c44398f-4238-b888-226e-001e0bcd236a/core-dumps41) What id d location of the license file (*.LIC) in VC server and ESX server?

C:\ProgramData\VMware\VMware VirtualCenter\licenses\site\VMware VirtualCenter Server\4.0\4.1.0.2

42) What is d command to check the VMFS version and ESX version?

vmkfstools -P storageNvmware -v and vimsh -n -e 'hostsvc/hostsummary' | grep fullName ORcat /proc/vmware/version

43) How to extend the OS drive of a guest OS (windows VM)

vmkfstools -X 50M /vmfs/volumes/Storage2/testvm/testvm.vmdk

vmkfstools -X 50M /vmfs/volumes/Storage2/testvm/testvm.vmdk

44) What is d command to clone a VM?

vmware-vdiskmanager with option -r

# vmkfstools -i /vmfs/volumes/Datastore04/rhel5_test_template/rhel5_test_template.vmdk /vmfs/volumes/Datastore04/rhel5_test_clone/rhel5_test_clone.vmdk

45) What is d command to check al