Friday, November 26, 2010

VMware KB Mobile APP

Some time ago I wrote about the vSphere Management for iPAD.
Now VMWARE has launched an APP for iphone and Android phones.

You would be able to search the VMware knowledge bases, read blogs, watch VMware KBTV videos direct from your cel phone… online and for free.

Take a look.
Happy Thanksgiving

Wednesday, November 17, 2010

Svmotion – Failed to connect to host

A few weeks ago I realized the storage Vmotion (svmotion) was not working.
Right after it started it stopped with an error message: Failed to connect to host

I did check several KBs and posts out there, but the common sense was about name resolution (DNS issues), deleting snapshots, restarting the VMware management services.

So I decide to look further, first I wanted to make sure Vmotion was working (the first 10% of svmotion task is a vmotion to the same host). It worked fine; my host was licensed to vmotion.
Then I looked at the host’s logs, /var/log/vmkernel, /var/log/vmkwarning, var/log/vmware/hostd.log and nothing in there gave me a clue.

A few more troubleshoot was.

Moved the guest to another cluster, to make sure the issue was not on the guest. It worked, so the problem was within the hosts.
I moved one of the hosts to a new cluster, just to make sure the problem was not with some cluster configuration. It was not.

Then looking at the Virtual Center logs (could be located at: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs )
Looks for the actual one, it starts from vpxd-0.log to vpxd-9.log

I found a very interesting log:

[VpxdInvtHost] IP address change for to not handled, SSL certificate verification is not enabled.

So, apparently Virtual Center was thinking I have changed the cOS IP (I have not) and just during svmotion it was getting lost in the middle of the process.

At this time, I put the host into maintenance mode (to move the guests off), then disconnect the host and remove it from VC.
I wait a few seconds and add it back. ( it will register the host with correct IP back on VC)

After that my svmotion started to work again.

Hope it can help someone out there.

Friday, November 12, 2010

VMware PowerCLI script to manage VM resources


A few months ago I talked about memory limitation and the impacts it could make on your guest’s performance.

So, you may be wondering what guest’s have limitation.
With this cool PowerCLI script you can identify the limits on your guests very quickly.

Let’s see how it works:

- start PowerCLI
- run: get-vm | get-vmresourceconfiguration | select VM,MemLimitMB

Guest’s with MemLimitMB = -1 means unlimited

Obs: there are a lot of other settings on the vm resource configuration, if you run the command without the “select” section you will see all of them.

Now that you know what are the memory limits on you guests, it’s time to adjust it
Again another PowerCLI script can make it happens very fast, instead of going server by server through Virtual Center.

- start PowerCLI
- run: get-vm | get-vmresourceconfiguration | Set-VMResourceConfiguration -MemLimitMB "value or $null"

Obs1: $null means unlimited
Obs2: If you want to specify just a few VMs, you need to setup a variable a place it just after get-vm command, see the PowerCLI basics if you don’t know how.

Have a good weekend all

Friday, November 5, 2010

VMware PowerCLI Basics

I realized that every post about PowerCli I write I need to give the same instructions: Install, configure, etc…

So, I’m creating this post with the basics of PowerCli and in the future I will always make reference to this post.

Let’s get started:

Make sure you have PowerShell installed (newer O.S. already have it, if you don’t have it go to Microsoft web page download and install it.)

Then you need to install PowerCLI, download it here. (the installation is pretty much the same…Next..Next..Finish)

Now, that it’s installed, you just need to launch, there should be a shortcut on your desktop or through the Programs Menu under VMware

First thing you need is to connect on your Virtual Center.
- Run: Connect-VIServer –Server “your_VC”

Then you can place all the command and scripts

Exporting the results:
To export the results you can:

1. after the command add “ > file”
ex: Get-VM > c:\temp\result.txt

2. export to a csv file. After the command add “ | Export-CSV your file”
ex: Get-VM | Export-CSV c:\temp\result.csv

Working with batch files
PowerCli can also work with batch files, so you can create scripts and run them against just some specific serves.

- create a txt file with one host per line (ex: c:\temp\servers.txt)

Then you can read this for the source of hosts:

Option 1:
Reading the file to a variable
- Run: $host = Get-Content c:\temp\servers.txt
Running the command against the variable
- Run: Get-VM $host

Option 2:
Reading the hosts direct from file
Get-Content c:\temp\servers.txt | foreach { Get-VM $_ }

Here you go, now you are ready to play with PowerCli, the basic syntax is there, you just need to change the commands you need to run and adjust any additional parameter you might want.

See you next

Who am I

My photo
I’m an IT specialist with over 15 years of experience, working from IT infrastructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Consulting Architect, helping customers to embrace the Cloud Era and make them successfully on their journey. Despite the fact I'm a VMware employee these postings reflect my own opinion and do not represents VMware's position, strategies or opinions.

Most Viewed Posts

Blog Archive