Badges

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

Posts Tagged ‘scripts’

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.

Script for VMware HA Feature without VirtualCenter

So, who wants free VMware High Availability? That’s the title of a post created by Leo Raikhman on his Leo’s Ramblings blog. In this post, Leo has published the steps and scripting necessary to simulate VMware’s VI3 High Availability (HA) feature. Leo’s script works without VirtualCenter (VC), so VMware customer’s who have not implemented VC can manually create “HA -like” awareness between 2 ESX hosts. If one of the ESX servers goes offline then the virtual machines (VMs) are auto restarted on the other host. Of course, the VMs must be created on shared storage for this to work.

Before considering this script as a replacement understand the major differences between VirtualCenter HA and Leo’s HA:

  • Leo’s script only works between 2 ESX hosts while VC HA can be configured with up to 32 ESX hosts as of VI 3.5 (actually using 32 host HA clusters is another topic, but it can be done)
  • Leo’s script needs the ESX Service Console as written. It would need to be ported for the RCLI to work with ESXi. VC HA works with both ESX and ESXi
  • VC provides a visual status for the health of your HA cluster via the VI Client
  • VC HA provides HA fail over capacity for more than 1 ESX host at a time

I’ve held this post in my drafts because I wanted to try this configuration myself, but alas, I have never gotten around to it.  For those that can benefit from VC -less HA and give this script a test, let me (and Leo) know your results.

Leo’s post says: 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 »

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 »

Search for VM Snapshots from the Service Console

There are several ways to determine if you have virtual machines with snapshots. Why you would want to know has been covered In various other posts both here at VM /ETC as well as on the other virtualization blogs. It’s so important that the virtualization community has created different tools and scripts to identify and monitor snapshot files for administrators.  So, when I read the post WWoIT – Wayne’s World of IT: Find VM snapshots in ESX/VC I had an experience that Aaron Delp described as “/HEADDESK” (when he commented on my uploading files with the VI Client post).

It may not be the fanciest of methods, but probably the quickest way to find VM snapshots is to use the ls command from the ESX Service Console. By piping the output with grep to find files with the snapshot extension, .vmsn, and using the recursive switch you can scan all the VMFS LUNs visible to an ESX host. That’s so simple it hurts!

To use the ls command to find snapshots do the following: Read the rest of this entry »

FREE Disk space monitoring solutions for VMware virtual infrastructure

VMware VirtualCenter comes with built in alerting and a handful of alerts preconfigured. Unfortunately, alerting for disk space usage of either the ESX hosts or the virtual machines is not included. Administrators continue to use common physical infrastructure monitoring and reporting applications such as NetIQ and MOM for VMs, or SNMP capable programs like HP Openview or IBM Director for ESX host monitoring. A less complex and less expensive ( cost of installing and configuring agents on each VM OS ) alternative would be to tap into VirtualCenter’s central management ability to monitor, alert, and report on disk space. This post lists a few free solutions that can already use VC2.x or quickly be configured for ESX hosts and therefore save administrators time and money. Hopefully, a future feature of VC2.x will include vital disk space metrics and alerting.

Read the rest of this entry »

Windows GUI for Storage VMotion

Alexander Gaiswinklers svmotion gui - screenshot from Eric SloofAnother improvement alternative to the cumbersome storage vmotion feature has been made by the user community. I am assuming (and hoping) that one day soon we will all be announcing (and celebrating) the patch that includes the native VC 2.5 ability to call and configure storage vmotion from the VI Client, but until VMware does that the user community can be counted on to continue to make the process easier.

Graphical Front-End for Storage VMotion – blog.scottlowe.org is where I found out about Alexander Gaiswinkler’s post in the VMware Communities announcing his GUI for SVMotion. Installation instructions from Alexander’s post: 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