How to check all those users those who are accessing the particular vm console.
I am looking for all active sessions with vm console.
Assuming there are more than 1 concurrent connections to a VM console, if you try to open VM console from your vsphere client, it will display the total number of concurrent vm console sessions count at the top of the VM. Incase if you want to see user name, then you need to dig Events using Tasks and Events tab to really findout who are accessing.
How we can say only those connections are active. Let's assume 4 connections are started with one vm
first at 1:00 PM
second at 1:30 PM
third at 1:45 PM
forth at 2:00 PM
now last connection that was started at 2:00 PM is closed how we can say that is closed not any other connection is closed because in event tab you will get only this information connected from remote console
Ranjana,
AFAIK the answer to your is question is "Not Possible".
But to open the VM console you should have exclusive rights on ESXi server,if you are trying to open up the console through vSphere client or there should be a user who has the permission to open the VM consoles defined in the vCenter Server. In both the cases you can find out who all as accessed the consoles from the Tasks & Events tab.
But is there any practical needs for your request?
~dGeorgey
Hello,
Here are two methods to view concurrent sessions in VMware.
1. From PowerCLI (Using command get-visession)
2. From GUI
In addition, see link below:
List and Disconnect vCenter Sessions | VMware PowerCLI Blog - VMware Blogs
Yours,
Mar Vista
It is more windows than vmware to find who logged on the console
Use tsadmin and connect to the remote ip and check who logged into the console
Venkat
iam using command quser in cmd:
C:\Users\vmware_admin>quser
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
xxx console 1 Active none 9/16/2013 4:43
PM
>vmware_admin rdp-tcp#0 2 Active . 9/16/2013 4:04
PM
Hello,
Use command get-visession from PowerCLI to view connected users in VMware.
Another way is from GUI.
Hope helped you.
Take care!
Function Get-ViSession {
<#
.SYNOPSIS
Lists vCenter Sessions.
.DESCRIPTION
Lists all connected vCenter Sessions.
.EXAMPLE
PS C:\> Get-VISession
.EXAMPLE
PS C:\> Get-VISession | Where { $_.IdleMinutes -gt 5 }
#>
$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
}
When this function is run it will give you a list of the connected sessions and various useful properties:
This can obviously be filtered using the standard PowerShell cmdlets to list any sessions which have been idle for over 30 minutes:
RanjnaAggarwal wrote:
How to check all those users those who are accessing the particular vm console.
My understanding has always been to look at the VM's events (VM> Task & Events tab > Events) for "A ticket of type mks has been acquired." under the description column This is basically a request to open the console and it is logged in the events with the user who requested it.
Re: A ticket of type mks has been acquired?
Hope that helps!
-Lenny
Go to the session option in Vcenter server and it will show you the existing session detail who is currently connected the VM Console.
I've developed a PowerCLI script which can collect the events of all the users who accessed VM console. You can find it here.
Hi, VM console access is authenticated through a ticket session, for the VM in question:
And this should tell you exactly who opened console to a VM.