Badges

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

Archive for the ‘scripts’ Category

VIRTUMANIA Episode 20: Powershell is Latin to Me

VIRTUMANIA Episode 20 was far from scripted, but some of the best known names in virtualization scripting join us for this show. The following is the podcast summary:

VIRTUMANIA Podcast Episode 20Powershell is Latin to Me. Rich Brambley (@rbrambley) of VMETC and Marc Farley (@3parfarley) of StorageRap.com with special guests Scott Herold (@vmguru) of vmguru.com and Hal Rottenberg (@halr9000) of halr9000.com. This week’s discussion focuses on using Powershell in virtual environments instead of a GUI, compares learning scripting to learning the verbs and nouns of a new language such as Latin, and highlights several Powershell sites and tools that every administrator should check out. Virtumania is an Infosmack Production.

Before, between, and after the important stuff we also have some fun with using bots in first person shooter games, Mohitos, and the trial of former Illinois Governor Rod Blagojevich.

Listen to the podcast with the embedded player or subscribe to get a weekly copy so you can listen when convenient.

Subscribe to VIRTUMANIA with iTunesAdd to my GoogleAdd to my Yahoorss2 podcast

Check out the VM /ETC VIRTUMANIA Page to listen to past episodes as well as episodes of Infosmack.

The following links offer more information on some of the topics mentioned in VIRTUMANIA Episode 20:

Read the rest of this entry »

Easy Removal Of HP Server Utilities After P2V Migration

I’ve had my share of difficulties with the HP Server Utilities after a P2V migration. Granted, when you are building a new server the SmartStart CD makes life easy for completing the “Setup and installation for HP ProLiant ML and DL 300, 500 and 700 series and HP ProLiant BL Servers and supported server options”, but when that server restarts as a VM with the HP software still installed and running it is sluggish and slow. Extremely sluggish and slow in my experience.

After having to boot several VMs in Windows Safe Mode in order to prevent the various HP utilities and drivers from attempting to load I finally got a clue and made sure I disabled all HP Services before running the P2V conversion. That made the start up as a new VM better, but I still had to spend some quality time with Add/Remove Programs in the Windows Control Panel to uninstall all of those HP programs!

You may be thinking “OK. You should just uninstall all the HP Programs and Drivers before the P2V.” I could, but there goes my safety net, fall back plan. I want the physical server to remain operational exactly as it was in case something unexpected prevents the P2V from succeeding. It’s rare, but if it does happen I want to be able to power back on the physical server. Maintenance windows are short and I’m not one to make my night longer than necessary.

Looks like one of my GestaltIT Tech Field Day brothers has made my next late night date with HP server migrations a little easier. Simon Seagrave’s post VMware P2V – Easy Method to Remove HP Agents and Utilities is about the HP Proliant Support Pack Cleaner v1.1 utility available from ctxadmtools.musumeci.com.ar – a site self described as full of “FREE Tools for Citrix, Microsoft and VMware Administrators and Consultants.”

I haven’t tried this utility myself yet, there doesn’t appear to be any documentation for it, and Seagrave doesn’t mention how/when he uses the utility, so I’ll have to figure out later if my process of disabling all the HP services works with this Support Pack Cleaner. I imagine it’ll work fine. I’ll just run it after I boot the migrated VM for the first time.

Sorry Windows Control Panel and Add/Remove Programs, we’ve spent a lot of time together over the years but it’s time for me to move on. Thanks Simon!

Seagrave has also previously posted about a script to do the same job. Check out both of his posts!

VMware Code Central: New Community to Share Scripts

I was notified by Nava Davuluri of VMware Product Marketing that a new VMTN community site and blog has been created for the purpose of centrally organizing freely available VMware product scripting and code samples. In Davuluri’s words:

“These sample codes are related to products such as the new vSphereCLI, vCLI, Perl toolkit, Java Webservices SDK, etc.

I’m trying to involve the entire developer community in using(sharing/contributing) this site more.

On the VMware Code Central Blog he explains Code Central “is intended for VMware community developers and system administrators who use VMware infrastructure and would like to have IT control through automation.” Apparently, the Code Central Blog will update what’s new on the Code Central Community Page on a weekly basis.


After quickly checking the CodeCentral Community page one can see the potential for this to become a great site for VMware administrators and developers. For example, Davuluri already has featured links to the following, well known community contributions :

Update your bookmarks and RSS readers. I’m sure the Code Central Blog and VMTN Community will become a great resource.

Generate ESX documentation with ESX Healthcheck script

esx-healthcheck-screenshot

health_check.sh script report .html

If you are looking for a free and quick method to document your ESX 3.0.X  and ESX 3.5 server configurations without installing a scripting environment then don’t forget about A. Mikkelsen’s ESX Healthcheck script. An oldie but still a goodie, this script is simply transferred to your ESX 3.5 Console and then just run manually or via a scheduled job. The end result is a .html report that is saved on your ESX host, or if you utilize the optional send_smtp.pl script the report can be mailed to you automatically.

