Pages

Total Pageviews

Wednesday, December 12, 2012

VSphere 5.1 Syslog Server

  • It is used to redirect the ESXi Host logs to Vcenter server. 
  • Sys log server is normally installed on a vCenter server.
  • Machine that connects to the vCenter Server through the vSphere Client must have an IPv4 address for the Syslog Collector service to work.
Configuration of Sys log server is fairly simple.

Pre-requisites :

  1. Install the Syslog application from vSphere installation Media .
  2. Know the retention policy 
  3. Check if firewall port 514  is not blocked in vCenter server


Following steps can be used to configure the sys log server


  1. Enable the sys log service in all the ESX hosts in the cluster.

    ESX Host => configuration =>security Profile =>firewall=>Syslog (hit the check box)
  2. Set the sys log path for each host in the cluster

    ESX Host =>Advanced Settings =>Syslog=>global=>syslog.global.loghost
     Set  to  tcp://vcenterip:514

  3. Connect to ESXi Host and restart the syslog service.

    esxcli system syslog reload
  4. Configured settings can be found at






Monday, December 10, 2012

Unable to login - Group policy Client

Error Msg "Group policy client service failed the logon"

Connect to the server using net Bios path \\servername\drive$\users

Rename the profile folder of the user who is not able to login to the system . 

User will be able to login after renaming the profile folder. The issue is caused due to the Corrupted profile folder.

This error is user specific not system specific.

vMotion Error - ESX 4.1 to ESXi5.1

Today I came across this error while migrating the machine from ESX 4.1 Host to ESXi 5.1 .

This is a know issue as said by VMware.  Work around would be shutdown the virtual machine and start it in the New ESXi 5.1 Host . 

Things which didnt help : 

  1. Restart the Virtual Machine 
  2. Power off , Un- register and Register . 



Reference :  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2036892

Change Memory limit of All the VMs

I had a requirement to change the limit of all the virtual guests  to Unlimited .

Limit can be an issue when we upgrade the virtual machine memory to a higher value . For OS it would look like it has the memory but host will not allow to use the memory above the limit ( previous configured value in my case).

We have a misconception above the unlimited memory . Unlimited memory means using all the allocated memory . It will never be above the configured or allocated memory.

Following power shell script can be used to change the Limit to Unlimited.



Connect-VIServer vcenterserver -User "vcenter_admin" -Password "Password"

Get-VM | Get-VMResourceConfiguration | where {$_.MemLimitMB -ne '-1'} | Set-VMResourceConfiguration -MemLimitMB $null

Disconnect-VIServer vcenterserver -Confirm:$false

Tuesday, November 27, 2012

View the Logs - DCUI

DCUI Refers to Direct Console user Interface. Many of us like me are from Windows background and are not familiar with the  VI commands .  This post gives the basic commands that can be used to read the logs. 

When you log into the DCUI , you will see an option to read the system logs . When you select the option you would see the list of logs available . 



When you select a system log you will view the content of the Log file . When you hit "H" , you will see the help file with description of the keys .


Usually we would always want to start the troubleshooting from end of the file . To do so you can hit "G" it will take the cursor to end of the file and hit "g" to go to start of file. 


  1. To go to a particular file hit "100g"
  2. To search a word use "/error"




|

Friday, November 23, 2012

Snapshot of Physical Machine



 Many of us come across a situation where we want to Migrate a Physical server which is very critical  to business and we cannot afford the physical damage . 

We came across a great Open  Source software called Clone Zilla . Its a good software with proper instructions . 

You can find the instruction from below link

Monday, October 22, 2012

Disconnecting the Idle Sessions in Vsphere Server


Displaying the sessions on a vsphere server . 

Following script  can be used to display the sessions on the vsphere server


Function Get-ViSession { 
    
    $SessionMgr = Get-View $DefaultViserver.ExtensionData.Client.ServiceContent.SessionManager 
    $AllSessions = @() 
    $SessionMgr.SessionList | Foreach {    
        $Session = New-Object -TypeName PSObject -Property @{ 
            Key = $_.Key 
            UserName = $_.UserName 
            FullName = $_.FullName 
            LoginTime = ($_.LoginTime).ToLocalTime() 
            LastActiveTime = ($_.LastActiveTime).ToLocalTime() 
            
        } 
            If ($_.Key -eq $SessionMgr.CurrentSession.Key) { 
                $Session | Add-Member -MemberType NoteProperty -Name Status -Value "Current Session" 
            } Else { 
                $Session | Add-Member -MemberType NoteProperty -Name Status -Value "Idle" 
            } 
            $Session | Add-Member -MemberType NoteProperty -Name IdleMinutes -Value ([Math]::Round(((Get-Date) – ($_.LastActiveTime).ToLocalTime()).TotalMinutes)) 
    $AllSessions += $Session 
    } 
    $AllSessions 
}

Get-ViSession vsphereserver



Disconnecting the sessions which are idle for 30 min 


Connect-VIServer vsphereserver -User username -Password pwd

Function Disconnect-ViSession { 
       [CmdletBinding()] 
    Param ( 
        [Parameter(ValueFromPipeline=$true)] 
        $SessionList 
    ) 
    Process { 
        $SessionMgr = Get-View $DefaultViserver.ExtensionData.Client.ServiceContent.SessionManager 
        $SessionList | Foreach { 
            Write "Disconnecting Session for $($_.Username) which has been active since $($_.LoginTime)" 
            $SessionMgr.TerminateSession($_.Key) 
        } 
    } 
}
Get-VISession | Where { $_.IdleMinutes -gt 30 } | Disconnect-ViSession