A necessary part of any good application, service, or hardware is the ability to record and view log information. Why is this important? Log information can help admins in the pursuit of troubleshooting issues or in tracking down who accessed a system during a given period. In VMware View it will be likely that these types of details will also be very important to customers. Event information is not stored by default, and an event log database must be set up for View to record these events. Today I will walk you through the process of setting up the VMware View events database feature.
Create a VMware View Events Database
To accomplish this task we do indeed need a database for View to record its events into. The two options are a Microsoft SQL or Oracle database. The only other real requirement here is the it must use SQL server authentication and not Windows authentication. I won’t step you through database creation since it is very well documented elsewhere, such as on the VMware support site.
Creating the Database Login
This part can be a bit fuzzy for server admins who do not regularly work with databases. With our database already created we need to create a local SQL account to use for accessing the database. In this example I’m using MS SQL 2008, and it should be very similar in other versions also. You can find more SQL help on the Petri SQL Server resource page.
Log into SQL Management Studio and find the Security folder. Then right-click it and choose to create a New >> Login.
You will be prompted with a window similar to the one shown below that will have both mandatory and optional fields. For the sake of this post, I’m going to just cover the minimum necessary for our task.
- Enter the Login name for the account that you want to create. Then enter the password that you wish the account to use.
- Uncheck User must change password at next login. This tripped me up in my lab test.
- Before we finish creating our login account we need to give it access to the database that was already created. Click on the User Mapping option from the left column.
- In the upper window, find the database that was created for View events and check the box to map it to the account.
- In the lower box assign the dbo_owner rights to the account so that it has sufficient rights.
- Go ahead and click OK to create the account.
Configure Events Database
- With the database and login account created we are now ready to configure View to access the database. To do this, log into the View manager portal. From the left inventory column expand the View Configuration section and click on Event Configuration.
- In the right side of the window (as shown below as step number 2), click the Edit button for the Event Database. A window will pop up that will take us to the next step.
We are now ready to enter the connection details for the events database that was created. The following image shows the window and some sample details form my lab setup.
- Database server – Enter the short or long server name for the SQL server
- Database type – Select to match what type of database you will be using
- Port – This is the SQL port, default will be provided. Only change if you are using something non-standard.
- Database name – Name of database created in first step
- User name – Name of account that we created earlier
- Password – Enter what you used to create the account with earlier
- Table prefix – Enter a string that you would like added
At this point we have successfully connected View with the database that was created. The image below shows what you should see in View manager once the connection is established.
You have the option to choose how long you would like events to be displayed for in the events logs. By default it is three months, but you can change this based on your requirements. The other option is to specify for how many days should items be considered new. This might be helpful if you do not plan on looking at events each day.
Checking VMware View Events
Now that everything is configured, we can now see if we have any events to look at. In my test it was a lab, so there was really nothing happening at the moment; if you have users actively using it, you might see more details. Otherwise, wait a bit and check back.
You are now armed and ready to be an events ninja for VMware View, remember with great power comes great responsibility. So use your tools wisely and hope this helps in your troubleshooting attempts.