I’m not providing any new information in this post. In fact I am way behind  as Duncan Epping has covered this script on his blog at Yellow-bricks.com. Duncan first posted about the esx healthcheck script in January 2008 and recently mentioned it again in his post about his tools he uses when conducting customer Healthcheck services. The comments thread on Duncan’s January post walk through a year’s worth of feature development and support.

Download your copy of the script at  SourceForge.net: ESX Healthcheck Script

Once downloaded, the .zip file contains several helpful text files along with the script. The rest of this post walks through the install and configure steps and then explains how to run the script when ready. Read the rest of this entry »

Linux scripts to clone and rename VMware Server VMs

If you run the free VMware Server on a Linux host then VMTN Communities user phxrider has created a couple of scripts that can make your life a little easier. Phxrider’s clone and rename scripts automate the process of two administrative tasks that are frankly a burden to do manually. Both VMware Server 1.x or 2.0 do not offer any template or cloning abilities from their respective GUI interfaces, so these scripts are an essential tool to have if you want to duplicate VMs or change the VM’s files to match a renamed directory.

Check out either http://communities.vmware.com/docs/DOC-8050 or the VMTN Forum thread at http://communities.vmware.com/thread/168266 to download the scripts. Here’s some brief info from these links:

“The clone script does a straight clone of a VM. It copies the directory, renames the files and tweaks all the text inside the files by using sed to replace the old name with the new one, then sets all the permissions to what they would be if you created a new VM.

The rename script basically does all but copy it. This is handy for if you tried to rename a directory manually or attempted a manual copy and then found it still shows up under the old name in the web console. Remember this one assumes you have already renamed the directory to the new name and it MUST be the same as what you intend for the new name to be.

Both work the same way… scriptname <old name> <new name>”

I am not aware of equivalent scripts for VMware Server hosted on Windows, but if they exist please leave a comment with a link for VM /ETC readers.

The rest of this post is my example of using the clone_vm.sh script to make a template for future VMware Server 2.0 VM cloning. Read the rest of this entry »

Quick Migration PowerShell script for VMware VI Foundation

I missed Mike DiPetrillo’s Deploying VMware in a Microsoft Shop session at VMworld 2008, but Mike apparently provided a PowerShell example of automating the migration of an Ubuntu VM between ESX hosts without using VMotion. This script would be a great alternative to a cold migration for VI Foundation customers. Mike has now posted his script and a video of a demo on his blog.

From the VMware Field: Mike D’s Virtualization Blog: Quick Migration for VMware – The Power of PowerShell shows off the script and flirts with comparing this ability to the Microsoft Hyper-V Quick Migration feature.

“One of the things that was also brought up over and over again in the debate was the fact that Quick Migration was free and came with Hyper-V since it was based on Microsoft Clustering whereas VMware VMotion was only available in the most expensive Enterprise SKU of VMware Infrastructure. So there it was – I need to create Quick Migration for the lower priced and free VMware solutions. I went off, built my little script, and showed it off at VMworld. There was a GREAT response to it so I’m posting it here for others to use or improve upon however you see fit.

The script works just like Microsoft Quick Migration – the virtual disk is stored on shared storage, the VM is suspended to disk, and the VM is then resumed on the destination.”

Mike provides the various requirements and the links later in his post.

To set this up in your environment you’ll need a few things:

Read the rest of this entry »

Automating VMware Tools Installs and Upgrades in Linux Guests

Last week I had a customer ask me for help with a repetitive administrative task that is extra aggravating for shops with a lot of Linux virtual machines (VMs). The customer was frustrated with the manual process of upgrading VMware Tools after kernel upgrades in their VMs. It’s a problem unique to Linux since the Windows operating system kernel does not change very frequently, but the development cycle of several Linux distributions can mean multiple kernel versions each year. After each upgrade and subsequent VM reboot the VMware tools must be re-installed so the tools are compiled correctly with the new kernel. Not exactly fun to do when you have a lot of Linux VMs.

I suggested 2 alternatives for the customer. The first is a scripted solution configured inside each Linux VM and the second is a built in feature of VirtualCenter and ESX for versions 2.0.1 and 3.0.1 or greater. I have not tested either of these solutions. My reason for writing this post is partly to explain the options, but also to get some feedback from the community. Let me know if you use or have tried either of these solutions or anything similar. If there is a better way please comment on this post! If you try one of these for your Linux virtual guests let me know what works and what doesn’t.

The following methods require that VMware tools are already installed in the Linux guests. For instructions for installing the tools check out the current VMware .pdf guide titled Basic System Administration Update 2 Release for ESX 3.5, ESXi version 3.5, VirtualCenter 2.5. if you are wondering if you should even install VMware tools in Linux guests than check out my post “Why do I need to install VMware Tools?”. Read the rest of this entry »

Get My Podcast On iTunes!
Support VM /ETC
Support VMETC.com

Support VMETC.com

Free Business and Tech Magazines and eBooks
@rbrambley tweets
VMTN Roundtable Podcasts
Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo