Archive

Author Archive

Duplicate MAC address – PowerShell Script to rescue

October 5th, 2011 4 comments

Today, in out office we were facing a interesting problem. Every now and then one of the VM will timeout. This was causing lot of issues. The VM was in production. This VM was created few days ago and everything was running fine. We were not sure what was causing the problem.
We looked at couple of things like ;-

  1. Network issue
  2. Switch issue
  3. May be the VMware tools had a problem this VM is using VMXNet3 adapter.
  4. Logged a call with VMware support and they wanted config logs for Networking switches – Network Manager was not at all happy when he heard that.

I just realized may be there might be a Duplicate MAC somewhere on the network that might be causing this problem. Here comes powershell to rescue. Did a google and found this nice script , from vNugglets which can tell us if there are any duplicate address on the network.

After running the script, we did find that there was indeed duplicate MAC address on the network which was causing this issue.
Thanks for the script it saved us lot of time.

On a side note :- I was wondering if there are duplicate MAC address across multiple VCenter Server, how are we going to troubleshoot that. Need to do some research to get answer to that question.

Share
Categories: Scripting, VMware, vSphere Tags:

Running Powershell cmdlets on remote computer

October 3rd, 2011 No comments

I am still new to powershell everyday I learn something new about it. Today, while going through the manuals, I noticed a interesting cmdlet called "Enter-PSSession"
 

Description

The Enter-PSSession cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type run on the remote computer, just as though you were typing directly on the remote computer. You can have only one interactive session at a time.
Typically, you use the ComputerName parameter to specify the name of the remote computer. However, you can also use a session that you create by using New-PSSession for the interactive session.
To end the interactive session and disconnect from the remote computer, use the Exit-PSSession cmdlet, or type "exit".

I was having trouble making this cmd work. Every time, I used to get the following error message

PS K:\> Enter-PSSession -computername 10.0.0.1 -credential USA\administrator
Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cannot process the request. Default authentication may be used w
ith an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm
.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to set TrustedHosts run the followin
g command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:16
+ Enter-PSSession <<<<  -computername 10.0.0.1 -credential USA\administrator
    + CategoryInfo          : InvalidArgument: (10.0.0.1:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

After looking at help manuals and Google I found, using the following cmd "winrm quickconfig" at Powershell prompt on the destination computer will do the trick. It will enable firewall exceptions and will accept WS-Man requests to any IP on this machine.
I would like to have firewall exceptions just for few Ip Address and not "ANY IP address". Will have to do more research on this topic. Perhaps it warrents for another blogpost.

PS K:\> Enter-PSSession corp
[corp]: PS C:\Users\TOM\Documents>

All though I have not tested it throughtly, but I think there is lot of potential to use this cmd-let for day to day troubleshooting specially if you need to quickly connect to vcenter server OR some other server and want to have the link to the log files Or services that are running on the computer for example:-

To get a quick look at the services that are running for vmware

[corp]: PS C:\> Get-Service | Where-Object {$_.Displayname -like '*vm*'}

Status   Name               DisplayName
——        —-                     ———–
Running  ADAM_VMwareVCMSDS  VMwareVCMSDS
Stopped  vCOConfiguration   VMware vCenter Orchestrator Configu…
Running  vctomcat           VMware VirtualCenter Management Web…
Running  vimPBSM            VMware vSphere Profile-Driven Stora…
Running  VMTools            VMware Tools Service
Stopped  vmvss              VMware Snapshot Provider
Running  vpxd               VMware VirtualCenter Server

[corp]: PS C:\>

Share
Categories: Uncategorized Tags:

Reference Posters from VMworld 2011

September 28th, 2011 No comments

During VMworld 2011 event  VMware handed out PowerCLI and vSphere ESXi CLI reference poster. They can be downloaded from the following location

PowerCLI 5.0 Reference Poster

vSphere CLI ESXi5.0 Reference Poster

Share
Categories: ESXi 5, VMware, vSphere 5 Tags:

VMware vCenter Server Appliance Installation and Configuration

September 27th, 2011 2 comments

VMware vCenter Server Appliance

As as alternative to installing vCenter Server on a windows machine, you can download the VMware vCenter Server appliance. It is a preconfigured Linux based VM optimized for running vCenter Server.

 

Prerequisites

  1. vSphere Client is already installed
  2. You can deploy vCenter Appliance only on hosts that are running ESX version 4.x or ESXi version 4.x and later
  3. Appliance required at least 7GB of disk space and is limited to a maximum size of 80 GB
  4. Only Support Oracle as external database (Read this somewhere on the net)

I had a hard time in finding the download location. It seems you have to register first, (which makes sense) go to download page, and select the 3 individual files i.e the ovf file, the System disk and the data disk for vCenter Server 5.0 appliance

vCenter Appliance does not support following feature

  1. MS SQL Server is not supported for vCenter Server Appliance
  2. It does not support IPv6 configuration

The embedded database will note support more than 5 hots and 50 VMs.

Steps to Deploy vCenter Server Appliance

  1. Download the appliance
  2. Launch Vi Client -> Select Deploy OVf template
  3. Select the ovf file from the Source
  4. Click next or verify ovf template details
  5. Give the VM name to your Appliance and click Next
  6. Select the Storage Type and click Next
  7. I prefer Thin Provision, click Next
  8. Select Network and Click Next
  9. Click on finish to start the provision process

Steps to Configure the Appliance

  1. Initially when  the appliance boots it is configured to use DHCP. If your network is configured to use DHCP then it is good, otherwise you will have to manually enter the IP Address by selecting the Configure network option using the arrow keys.

  1. Connect with your browner to the above IP Address <https://ipaddress:5480>
  2. Accept the Certificate error message
  3. Login as root and default password is vmware
  4. Accept EULA
  5. Wait for couple of seconds, it will show "requesting information
  6. After this your Appliance is up and running but you will need to configure the database for vCenter Service to start. If you try to start the vCenter Server without configuring the database, you will get  a error message
  7. To Configure database, click on the Database tab, from the Database Type drop down select embedded option. i don't have a oracle database to test this setup and click on save option under actions
  8. Go back to the Status tab and start vCenter Server service after few secs vCenter Service will be up and running

That's it your vCenter Server is up and running.

I am sure, lots of people would like to reduce that RAM requirement, just reduced the RAM to 4GB and still works, this might help people who are working on VMware workstations. I am sure, there must be some reason why VMware recommended 8 GB of RAM. May be for production use its needs that much RAM. In my lab environment, I will further test this.

Share
Categories: ESXi 5, vSphere 5 Tags:

Installing ESXi 5.0 Best pratices

September 26th, 2011 No comments

With the release of vSpehre 5, there are going to be lot of people planning/testing the new product. The following KB article from VMware provides best practices that one needs to follow for installing ESXi.

It also provides some good links to VMware compatibility guide. In my humble opinion everybody should go through this KB and guides before planning any production changes.

KB article 2005099

Share
Categories: Uncategorized Tags:
# this line was added by me, vcpguy to make the Syntaxhighlighter evolved work !!!