A. Mikkelsen

VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!

Browsing Posts in Virtual Center

If you ever need to clear the list of ignored SSL certificates (hosts or vCenters) that you use from the VIclient.

  1. Open the “Registry Editor”
  2. Locate the key named “HKEY_CURRENT_USER\Software\VMware\Virtual Infrastructure Client\Preferences\UI\SSLIgnore”
  3. Delete all certificates needed.

 

After I upgraded vSphere vCenter & Client to 4.1 258902, I been getting an error in the vSphere Client.

A internal error occured in the vSphere Client. Details: Object reference not set to an instant object.

The solution is provided by VMware.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1033560

It’s just replacing a DLL file 🙂

The error is only with version 4.1 258902 and not 4.1 Update 1.

Today I needed to create a list of all users connected to a vCenter sever through the Client.
And during so I created a few variants 🙂

This creates a list of all usernames connected to the vCenter server through a vCenter Client.

$svcRef = new-object VMware.Vim.ManagedObjectReference
$svcRef.Type = "ServiceInstance"
$svcRef.Value = "ServiceInstance"
$serviceInstance = get-view $svcRef
$sessMgr = get-view $serviceInstance.Content.sessionManager
foreach ($sess in $sessMgr.SessionList){
   write "$($sess.UserName)"
}

If you want to see a witch clients have been idle for 60 minutes try this.

$svcRef = new-object VMware.Vim.ManagedObjectReference
$svcRef.Type = "ServiceInstance"
$svcRef.Value = "ServiceInstance"
$serviceInstance = get-view $svcRef
$sessMgr = get-view $serviceInstance.Content.sessionManager
foreach ($sess in $sessMgr.SessionList){
    if (($sess.LastActiveTime).addminutes(60) -lt (Get-Date)){
        write "$($sess.UserName)"
      }
}

If you the want to terminate the sessions that have been inactive  for more than 60 minute

$svcRef = new-object VMware.Vim.ManagedObjectReference
$svcRef.Type = "ServiceInstance"
$svcRef.Value = "ServiceInstance"
$serviceInstance = get-view $svcRef
$sessMgr = get-view $serviceInstance.Content.sessionManager
$oldSessions = @()
foreach ($sess in $sessMgr.SessionList){
    if (($sess.LastActiveTime).addminutes(60) -lt (Get-Date)){
        $oldSessions += $sess.Key
      }
}
$sessMgr.TerminateSession($oldSessions)

You can modify the hell out of this script to suit your needs and be my guest….

You can download the full script here.

The scripts are based on code found  at the PowerCLI community by LucD.
http://communities.vmware.com/message/914858#914858

Many admins have upgraded to Windows 7 and gotten into problems when trying to install the vSphere Client.

I have found a few guides to do a workaround, but the best guide is found at techhead.co.uk.
http://www.techhead.co.uk/running-vmware-vsphere-client-on-windows-7

Thanks to Kiwi Si.

Last week I upgraded a Virtual Center server from Win2003 & MSSQL 2000 (32-bit) to Win2008 & MSSQL 2005 (64-bit).

During the installation of vCenter it asked for a 32-bit ODBC even though all the new systems was running 64-bit.
After a some time on Google i found that Windows 64-bit also includes a 32-bit version of the ODBC.

To set up a 32-bit DSN launch the 32-bit version of the Data Source Administrator. It is located at:
%systemdrive%\Windows\SysWoW64\Odbcad32.exe

Also se
http://www.vmwarewolf.com/32-bit-odbc-dsn-for-vsphere/

Today when I needed to upgrade my VC database from MSSQL2000 to MSSQL 2005 i came upon these quick guides.

http://blog.core-it.com.au/?p=27

http://spininfo.homelinux.com/news/VirtualCenter/2008/01/06/Howto_Move_Migrate_Design_VC_DB_from_SQL2000_to_SQL2005__

Howto add webages in vCenter

No comments

If you want to add a website tab to your vCenter, then here is a quick way to do it.

http://www.ntpro.nl/blog/archives/1270-vSphere-Plugin-Wizard-Released.html

Thanks to Ricky over at virtualizeplanet.com

VMware have released a demo on YouTube that shows a “must have” for PowerShell users who automate and manage vSphere and vCenter through PowerShell.

The project is named “Onyx” and works like a middelware between the vCenter Client and the vCenter Server.
Onyx is unfortunately still in a private beta and therefore not acceble to the Public…….. 🙁

Read more on rtfm-ed.co.uk.
http://www.rtfm-ed.co.uk/?p=1643

Or read more on the “get-scripting podcast” blog
http://get-scripting.blogspot.com/2009/08/get-scripting-podcast-episode-12-carter.html

Read this post before upgrading.

Techtarget.com has released their Top 10 pick from VMware to tryout in 2009.
Read it.

Powered by WordPress Web Design by SRS Solutions © 2018 A. Mikkelsen Design by SRS Solutions