fordian
Hot Shot
Hot Shot

vCenter log files

Jump to solution

Hello,

Does anyone know where I can find information about who and when someone has deleted a VM from disk from VC2 ?

thank you

Dominic

0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal

...and you uncommented the lines below to get the file?

#Uncomment the following lines to save the htm file in a central location
#$Date = Get-Date
#$Filename = "C:\Temp\" + $VIServer + "DailyReport" + "_" + $Date.Day + "-" + $Date.Month + "-" + $Date.Year + ".htm"
#$MyReport | out-file -encoding ASCII -filepath $Filename
#Invoke-Item $Filename

View solution in original post

0 Kudos
12 Replies
Troy_Clavell
Immortal
Immortal

you may be able to check the tasks and events tab at the datacenter level

the administration button and system logs has all the vpxd logs as well

......also if you like powershell you may want to look at this script

http://www.virtu-al.net/2009/07/14/powercli-daily-report/

fordian
Hot Shot
Hot Shot

Hello,

I am looking informations about 2 weeks ago Smiley Happy

Dominic

0 Kudos
AndreTheGiant
Immortal
Immortal

Check also on ESX log files (/var/log/vmware/)

Andre

Andre | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
Troy_Clavell
Immortal
Immortal

check here as well

>c:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs

like i said, the script i pointed out will do what you are looking to do as well.

0 Kudos
fordian
Hot Shot
Hot Shot

It works with VC 2.0.4 ?

I installed Powershell and vSphere PowerCli but I have troubles with double quote when executing this : C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ " & "C:\Scripts\DailyReport.ps1 cprexpvmwvcc2″

So I tried into a powershell window and I received the following error :

The term 'Connect-VIServer' is not recognized as a cmdlet, function, operable program, or script file. Verify the term

and try again.

At C:\Scripts\DailyReport.ps1:385 char:29

+ $VIServer = Connect-VIServer <<<< $VISRV

The term 'Connect-VIServer' is not recognized as a cmdlet, function, operable program, or script file. Verify the term

and try again.

At C:\Scripts\DailyReport.ps1:396 char:30

+ $VIServer = Connect-VIServer <<<< $VISRV

Exception calling "Send" with "1" argument(s): "Échec d'envoi du courrier."

At C:\Scripts\DailyReport.ps1:60 char:14

+ $mailer.send( <<<< $msg)

Dominic

0 Kudos
Troy_Clavell
Immortal
Immortal

my vcenter server is lets say vc1234.domain.com

I launch VMware vSphere PowerCLI and cd to the directory where the script rsides then

./DailyReport.ps1 vc1234.domain.com

I use PowerGui to edit the script.

I have vCenter 2.5, but i'm unsure if it works on 2.0.x

0 Kudos
fordian
Hot Shot
Hot Shot

I tried with VC 2.5 and I received the same error message.

The steps I followed :

- I installed PowerShell

- I installed vSphere PowerCli

- Launched PowerCli

- cd c:\scripts

- and run ./DailyReport.ps1 vcname

Do you something I forgot ?

Dominic

0 Kudos
fordian
Hot Shot
Hot Shot

Hello,

Now it connect the VC but I received the following :

Exception calling "Send" with "1" argument(s): "failed to send mail."

At C:\Scripts\DailyReport.ps1:60 char:14

+ $mailer.send( <<<< $msg)

???

Thank you

Dominic

0 Kudos
Troy_Clavell
Immortal
Immortal

Did you set up you mail options? lines 17 - 23

#
$SMTPSRV = "myexchangeserver.mydomain.comk"
#
#
#
# Set the Email address to recieve from
#
$EmailFrom = "reports@mydomain.com"
#
#
#
# Set the Email address to send the email to
#
$EmailTo = "myemail@mydomain.com"

0 Kudos
fordian
Hot Shot
Hot Shot

yes. When I put a remark before the send mail command, the program runs well.

0 Kudos
Troy_Clavell
Immortal
Immortal

...and you uncommented the lines below to get the file?

#Uncomment the following lines to save the htm file in a central location
#$Date = Get-Date
#$Filename = "C:\Temp\" + $VIServer + "DailyReport" + "_" + $Date.Day + "-" + $Date.Month + "-" + $Date.Year + ".htm"
#$MyReport | out-file -encoding ASCII -filepath $Filename
#Invoke-Item $Filename

View solution in original post

0 Kudos
fordian
Hot Shot
Hot Shot

It works Smiley Happy

Thank you for your help

Dominc

0 Kudos