My general stuff. This will generally include computer related information, but may also contain general rantings on my part.
Wednesday, November 25, 2009
VMware Type IDs
Looking at the views I see VPXV_ENTITY, a good place to start looking. It appears that every object (or entity) in VMware is listed here. Now to segment them out based on object type, or TYPE_ID.
Below is a list of type_id's that I have identified in my environment. Not sure if these stay the same between versions and installations, but this is the best I have for now.
0 VM
1 host
3 cluster
4 resources
5 VM folder
6
7
8 Datacenter
16 datastore folder
17 Network folder
18 Datastore
19 Network
Wednesday, November 18, 2009
ETrust updates not workig on Windows 7
To fix this, do the following:
- Open file explorer and go to C:\Program Files\CA\SharedComponents\ScanEngine
- Right-click the file ITMDIST.EXE and select Properties
- On the Compatibility tab, click Change settings for all users
- Change Compatibility mode to Windows Vista (Service Pack 1)
- Click OK and OK
Thursday, November 12, 2009
Setting Custom Attributes in VMware programtically
The good news is that VMware has a "Custom Attribute" option for each VM. Displayed next to the Notes field, this allows you to define attributes like Customer, Department, Owner, Production Status or anything else you can imagine to tag every system in your environment. The question is - how to do this without manually typing in the attribute for each VM: and in comes powershell.
Assuming you want to create an attribute to match your folder structure, you can use the Get-Vm -Location powershell command to retrieve a list of all VMs in a folder (and sub folders). Pipe this output into the Set-CustomField command and let the computer do the work for you. An example of this is below
Get-Vm -Location 'App X' | Set-CustomField -Name 'System Function' -Value 'App X'
You can use other switches with Get-Vm to filter on name, datastores, host servers, and other options.
Wednesday, November 11, 2009
VMware guest level monitoring and alerting
Probably 90% of the monitoring needed in any environment consists of extremely basic measures: CPU utilization, Memory Utilization, Disk throughput, Network throughput, etc… Defining thresholds for these and alerting on them provides immesurable insight into an environment and quickly identifies any problems or bottlenecks. Amazingly, VMware provides many of these basic system monitors out of the box.
Out of the box, ESX contains 2 VM monitors, unfortunately no alerting or other action plans are defined. The first monitor is for the virtual CPU utilization and triggers a warning when it has reached 75% for more than 5 minutes, and critical when it reaches 90% for more than 5 minutes. The second monitor is for the virtual memory utilization and triggers a warning when it has reached 75% for more than 5 minutes, and critical when it reaches 90% for more than 5 minutes.
Those 2 monitors identify the most common causes of system slowness I have ever seen. When either of those reaches 80% or more, a huge bottleneck occurs and can cascade into a completely unusable system. Now you can be alerted and preemptively resolve the issues – focusing your time and money on the problems that truly effect your environment. Simply configure an action plan to email you when these events are triggered and your half way there.
There are plenty of other monitors/triggers for the Virtual Machines in your ESX environment. Below is a list of available triggers and their default settings. If you are seeing a potential problem area – such as unreliable or slow disk – then feel free to test those triggers and see if they provide insight into how your environment is working, and how it isn't working.
Trigger Type | Condition | Warning | Condition Length | Alert | Condition Length |
VM CPU Ready Time (ms) | Is above | 4000 | for 5 min | 8000 | for 5 min |
VM CPU Usage (%) | Is above | 75 | for 5 min | 90 | for 5 min |
VM Disk Aborts | Is above | 10 | for 5 min | 25 | for 5 min |
VM Disk Resets | Is above | 10 | for 5 min | 25 | for 5 min |
VM Disk Usage (KBps) | Is above | for 5 min | for 5 min | ||
VM Fault Tolerance Latency | Is equal to | Moderate | n/a | High | n/a |
VM Heartbeat | Is equal to | Intermittent Heartbeat | n/a | No Heartbeat | n/a |
VM Memory Usage (%) | Is above | 75 | for 5 min | 90 | for 5 min |
VM Network Usage (kbps) | Is above | for 5 min | for 5 min | ||
VM Snapshot Size (GB) | Is above | n/a | n/a | ||
VM State | Is equal to | Powered On | n/a | Powered Off | n/a |
VM Total Disk Latency (ms) | Is above | 50 | for 5 min | 75 | for 5 min |
VM Total Size on Disk (GB) | Is above | n/a | n/a |
Tuesday, November 10, 2009
VSphere and Windows 7 / Windows 2008 R2
Running Windows 7 or 2008 R2 as a VM
This is a simple fix - just dont use the VMware SVGA driver on the OS, instead use the generic Windows driver. It may also help to reconfigure hardware accelleration to OFF
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1011709&sliceId=1&docTypeID=DT_KB_1_1&dialogID=47064540&stateId=0%200%2047326772
Running the VCenter client on Windows 7 or 2008 R2
This is a little more complicated and requires some tweaking of the system configuration. In my experience, its still a little shaky and has some stability problems.
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1014316&sliceId=1&docTypeID=DT_KB_1_1&dialogID=47064540&stateId=0%200%2047326772
/3GB and /PAE management
Below are a couple of links that help describe the various options avialable.
http://blogs.technet.com/askperf/archive/2007/03/23/memory-management-demystifying-3gb.aspx
http://blogs.technet.com/perfguru/archive/2007/12/05/scenarios-using-3gb-and-pae-switch-and-appropriate-uses-of-these-switches.aspx