Wednesday, April 23, 2014

Virtual Machine Performance [CPU READY vs. CPU USAGE]

“CPU Ready and CPU Usage, what are they and what are they good for?”


I was asked this question by my colleagues and after answering it with the official VMware explanation, they still didn't quite get it.  


Actually, after some thought, without any background information on the subject, I probably wouldn’t have understood it either.


The following visualization helped explain the CPU Ready and CPU Usage is and their relationship to each other.


What's the difference between CPU READY and CPU USAGE


CPU Ready = % of time there is work to be done for VMs, but no physical CPU available to do it on. In other words, all host CPUs are busy serving other VMs.  The higher the ready time, the slower the virtual machine is performing.

     CPU Usage = raw, absolute amount of CPU used by corresponding VM at the given moment.


At one point VMWare had a recommendation that anything over 5% ready time per virtual CPU is something to monitor. For anything over 10% for extended periods of time, you should plan on taking action.


VMware has a very good paper on this subject here: http://www.vmware.com/pdf/esx3_ready_time.pdf

The following sample chart displaying CPU Ready and CPU Usage can be found through vSphere client, selecting the VM, then clicking performance tab, and then selecting the advanced “chart options” link. In the chart options, under Objects, only select 0. Under counters, select READY and USED then OK.
http://vmfaq.com/kb_upload/Image/esx_perf_cpu_ready_used.jpg


Another place to get CPU Ready is through command line by using ESXTOP.  Simply ssh into the esx host’s shell and type esxtop.
http://vmfaq.com/kb_upload/Image/esx_esxtop_cpuready.jpg


Understanding the data that you are looking at and what it actually means is critical to making the right decisions about what is happening in a virtualized environment. CPU Ready time specifically requires a good understanding of what the value actually is showing and how it relates to the configuration of the VM, the other VMs on the host, and the physical host resources. If you are looking at summation data for the CPU Ready time, converting it to a CPU Ready percent value is what provides the proper meaning to the data for understanding whether or not it is actually a problem.

Sunday, April 13, 2014

Friday, April 11, 2014

HOWTO: Re-enable VMware Console copy/paste functionality

HOWTO: Re-enable VMware Console copy/paste functionality

So, if you’re like me, you copy and paste a lot fro your VM consoles – or *want* to.  It kind of drove me nuts for a while, as I was certain I’d done this in the past, hit or miss.  Turns out it’s a feature that got disabled by default after vSphere 4.1 as a “security concern”. 
Now, I can understand why or how it could be a concern, but let’s be realistic:
  • A user who has access to the console, is likely a Domain Admin – or at least a vSphere Admin, unless roles have been delegated

  • We likely have DEV/TEST environments, and/or DMZ’s that have VM’s that can’t easily see, browse, RDP, 
  • etc, to your workstation or other networks.

  • Copy and paste is *good*, darn it!




By far the best option for me is the second option, which enables it for all VM’s on a host:
First ensure SSH server is running on the ESXi host.

Then make sure the firewall on the ESXi host will allow SSH connections

  1. Log in to the ESX/ESXi host as a root user.



  1. Take a backup of the /etc/vmware/settings file.



  1. Open the /etc/vmware/settings file using a text editor.



  1. Add these entries to the file: isolation.tools.copy.disable="FALSE" 
    isolation.tools.paste.disable="FALSE"



  1. Save and close the file. 




The Copy and Paste options are only enabled when the virtual machines restart or resume the next time or shutdown and power-on the virtual machine for changes to take effect
It should be noted that these changes will not remain after a host upgrade.  So you may need these to be part of your scripting, use the vMA, or my preference, embed it in your kickstart.cfg files you use for installation customization.