Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

Monday, March 17, 2014

How to access ESXi 5.1 console

When switching from ESX to ESXi one of the bigger downsides is the lack of the Service Console (Tech Support Mode). There is however a basic commandline option on the console which you can use for troubleshooting. Of course, for accessing this commandline you need either physical access to the host, or access to the host through a remote access card. We use IBM xSeries, so a IMM (Integrated Management Module) is what we'll use for this. First just access the console and unlock it by pressing F2 and provinding the root credentials. Then use the keyboard to access the menu item “Troubleshooting Mode Options”. Here you can do all sort of things, but now we need to enable the ESXi Shell by selecting the option and pressing ENTER. When done you'll see a notice on the right side telling you the shell is enabled:

Then to access the shell you'll need to press ALT+F1 at the same time. Now that might be hard using an IMM so use the menu option to send the key combination to the server:

Now you'll see a login prompt where you can enter the root credentials again, and then issue, for example, a command to add a route to a specific host:


For reference, this is the command example so you can copy it:

esxcfg-route -a 192.168.100.0/24 192.168.0.1
esxcfg-route -a 192.168.100.0 255.255.255.0 192.168.0.1

Thursday, July 11, 2013

Best Practices for SQL Server

Introduction

At VMworld 2008 in Las Vegas several of us in our virtual performance  team met with a variety of customers to talk about Microsoft SQL Server.  We already had a large base of customers running very many SQL Server  DBs on our products and we wanted to collect information on the  challenges posed in the process of virtualizing this critical workload.  We were pleased to see that ESX Server handled SQL VMs with excellent  performance. But, for many customers, the first efforts at virtualizing  SQL didn't yield high-performing SQL VM.  After careful investigation  and many, many discussions we've started to put together the puzzle as  to where SQL Server performance problems come from.  This page will  document these common problems, borrowing slides from our presentations  on the subject.

Virtualizing SQL: The Checklist

We've talked with dozens of customers in the past months to document the  issues that resulted in poor SQL performance. Happily, none of the  issues were due to underlying technologies. Here is a list of issues and  an explanation of the impacts. These items are roughly listed in the  order of decreasing likelihood of occurrence.

Item 1: Configure Storage Correctly

Storage configuration problems are the number one cause of SQL  performance issues.  Usually these problems arise because the DBA  requests a virtual disk of the VI admin, the VI admin places the VMDK on  a LUN that may or may not meet the DBA's performance needs.  For  instance:
  1. VMs' VMDK files placed on VMFS volumes without enough spindles.
  2. Many VMDK files placed on a single VMFS volume which could use more spindles.
  3. Database and log files placed on the same LUN which, you guessed it, could use more spindles.

This may be obvious to some, but this problem occurs again and again.   The VI administrator should be aware of a few technical items that can  help understand and avoid this problem:
  1. Based on the IO demands of the DB files, a certain number of  spindles should be guaranteed to this file.  This means that its VMDK  must be placed on a VMFS volume to accout for the SQL Server's demands  and all of the other demands on that volume.
  2. Mixing sequential activity (such as log file update) and random  activity (such as database access) results in random behavior.  This  means that the LUN configuration in the pre-virtual physical environment  may not be sufficient for the consolidated environment.  This is  discussed some in Storage Performance: VMFS and Protocols.
  3. When storage isn't meeting the SQL Server's demands, the device  latency or kernel latency (queueing time) will increase.  Read up on  these counters in Storage Performance Analysis and Monitoring.

Item 2: Use Recent Hardware


Often companies that are dipping their metaphorical toes into
virtualization want to run proof-of-concept (POC) experiments to verify
that the virtual platform can meet their performance expectations. But
its surprising how many times these experiments are run on older,
poorly-performing hardware. Presumably the shiny, new systems were in
use for production applications so only the mothballed, cobweb-covered
servers from a previous generation were available for the POC. This
causes many problems.  Check out this slide from a talk on SQL Server at VMworld Europe 2009:
newer_hardware.png
The slide points out a couple of things. First, the larger caches and  shorter pipelines on newer Intel processors results in a considerable  drops in performance overheads.  Second, the latency of the VMEXIT  instruction, which determines the amount of time it takes to transition  from the VM to the VMkernel, has shrunk by a large amount with  subsequent generations of hardware.  And don't forget the other  additions from Intel and AMD such as hardware assisted memory management  and IO virtualization.

Item 3: Follow SQL Server Best Practices


Microsoft has kindly provided a web page of best practices for SQL Storage configuration. These be practices should still be followed when configuring your virtual SQL deployments!

Item 4: Configure VM Identically to Native and Run The Right Test

For many SQL Server POCs the goal is to measure the VM's ability to  perform, with respect to the virtual platform. If this comparison is to  be performed, its critical that the VM be configured identically to the  physical hardware. Obviously this means that the VM should be run on the  same hardware using identically configured LUNs. Its also important to  ensure that the VM has the same number of vCPUs and amount of memory as  the physical baseline. This means restricting the number of pCPUs and  amount of memory with NUMPROC and MAXMEM, respectively, in boot.ini.

It also means that the test being applied should be understood.  If a  benchmark is chosen that uses a very small database, the content will be  cached and the storage system won't be used.  This can skew the results  and produce recommendations not consistent with production deployments.   Here is another slide from the same VMworld Europe 2009 presentation  detailing some of what we know about the SQL Server benchmarking  alternatives:
sql_benchmarks.png
We at VMware prefer DVD Store.

Item 5: Use VMware's ESX Server


VMware's hosting products, VMware Server, VMware Workstation, and even  VMware Fusion, are all capable of running SQL Server. But if the  database is going to be run in production on enterprise-class hardware,  use VMware's enterprise-class hypervisor: ESX Server.  These products  are not often confused by the initiated but rogue members of large  companies often run off-the-books proof-of-concept experiments on  VMware's hosted products.  When they produce results they don't like,  the results get spread throughout the company which can slow the virtual  deployment.
Consider the following data, again from the VMworld Europe 2009 SQL Server presentation:
vmmark_esx_server.png
This information is getting a bit dated now, as it was performed years  ago on ESX Server 3.0.  But the point stands: before believing results  claiming that "VMware cannot run SQL Server" its worth investigating the  platform used to generate the results.

Item 6: Understand Memory Management and Configure Correctly

Database performance is heavily dependent on the amount of memory  available. Almost without exception, providing more memory to SQL Server  will improve performance. However, if that memory is coming from a host  that is already over-committed or is being provided through workarounds  to 32-bit limitations, performance may suffer. Here are a few keys for  SQL Server memory management:
  1. If more than 3 GB is desired, use 64-bit versions of the OS and application.
  2. If memory is over-committed on the box, set reservations for  performance-critical SQL Server VMs to guarantee that those VMs' memory  isn't ballooned or swapped out.
  3. If SQL Server's "lock pages in memory" parameter has been set,  provide set the VM's reservations to the amount of memory in the VM.  This setting can adversely interfere with ESX Server's balloon driver.  Setting reservations will stop the balloon driver from inflating into  the VM's memory space.

Item 7: Align Disk Partitions

This item is really a special but very important case of item two,  follow best practices. Partition alignment can impact storage  performance which can be critical to some SQL Server VMs' performance.  See VMware's paper on partition alignment for more information on this.

Monday, March 18, 2013

Free tools for VMware

  1. Veeam Backup & Recovery 6.5 free edition
  2. UniTrends Enterprise Backup Free Edition (Protect 4 VMs For Free) or Unitrends NFR Edition (2 sockets and 2 application-enabled servers FREE)
  3. Trilead VM Explorer Free VMware & Hyper-V backup (max 2 hosts)
  4. NexentaStor Community Edition Free 18Tb ZFS Virtual Storage Appliance
  5. VM Aware Database Performance
  6. vSphere Plugin Wizard 2.0
  7. VMware vCenter Mobile Access (vCMA) is a fully configured and ready to run virtual appliance that is required to manage your datacenter from mobile devices.
  8. VMware Boomerang is a radically simple client application that allows you to use multiple vSphere servers simultaneously
  9. VMware Guest Console (VGC)
  10. Cloud Cleaner
  11. Solarwinds VM to Could Calculator
  12. Onyx proxy between the vSphere Client and the vCenter Server. Monitors the network communication between the two and translates it into an executable PowerShell code.
  13. vCenter XVP Manager and Converter
  14. Veeam ONE Free Edition 24×7 real-time monitoring
  15. RVTools is a windows .NET 2.0 application which uses the VI SDK to display information about your virtual machines and ESX hosts
  16. VMTurbo Real-time monitoring and a library of 32 pre-defined historical reports
  17. vAlarm Free Desktop Tool for Monitoring vCenter Alarms
  18. vSphere 4 Client RDP Plug-in
  19. Xangati for vSphere VMware visibility and troubleshooting tool!
  20. vOPS™ Server Explorer
  21. Powergui Graphical User Interface & Script Editor for Microsoft Windows PowerShell
  22. vGhetto Script Repository
  23. UBERAlign free alignment of Virtual Machine disks (Nickapedia)
  24. Thinware vBackup
  25. PCoIP Log Viewer 2.0
  26. Quest Workspace Assessment Tool
  27. ESXi 5.0 / ESXi 5.1 Host Backup & Restore GUI Utility (PowerCLI based)

Tuesday, February 28, 2012

Attempting to add a host to VirtualCenter produces a license error

Details

When you are attempting to add an ESX host to VirtualCenter, VMware Infrastructure (VI) Client displays an error message similar to the following:
There are not enough licenses installed to perform the operation.

Solution

The above error message may be caused by one of these problems:
  • The VirtualCenter Server is in an unlicensed state. VirtualCenter may be unlicensed because the edition selected during the installation is not the purchased edition.
  • There is a problem with a virtual machine on the ESX host.

Correcting the VirtualCenter Server license state

To correct the VirtualCenter Server license state:
  1.    Launch VI Client and log in to VirtualCenter.
  2.    Choose Administration > VirtualCenter Management Server Configuration


  3.    For VirtualCenter Server Edition, choose the edition that is not currently configured and click OK.


This is especially true if you purchased and uploaded VirtualCenter Foundation license and selected VirtualCenter Enterprise during installation.
If the VirtualCenter Server licensing is correct, the problem may be with a virtual machine on the ESX host.

Verifying and correcting issues with a virtual machine on an ESX host

To verify and correct a problem with a virtual machine on the ESX host: 
  1. Log on to the ESX host service console with root privileges.
  2. View the vpxa.log file. Run the command:

    more /var/log/vmware/vpx/vpxa.log

    Examine the log for messages for warnings similar to:

    [2008-06-16 12:37:59.350 'App' warning] ============BEGIN FAILED METHOD CALL DUMP============
    [ + 0 msc 'App' warning] Invoking [GetLayout] on [vim.VirtualMachine:336]
    [ + 0 msc 'App' warning] Fault Msg: "A general system error occured: Failed to serialize result"
    [ + 0 msc 'App' warning] ============END FAILED METHOD CALL DUMP============
    [ + 1 msc 'App' error] [vm.GetLayout] Received exception in GetLayout: vmodl.fault.SystemError
     

    The example shows the source of the problem is the error Failed to serialize result.
  3. View the hostd.log file. Run the command:

    more /var/log/vmware/hostd.log

    The output appears similar to:


    [2008-06-16 09:44:12.052 'vm:Win2000.vmx' verbose] Retrieved current power state from foundry 0
    [ + 1 msc 'vm:Win2000.vmx' verbose] Retrieved Summary info
    [ + 29 msc 'vm:Win2000.vmx' error] Disk was not opened successfully. Backing type unknown.
    [ + 31 msc 'App' warning] Failed to serialize result of method vim.VirtualMachine.GetLayout: Not initialized: vim.vm.FileLayout.DiskLayout[] disk.diskFile
    [ + 31 msc 'Vmomi' info] Activation [N5Vmomi10ActivationE:0xacfe360] : Invoke done [GetLayout] on [vim.VirtualMachine:336]
    [ + 31 msc 'Vmomi' info] Throw vmodl.fault.SystemError
    [ + 31 msc 'Vmomi' info] Result:
    (vmodl.fault.SystemError) {
    reason = "Failed to serialize result"
    msg = ""
    }
    Search for Failed to serialize result errors. This example shows that a virtual machine file Win2000.vmx is experiencing problems.
     
  4. Determine the full path to the virtual machine. Run the command:

    vmware-cmd -l
    For example:

    # vmware-cmd -l
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/AD-SVR-PRM/Win2000-1.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/IIS-XPR/Win-2003.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    In this example, the last line of output lists the full pathname to the problematic virtual machine.
     
  5. Unregister the virtual machine. Run the command:

    vmware-cmd -s unregister /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    Note: This does not apply any power operations to the virtual machine. The virtual machine continues to run unaffected. You cannot, however, manage the virtual machine from VI Client until you re-register it.
      
  6. Restart the ESX management agents. For more information, see Restarting the Management agents on an ESX Server (1003490).
  7. Add the ESX host to the VirtualCenter Server.
  8. Re-register the virtual machine. Run the command:

    vmware-cmd -s register /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx

Verifying and correcting issues with a virtual machine on an ESXi host

To verify and correct a problem with a virtual machine on the ESXi host, follow these steps: 
Note: The following steps require the vSphere CLI or the VMware RCLI. For more information, see vSphere Command-Line Interface.
  1. Open a browser, and go to:

    http://<hostname>/host/

    where <hostname> is the name of the ESXi host
     
  2. Enter the appropriate credentials.
  3. Click on the vpxa.log link, and search for Failed to serialize result errors:
    [2008-06-16 12:37:59.350 'App' warning] ============BEGIN FAILED METHOD CALL DUMP============
    [ + 0 msc 'App' warning] Invoking [GetLayout] on [vim.VirtualMachine:336]
    [ + 0 msc 'App' warning] Fault Msg: "A general system error occured: Failed to serialize result"
    [ + 0 msc 'App' warning] ============END FAILED METHOD CALL DUMP============
    [ + 1 msc 'App' error] [vm.GetLayout] Received exception in GetLayout: vmodl.fault.SystemError

     
  4. Click on the hostd.log link, and search for Failed to serialize result errors:
    [2008-06-16 09:44:12.052 'vm:Win2000.vmx' verbose] Retrieved current power state from foundry 0
    [ + 1 msc 'vm:Win2000.vmx' verbose] Retrieved Summary info
    [ + 29 msc 'vm:Win2000.vmx' error] Disk was not opened successfully. Backing type unknown.
    [ + 31 msc 'App' warning] Failed to serialize result of method vim.VirtualMachine.GetLayout: Not initialized: vim.vm.FileLayout.DiskLayout[] disk.diskFile
    [ + 31 msc 'Vmomi' info] Activation [N5Vmomi10ActivationE:0xacfe360] : Invoke done [GetLayout] on [vim.VirtualMachine:336]
    [ + 31 msc 'Vmomi' info] Throw vmodl.fault.SystemError
    [ + 31 msc 'Vmomi' info] Result:
    (vmodl.fault.SystemError) {
    reason = "Failed to serialize result"
    msg = ""
    }

    Make note of the virtual machine referenced in the hostd.log file. This example above shows a virtual machine file Win2000.vmx is experiencing problems.
     
  5. Using the vSphere command line interface, run the command:

    vmware-cmd <connection options> -l

    The output appears similar to:

    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/AD-SVR-PRM/Win2000-1.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/IIS-XPR/Win-2003.vmx
    /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    In this example, the last line of output lists the full pathname to the problematic virtual machine as identified in the example in step 4.
      
  6. Unregister the virtual machine. Run the command:

    vmware-cmd.pl <connection options> -s unregister /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
    Note: This does not apply any power operations to the virtual machine. The virtual machine continues to run unaffected. You cannot, however, manage the virtual machine from VI Client until you re-register it.
      
  7. Restart the ESXi management agents. For more information, see Restarting the Management agents on an ESX or ESXi Server (1003490).
  8. Add the ESXi host to the VirtualCenter Server.
  9. Re-register the virtual machine. Run the command:

    vmware-cmd.pl <connection options> -s register /vmfs/volumes/47a0abbf-48b83cd4-3517-001a5311f31b/ajax-test/Win2000.vmx
     
For additional information or if the issue persists, see Not enough licenses installed (1005265) or Cannot connect ESX server to VirtualCenter (1005562). (Source kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003623)

Installing Windows XP on ESX using LSI Logic driver

I get a lot of questions concerning the deployment of Windows XP on ESX. By default, ESX will use the LSI Logic driver when deploying a new Windows XP virtual machine. The LSI Logic driver is not found on the CD-ROM media, so Windows XP will not continue with the installation if this driver is not found.
The steps:
  • Create a new Windows XP Virtual Machine
  • Upload a Windows XP .iso file to your datastore/ISOstore (preferably a VLK version) and link it via the CD-ROM options in your Virtual Machine. Make sure it is connected / at power on
  • Go to http://www.lsilogic.com/cm/DownloadSearch.do and search for a driver for the LSI20320-R controller.
  • Extract all files in the symmpi_wXP_1201800.ZIP
  • Use a program such as WinImage to create an LSILogic.flp file and include the extracted files in the .flp image.
  • Upload the newly created LSILogic.flp to your datastore/ISO store
  • Link the .flp file via the Floppy options => use existing floppy image in datastore in your Virtual Machine. Do NOT connect it yet.
  • Power On your Windows XP machine. The installation of Windows XP should begin.
  • During setup, press F6 to select additional SCSI drivers
  • Now is the time to connect your floppy and use S during Windows Setup when prompted to connect to the floppy drive.
  • The LSILogic drive should appear. Press ENTER to continue
  • Setup will continue as normal
  • Install VMware tools
  • Done!
NOTE: when using the BusLogic driver instead, you can download & use a preconfigured .flp file from the VMware site: http://download3.vmware.com/software/vmscsi-1.2.0.4.flp. Follow the same procedure as described above. The driver should be name VMware SCSI Controller in Windows XP. (Source: virtrix.blogspot.com/2007/09/vmware-installing-windows-xp-on-esx.html)

New VM receives NTLDR is missing

NTLDR is missing
Press Alt + CTLR + DEL

I just received this after creating a VM (in my case Windows XP) on ESX 3.5. I jump back to the server and fire up the VM and receive the same NTLDR is missing message.

Step 1. Check the summary or the .vmx to make sure there is no floppy drive present.

Step 2. Load BIOS (F2) during the VM power on and check to see if it recognized the drives.

Step 3. Boot to a mounted O/S disk (Bootable Windows XP). Load the recovery console. If you are able to get to the recovery console, your VM disk .vmdk’s are recognized. You may then want to try the following Microsoft recommended steps.

“Issue the following commands at the recovery console”

FIXMBR C:
FIXBOOT C:
COPY x:\I386\NTLDR C:\
COPY x:\I386\NTDETECT.COM C:\
BOOTCFG /rebuild

Step 4 If the recovery console was unable to recognize any drives, which led me to believe that something was still wrong in the .vmx config file. I check and had two .vmdk files (one 12GB and one 15GB). The .vmx was referencing the wrong names. I updated the names to point to the existing .vmdk files and the VM powered up just fine.

Not sure when or how the scsi0 and scsi1 got pointed to invalid .vmdk names but good to know none the less. (Source: www.jesswatts.com/it/vm-receives-ntldr-is-missing)

Indonesian Greeting on Voyager Golden Record

In September 5th 1977, NASA launched space probe named Voyager 1. The mission to observed our solar systems and beyond. It's still trave...