vmrun issue on VMware Workstation 7.1.0

July 29th, 2010 Jase No comments

I was working on a specialized project that included the use of vmrun (part of VMware VIX).

The Project
This project required the ability to restore a VM to a baseline Snapshot.

The challenge is that the user is not a tech person, and the requirement was that it was very easy to restore the baseline Snapshot using a simple batch file.

The Problem
So I ran vmrun (located in C:\Program Files\VMware\VMware VIX) to see the necessary syntax to revert to a Snapshot.

The syntax is:
vmrun -T ws revertToSnapShot “C:\path\vmname\vmname.vmx” SnapShotName

The error I received “was: The specified version was not found”

After some looking around, it appeared that one of two things happened:

  1. The updated VMware VIX package was not updated from my 7.0.1 installation of VMware Workstation
  2. The updated VMware VIX package was not included in the 7.1.0 installation of VMware Workstation.

I kind of think that the first is true.  I say this, because when VMware Workstation is initially installed, a VMware VIX installer presents itself to augment the installation.

The Solution
I went to VMware’s site to download the latest version of VMware VIX.
http://communities.vmware.com/community/developer/forums/automationapi

After installing the updated VMware VIX build, my problems were solved.

  • Share/Bookmark

vSphere 4.1 – Batteries (Client) Not Included in ESX/ESXi

July 17th, 2010 Jase No comments


vSphere 4.1 is out.

You have already upgraded VMware vCenter Server to 4.1.

You realize that you downloaded vCenter Server 4.1 and either your ESX 4.1 or ESXi 4.1 media.

ButYou didn’t download the vSphere 4.1 client.  Remember that the 4.1 client is not included in the installation of ESX or ESXi.

Now when connecting to an ESX/ESXi host with an older client, the same installer in the past would allow download of the client from the host.
This is no longer the case:

The host redirects the updater to vsphereclient.vmware.com to download the client.  This can be a long process, or a short process, depending on your connection speed, as well as proxy settings, etc.

Never fear, even though VMware didn’t bundle the client with ESX/ESXi, it is still available to download from your vCenter Server.

Or you can connect to the vCenter Server first to upgrade the vSphere client.

Either way is better than having to download the client from VMware.

Update: How to have your ESXi installation point to your vCenter download URL

From Tech Support Mode, modify clients.xml on the ESXi installation

The command is vi /usr/lib/vmware/hostd/docroot/client/clients.xml.

The format of the file looks like this:

<ConfigRoot>
<clientConnection id=”0000″>
<authdPort>902</authdPort>
<version>4</version>
<exactVersion>4.1.0</exactVersion>
<patchVersion>1.0.0</patchVersion>
<apiVersion>v4.1</apiVersion>
<downloadUrl>http://vsphereclient.vmware.com/vsphereclient/2/5/8/9/0/2/VMware-viclient-all-4.1.0-258902.exe</downloadUrl>
</clientConnection>
</ConfigRoot>

To change this, replace the <downloadURL> tag with the URL to your vCenter Server.  I replaced this line to match my download URL, my clients.xml looks like this:

<ConfigRoot>
<clientConnection id=”0000″>
<authdPort>902</authdPort>
<version>4</version>
<exactVersion>4.1.0</exactVersion>
<patchVersion>1.0.0</patchVersion>
<apiVersion>v4.1</apiVersion>
<downloadUrl>https://vcenter.jasemccarty.com/client/VMware-viclient.exe</downloadUrl>
</clientConnection>
</ConfigRoot>

Now press :w! to save the file, followed by :q! to exit vi.

Now your ESXi host will point to your vCenter server to download the vSphere client.

  • Share/Bookmark
Categories: Virtualization Tags: , , ,

VMware vSphere 4.1 – RELEASED

July 12th, 2010 Jase No comments

VMware vSphere 4.1 has been released!

This is a release that many have been waiting for.  Virtualization.info leaked some early details a couple days ago.

Some of the features that are added include:

  • Memory Compression – compressing RAM pages rather than using disk swapping, which will improve performance (could significantly help VDI environments)
  • Storage I/O Control – VM’s with a greater need for disk resources can be given priority.
  • Network I/O Control – Can better leverage network utilization by setting QoS priorites for each flow type (iSCSI, NFS, etc)
  • DRS Host Affinity – VM movement can be more granular (great for limiting SQL VM movement, reducing SQL license requirements)
  • ESXi will have native Active Directory Integration
  • VMware vCenter Server – Will only run on 64-bit Windows.
  • vStorage API for Array Integration (VAAI) - New protocol to interface between VMware and storage arrays.  This can offload some storage tasks to the storage array natively.

The maximums have become larger

  • 3,000 VMs per cluster (increase by 2 times)
  • 1,000 hosts per vCenter server (increase by more than 3 times)
  • 10,000 VMs per vCenter (increase by more than 3 times)
  • Up to 8 vMotions in parallel when using 10GbE

Additionally, some names have changed:

  • VMotion is now vMotion
  • Storage VMotion is now Storage vMotion
  • The free ESXi package will be called vSphere Hypervisor
  • ESX & ESXi (paid version) will be discussed as the Hypervisor architectures

Well, I can’t wait to get it installed in the lab and give it a spin. Go to http://www.vmware.com/download to download it too.

  • Share/Bookmark
Categories: Virtualization Tags: ,

NetApp SnapMirror Monitor Script – Part 3 with DataONTAP PowerShell Toolkit v1.0

June 15th, 2010 Jase 2 comments

My second attempt also worked out pretty well, but the DataONTAP PowerShell Toolkit, has been released, and I wanted to update my script to leverage a supported toolkit. If you have a NetApp, and are getting deeper into using Powershell, this toolkit is for you.

I’m not going to go deep into the details of how this script works, as most of that is covered in the previous post.

What I am going to detail is the difference between the old and new scripts.

The Old Script

#Load the PoshOnTap Module
Import-Module PoshOnTap

#Connect to the Filer
Connect-NaServer -Filer netapp2

#Pull The Data
$body = Get-NaSnapMirror|Select Source,Destination,Status,State,Lag,LastTransferSize,LastTransferDurration|Out-String

#Send e-mail
Send-MailMessage -From "user@yourdomain.com" -To "user@yourdomain" -Subject "NetApp Replication Script" -SmtpServer mail.domain.com -Body $body

The New Script

#Load the DataONTAP Module
Import-Module DataONTAP

#Connect to the Filer
Connect-NaController netapp2

#Pull The Data
$body = Get-NaSnapmirror|Select SourceLocation,DestinationLocation,Status,State,LagTime,LastTransferSize,LastTransferDuration|Out-String

#Send e-mail
Send-MailMessage -From "user@yourdomain.com" -To "user@yourdomain" -Subject "NetApp Replication Script" -SmtpServer mail.domain.com -Body $body

The only differences between the 2 scripts are at lines 5 and 8.

Line 5:

  • Connect-NaServer -Filer becomes Connect-NaController

Line 8:

  • Source becomes SourceLocation
  • Destination becomes DestinationLocation
  • Lag becomes LagTime
  • LastTransferDurration becomes LastTransferDuration (obvious typo in PoshOnTap)

Other than those 2 lines, the scripts are identical.

I’d like to give a shout out to Glenn Sizemore for leading the way with PoshOnTap and NetApp for following his lead with the DataONTAP PowerShell Toolkit.

Update to this post
I was digging a little deeper on this post, and apparently dates are returned as INT64 Integers.  Makes things a little messy, and requires some data manipulation.

There’s a post about it on the NetApp Communities that details a workaround (again, kind of messy).  PoshOnTap handles dates better, so maybe NetApp will see the issue, and quickly release a v1.1 of the toolkit to correct the problem.  Nevertheless, I’ll continue using the supported (albeit a little more clunky with regard to dates) toolkit.

As soon as I find a clean/optimized way to address the situation, I will update this post.

Using Powershell I can execute the same command, and actually get more information.
  • Share/Bookmark
Categories: Virtualization Tags: , , ,

Using the Data ONTAP PowerShell Toolkit to add vSphere Storage

June 9th, 2010 Jase 3 comments

Over the past year or so, I have started using PowerShell more and more.

I was really exited to see the release of the NetApp Data ONTAP PowerShell Toolkit 1.0. I say this, because I have been using the “unsupported” PoshOnTap PowerShell extensions for some NetApp management. I have to give credit where credit is due, and Glenn Sizemore has done a great job with PoshOnTap.

PowerShell is really powerful, and because more and more vendors are providing more and more modules for the management of different aspects of the enterprise. With one script, I can create a NetApp volume, export it as an NFS export, and then connect it to all of my VMware vSphere hosts.

Note: This script is meant to be run from the vSphere PowerCLI.

##########################################################
# Create-And-Add-Storage-example.ps1
# Jase McCarty 6/7/2010
# Posh Script to add a volume on a NetApp Filer
# and present it to all vSphere hosts
##########################################################

# Add the vSphere PowerCLI SnapIn and the DATA ONTAP Module
Import-module DataONTAP

# Set my variables
$vCenter = vcenter.jasemccarty.com
$Filer = netapp1.jasemccarty.com
$aggr = aggr1
$newvol = volx

# Connect to vCenter and our NetApp Filer
Connect-VIServer $vCenter
Connect-NaController $Filer

# Create a new volume
New-NaVol $newvol $aggr 500g

# Set some options for the new volume
Set-NaVolOption $newvol no_atime_update yes
Set-NaVolOption $newvol fractional_reserve 0

# Set the SnapShot Reserve to 0
Set-NaSnapshotreserve  $newvol 0
Set-NaSnapshotschedule $newvol -Weeks 0 -Days 0 -Hours 0

# Add an NFS export
Add-NaNfsExport /vol/$newvol -Persistent -ReadWrite all-hosts -NoSuid -SecurityFlavors sys,krb5

# Get all the vSphere Hosts and add the NFS export
$Hosts = Get-VMHost
ForEach ($H in $Hosts)
{
 New-Datastore -Nfs -VMHost $_.Name -NAME $newvol -Path /vol/$newvol -NfsHost $Filer;
}

**Note, this is a pretty incomplete script.  Security for the export will have to be addressed, and the Filer management IP (netapp1.jasemccarty.com) is probably not the same as the IP used for the NFS export.  This is just an example of how this can be used.

Pretty cool.  I can only imagine the Poshibilities.

  • Share/Bookmark