Lab Automation with PowerCLI Part 2: Gathering Performance Statistics
Ever wondered how to programatically gather performance statistics from an ESXi server? This article aims to explain:
- How to find a list of statistics that are available for gathering
- How to gather the stats to a file for analysis
Previous Article: Getting started
Next Article: Create and Delete Virtual Machines
UPDATED: TCP Port Scanner App for Windows phone: Now Available!
Microsoft Just approved my TCP IP Port Scanner application. It is available for download. This allows Windows Phone users to enter in a combination if DNS Names +IP Addresses along with a list of ports to scan and get a list of which ports are responding. The Scan timeout is adjustable.
Note: Some 2G/3G/4G Data providers may artificially cap the TCP timeout. If you get false positives or negatives over the phone's data connection, try turning down the timeout value (about 5 seconds seems to work for me but YMMV).
Requires: Windows Phone 7.5 and a data connection (WiFi and/or cellular carrier).
Update (27-Jan-2012): Version 1.1 improves reliability of scan results.
Process.StartInfo.RedirectStandardOutput: Not quite what you'd expect in DLLs or WinForms apps
While implementing an automation strategy I recently discovered a quirk in output redirection. In a C# you can start a process, wait for it to exit and gather its CLI output (StandardOut). In my testing I found that the “Console” type application handles this scenario flawlessly without any difficulties. However, if you have a DLL or WinForms project you need to take an extra step to ensure this works correctly and avoid these problems:
-
Started process appears to exit immediately
-
NULL output received as results of the process run
Update (14-Dec-2011): Added additional lines about StandardError
Lab Automation with PowerCLI Part 1: Get setup, write a quick script
In recent months I have come to appreciate the functionality VMWare exposes through PowerCLI. This is the first article in a series documenting the use of PowerCLI in a vCenter/ESX environment.
Next article: Gathering performance statistics
IMPORTANT NOTE: VMWare considers open API access in the Free-licensed version of ESXi 5 to be a bug. It is possible that free access to the APIs will be removed in an update. You might want to keep a copy of your 5.0 ISO handy. :)
How to Disable full screen window dragging in Gnome (Centos 6)
After installing a Centos VM on a low power ESX Host I noticed that most of my 'idle' time was waiting for windows to redraw. In looking around the Gnome GUI I was unable to find a way to disable window redrawing. To disable the windows equivalent of Show window contents while dragging in Gnome you can:
- Open a Terminal
- Run This command:
gconftool-2 -s -t bool /apps/metacity/general/reduced_resources true
(This information courtesy of this linuxquestions.org thread)
VMWare Workstation: Virtual machine is in use, can't take ownership
I will be taking the next week or so to learn about Java and Java based web services. For better compartmentalization I setup a Virtual Machine as my development environment using VMWare Workstation.
When I tried to power on the VM this morning I was greeted with a little red X by the VM icon and an error message when powering it up:
This virtual machine appears to be in use
If this virtual machine is already in use, press the "Cancel" button to avoid damaging it. If this virtual machine is not in use, press the "Take Ownership" button to obtain ownership of it.
Configuration file: C:\Users\<UserName>\VirtualMachines\<VMName>\<VMName.vmx>
When I clicked the Take Ownership button I received this error:
Taking ownership of this virtual machine failed.
The virtual machine is in use by an application on your host computer.
Configuration file: C:\Users\<UserName>\VirtualMachines\<VMName>\<VMName.vmx>.
Observed Limitations of Windows Server 2008 R2 Core
To minimize attack surface area of our Windows servers we use a fair number of Windows Core 2K8 Installations where I work. Microsoft achieves this reduced surface area by not including as many features or options as they present in the full GUI Windows Installations.
This is meant to be something of a Living article. As I find more limitations and perceived 'gotchas', I will post them here
Creating a WCF Client Part 4: Programmatically configuring WCF Clients
While using the app.config file is a quick & convenient (Article 2, Article 3) way to get your WCF clients up and running, there are times when you may not want to distribute a .exe.config file alongside your EXE. This article describes how to configure a WCF client on-the-fly in your C# Code.
Creating a WCF Client Part 3: Adding additional services to your WCF Client App
The previous articles (Article 1, Article 2) describe how to create a WCF client for one service. In this article I will show you how to add multiple services by way of the app.config file.
Creating a WCF Client Part 2: What do I do with the generated class and config file?
After overcoming the self-signed certificate issue from Part 1, I had a a C# class and a .config file. This article explains how to create a simple WCF client using the files generated by svcutil.