VMware Cloud Community
bruce_downs
Contributor
Contributor

viewing a VM's vmware.log

Does anyone know of a way to view a given VM's vmware.log file in the PowerShell Toolkit?

On ESX 3.x I do the following:

$ tail /vmfs/volumes/VirtualMachines2/de3vc20/vmware.log

or the VM's vmx file

$ tail /vmfs/volumes/VirtualMachines2/de3vc20/de3vc20.vmx

On ESXi, I use the Remote CLI's vifs.pl to copy locally and then view in local viewer.

Either way, it's a tedious task if I use VI Client and Virtual Center as my management interface.

0 Kudos
8 Replies
halr9000
Commander
Commander

I wish I could answer this one but I can't. There is an experimental file browsing facility with this version of the toolkit but its barebones right now. There is no feature to download the files, just scan the listings.

Until VMw enhances this facility and/or writes high level cmdlets, it cannot be done easily. With enough delving into the SDK it would be possible. I need to check out vifs.pl to see what it does.

Other options are to wrap plink.exe or even the RCLI. Would be a little odd and not as robust of course.






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
bruce_downs
Contributor
Contributor

I'm playing with VI Client plug ins and came up with a cool plug in to view a VM's vmware.log and VMX file. In the VI Client, just right click on a VM and choose 'View vmware.log' or 'View VMX' and it brings up a new window with the file contents loaded.

It includes an XML configuration file to add the menu items, a C# COM object to login and retrieve vmware.log, an ASP page to call the COM object, and an IIS web app to host the ASP page.

Check out the usage in the attached Word document.

0 Kudos
LucD
Leadership
Leadership

Hi Bruce,

Is this a free plug-in ?

Or is it part of their ECM product ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
bruce_downs
Contributor
Contributor

Currently, it is just a hack that I put together. Our business guy (from Configuresoft) will be showing it at VMworld in a couple of weeks along with a "real" plug-in that I wrote for the show. The real plug-in integrates our ECM product with the VI Client. It includes compliance reports, detailed machine reports, green reports, integration points, etc for all ESX/ESXi servers and their guests that are managed by our product.

I'm not sure how our business people want to handle my plug-ins, but I suspect it'll be a free offering if productized. And I'll advocate misc plug-ins be open sourced or packaged and posted on vmware.com's community site.

Bruce

0 Kudos
LucD
Leadership
Leadership

A nice "teaser" Smiley Wink

Would the method you used be feasible from within a PS script ?

I couldn't find an SDK method to "read" the VMX file. Smiley Sad


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
bruce_downs
Contributor
Contributor

Right, that was my original question. Looking back on how I solved the problem, there still doesn't appear to be a PS way. Like you said, there's no "read." That would be a good enhancement. Our IT department has several production VMs and when they go south or hiccup, the first thing they do it view vmware.log.

My web app implements the viewing of a VM's log file in VI Client by 1) logging in using given session id, 2) resolving the VM's moref, 3) resolving the url to the VM's vmware.log file, 4) doing an http get on the url, and finally 5) displaying the vmware.log file from the http response.

Bruce

0 Kudos
vmwaeiscsi
Contributor
Contributor

Hi

can you please write back how to add the plug in for VC to find vmware.log.

thank you

sp

0 Kudos
issac
Contributor
Contributor

The .vnfs-xxxxx.vmware.log file was found to be associated when Memory/CPU Hotplug options was enabled.

0 Kudos