Tuesday, December 9, 2014

SQL server fails with the error: An error occurred while attempting to configure the View Event database

SQL server fails with the error: An error occurred while attempting to configure the View Event database


Configuring VMware View Event database on an SQL server fails with the error: An error occurred while attempting to configure the database (1029537)


Symptoms


  • You cannot configure the VMware View Event database.
  • Configuring the VMware View Event database using the Admin UI fails.
  • You see the error:

    An error occured while attempting to configure the database. Double check the database parameters and ensure that the database is not down, restarting, or otherwise unavailable.
  • In the Connection server log located at C:ProgramData\VMware\VDM\logs, you see messages similar to:

    ERROR (0C68-0D0C) <TP-Processor8> [ConfigurationManagerBean] ADAM Error code: 2,128 com.vmware.vdi.admin.ui.ConfigurationManagerBean.updateDatabaseConfiguration(SourceFile:176)
    com.vmware.vdi.adamwrapper.exceptions.ADAMServerException: database initialization failed, SQL exception when connecting to database: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: The TDS protocol stream is not valid..

Purpose

This article provides troubleshooting steps to perform when you are unable to configure the VMware View Event database.

Resolution

To troubleshoot issues when you are unable to configure the VMware View Event database:
  1. Consult the product logs for additional error messages. For more information on log file locations, see Locations of VMware View log files (1027744).
  2. Ensure the SQL Server machine has network connectivity.
  3. Ensure the user name and password for the VMware View Event database account is correct.
  4. Ensure port 1433 is open. For more information, see Testing port connectivity with Telnet (1003487).

    Notes:
    • If you are using vCenter Server 5.1 with vCenter Single Sign-On (SSO) and using the same database as the View Event database, do not change the dynamic port setting to TCP port 1433. This causes SSO to fail.
    • If the SSO database uses a static port number, obtain the port number from the C:\Program Files\VMware\Infrastructure\SSOServer\logs\config file on the vCenter Server machine and use the same TCP port in View Connection server.
  5. Disable Windows Firewall on the SQL Server machine. If you are unable to do this, set a Firewall exception for port 1433.
  6. If the SQL Server binary or View Connection Server is running on Windows Server 2008, disable User Account Control (UAC). For more information, see the Microsoft TechNet article, User Account Control Step-by-Step Guide.
  7. If enabled, disable the Force Protocol Encryption option on the SQL Server machine. This is not enabled by default. For more information, see Microsoft Knowledge Base article 316898.
  8. Ensure the SQL Server authentication option is selected and the Enforce password policy options for the View Event database log in account is deselected.
  9. Ensure the SQL Server Configuration Manager TCP Dynamic Ports field is blank and the TCP Port field is populated with port 1433:

    Note: If you already have SQL configured and set to listen on a port other than 1433, changing the port setting can bring down the SQL databases. Therefore, change the port number only if a port is not already configured and in use.

    1. Click Start > All Programs > Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager.
    2. Expand SQL Server Network Configuration and select Protocols for the SQL Server.
    3. Right-click TCP/IP and click Properties.
    4. Click IP Addresses.
    5. In the IPAll section, delete the number in the TCP Dynamic Ports field and leave it blank.
    6. Type 1433 as the port number for this SQL Server instance. You see a message indicating that the service must be restarted.
    7. Restart the SQL Server service.
  10. Ensure the user account that is used to log in to the Event database is the owner of the database.

    To verify if the account used to log in to the Event database is the owner of the database:
    1. Connect to the database using SQL Server Management Studio.
    2. Expand the database directory.
    3. Right-click the View Event database and click Properties. This displays the account that owns the database.
  11. Ensure that the SQL Server and Windows Authentication mode is enabled on the SQL Server:

    1. Connect to the database using SQL Server Management Studio.
    2. Right-click SQL Server and click Properties.
    3. Click Security.
    4. Under Server authentication, select SQL Server and Windows Authentication mode and click OK. You see a message indicating that you need to restart the server.
    5. Click OK to restart the server.
    6. Right-click SQL Server and click Restart.
    7. Click Yes to confirm.
    8. Click Yes to restart the VirtualCenter Server service.
  12. Ensure that the event database is using a case-insensitive collation. For more information, see the Microsoft Developer Network articleSetting and Changing the Database Collection.

This issue can also occur if you are using an older version of the JDBC driver. To resolve this issue, use a newer version that has a number of bug fixes for SSL certificate issues.

To install the new JDBC driver:
  1. Stop the VMware View Connection Server service. For more information, see Stopping, starting, or restarting VMware View services (1026026)
  2. Create a back up of the sqljdbc-1.2.jar file by copying the file, and  renaming the copy to sqljdbc-1.2.jar.old or other name.

    The file will be located at: 
    • For View 4.5 and 4.6 C:\Program Files\VMware\VMware View\Server\broker\lib\sqljdbc-1.2.jar
    • For View 5.0, 5.1.x, 5.2.x  C:\Program Files\VMware\VMware View\Server\broker\shared\lib\sqljdbc-1.2.jar
  3. To replace the sqljdbc-1.2.jar file with the file from Microsoft SQL Server JDBC Driver 3.0:
    1. Download the driver from the Microsoft SQL Server JDBC Driver 3.0 download page.
    2. Extract sqljdbc4.jar from the downloaded file.
    3. Copy the new sqljdbc4.jar file, replacing the existing file, to:
      • For View 4.5 and 4.6 C:\Program Files\VMware\VMware View\Server\broker\lib\sqljdbc-1.2.jar
      • For View 5.0, 5.1.x, 5.2.x  C:\Program Files\VMware\VMware View\Server\broker\shared\lib\sqljdbc-1.2.jar
    Note: The new sqljdbc4.jar file does not need to be renamed.
  4. Start the VMware View Connection Server service. For more information, see Stopping, starting, or restarting VMware View services (1026026).
  5. Repeat steps 1 to 4 for each remaining Connection Server.

    Wait for five minutes before attempting to configure the Events database again.

Monday, December 8, 2014

VMware OS Optimization Tool



The VMware OS Optimization Tool helps optimize Windows 7/8/2008/2012 systems for use with VMware Horizon View. The optimization tool includes customizable templates to enable or disable Windows system services and features, per VMware recommendations and best practices, across multiple systems. Since most Windows system services are enabled by default, the optimization tool can be used to easily disable unnecessary services and features to improve performance.
You can perform the following actions using the VMware OS Optimization Tool:
  • Local Analyze/Optimize
  • Rempte Analyze/Optimize
  • Optimization History
  • Managing Templates
New for version 2014!
  • Updated templates for Windows 7/8 – based on VMware’s OS Optimization Guide
  • New templates for Windows 2008/2012 RDSH servers for use as a desktop
  • Single portal EXE design for ease of deployment and distribution
  • Combination of Remote and Local tools into one tool
  • Better template management, with built in and user-definable templates
  • Results report export feature.
Various bug fixes, usability enhancements, and GUI layout updates.

https://labs.vmware.com/flings/vmware-os-optimization-tool


Friday, November 14, 2014

Setting up PCoIP Remote Access with View

Setting up PCoIP Remote Access with View 4.6 and Newer



Issue: when they setup PCoIP remote access with View 4.6 and try a PCoIP connection from the View Client, they just get a black screen for a few seconds and then an error indicating that the session has ended. 

On the iPad View Client this problem shows as a message saying "your desktop is loading too slowly". In the vast majority of cases, this was caused because one of the 3 setup steps shown below was not done or not done properly. If you're getting these symptoms, then check very carefully that these 3 simple steps have been done correctly.

When View Connection Servers and Security Servers are running 4.6 or newer, you can enable this functionality by following these three steps:

1. Enable PCoIP Gateway functionality on each Connection Server. By default, PCoIP connections are direct from the View Client to the View virtual desktop as they were in View 4.0 and 4.5. If you have some Connection Servers for remote access and some for local access then just do this for the remote access ones. That way local access PCoIP can still be direct to the View virtual desktop. Using View Administrator, go to the Configuration Servers section. Select a Connection Server, select Edit and tick the box "Use PCoIP Secure Gateway for PCoIP connections to desktop". Then for all users of this Connection Server and any Security Servers attached, PCoIP will gateway through either the attached Security Servers or this Connection Server. The server used for the PCoIP gateway (usually the Security Servers) must be running View 4.6 or newer on Windows Server 2008 R2.

2. On every attached Security Server, set up the “External URL” and the new "PCoIP External URL". These URLs are used by the View Clients to connect to the particular View server. These names and addresses must be resolvable and usable by the clients. If remote connections are made directly to the Connection Server then the External URLs must also be setup on the Connection Server.

3. Update the firewall to allow PCoIP to pass through. This is:

PCoIP between View Client and Security Server

  • TCP destination port 4172 from Client to Security Server
  • UDP destination port 4172 from Client to Security Server
  • UDP source port 4172 from Security Server to Client (this is the reply UDP data)

PCoIP between Security Server and virtual desktop

  • TCP destination port 4172 from Security Server to virtual desktop
  • UDP destination port 4172 from Security Server to virtual desktop
  • UDP source port 4172 from virtual desktop to Security Server (this is the reply UDP data)

This is in addition to the firewall rules used in View 4.5.

For further details, refer to the View 4.6 Architecture and Planning Guide and the View Administrator Guide here View Documentation.

Setting up PCoIP Remote Access with View Vmware Tutorial


















Thursday, November 13, 2014

View Desktop and Pool Settings

 
You must specify desktop and pool settings when you configure automated pools that contain full virtual machines, linked-clone desktop pools, manual desktop pools, and Microsoft Terminal Services pools. Not all settings apply to all types of desktop pools.
Desktop and Pool Setting Descriptions
Setting
Options
State
Enabled. After being created, the desktop pool is enabled and ready for immediate use.
Disabled. After being created, the desktop pool is disabled and unavailable for use, and provisioning is stopped for the pool. This is an appropriate setting if you want to conduct post deployment activities such as testing or other forms of baseline maintenance.
Connection Server restrictions
None. The desktop pool can be accessed by any View Connection Server instance.
With tags. Select one or more View Connection Server tags to make the desktop pool accessible only to View Connection Server instances that have those tags. You can use the check boxes to select multiple tags.
Remote desktop power policy
Determines how a virtual machine behaves when the user logs off of the associated desktop.
For descriptions of the power-policy options, seePower Policies for Desktop Pools.
For more information about how power policies affect automated pools, see Setting Power Policies for Desktop Pools.
Automatically logoff after disconnect
Immediately. Users are logged off as soon as they disconnect.
Never. Users are never logged off.
After. The time after which users are logged off when they disconnect. Type the duration in minutes.
The log off time applies to future disconnections. If a desktop session was already disconnected when you set a log off time, the log off duration for that user starts when you set the log off time, not when the session was originally disconnected. For example, if you set this value to five minutes, and a session was disconnected 10 minutes earlier, View will log off that session five minutes after you set the value.
Allow users to reset their desktops
Allow users to reset their own desktops without administrative assistance.
Allow multiple sessions per user
Allow a user to connect to multiple desktops in the pool at the same time.
Delete desktop after logoff
Select whether to delete floating-assignment, full virtual machine desktops.
No. Virtual machines remain in the desktop pool after users log off.
Yes. Virtual machines are powered off and deleted as soon as users log off.
Delete or refresh desktop on logoff
Select whether to delete, refresh, or leave alone floating-assignment, linked-clone desktops.
Never. Virtual machines remain in the pool and are not refreshed after users log off.
Delete immediately. Virtual machines are powered off and deleted as soon as users log off. When users log off, View Manager immediately puts virtual machines in aDeleting state.
Refresh immediately. Virtual machines are refreshed as soon as users log off. When users log off, View Manager immediately puts virtual machines in maintenance mode to prevent other users from logging in as the refresh operation begins.
Refresh OS disk after logoff
Select whether and when to refresh the OS disks for dedicated-assignment, linked-clone desktops.
Never. The OS disk is never refreshed.
Always. The OS disk is refreshed every time the user logs off.
Every. The OS disk is refreshed at regular intervals of a specified number of days. Type the number of days.
The number of days is counted from the last refresh, or from the initial provisioning if no refresh has occurred yet. For example, if the specified value is 3 days, and three days have passed since the last refresh, the desktop is refreshed after the user logs off.
At. The OS disk is refreshed when its current size reaches a specified percentage of its maximum allowable size. The maximum size of a linked clone's OS disk is the size of the replica's OS disk. Type the percentage at which refresh operations occur.
With the At option, the size of the linked clone's OS disk in the datastore is compared to its maximum allowable size. This disk-utilization percentage does not reflect disk usage that you might see inside the desktop's guest operating system.
When you refresh the OS disks in a linked-clone pool with dedicated assignment, the View Composer persistent disks are not affected.
Default display protocol
Select the display protocol that you want View Connection Server to use to communicate with View clients.
PCoIP
The default option wherever it is supported. PCoIP is supported as the display protocol for virtual-machine desktops and physical machines that have Teradici hardware. PCoIP provides an optimized PC experience for the delivery of images, audio, and video content for a wide range of users on the LAN or across the WAN.
Microsoft RDP
Microsoft Remote Desktop Connection (RDC) uses RDP to transmit data. RDP is a multichannel protocol that allows a user to connect to a computer remotely.
Allow users to choose protocol
Allow users to override the default display protocol for their desktops by using View Client.
Windows 7 3D Rendering
You can select whether to enable 3D graphics rendering if your pool comprises Windows 7 desktops that run on vSphere 5.0 or later, PCoIP is the selected protocol, and the Allow users to choose protocolsetting is set to No.
With Windows 7 3D Rendering, users can take advantage of graphics enhancements that are provided by applications such as AERO, Microsoft Office 2010, and Google Earth.
If your View deployment does not run on vSphere 5.0 or later, this setting is not available and is inactive in View Administrator.
When you select this feature, you can configure the amount of VRAM that is assigned to desktops in the pool. You can select at most two monitors for your View desktops. The maximum resolution of any one monitor is set to 1920x1200 pixels. You cannot configure this value.
Note
You must power off and on existing virtual machines for this setting to take effect. Restarting a virtual machine does not cause the setting to take effect.
Max number of monitors
If you use PCoIP as the display protocol, you can select the maximum number of monitors on which users can display the desktop.
When the Windows 7 3D Rendering setting is not selected, the Max number of monitors setting affects the amount of VRAM that is assigned to desktops in the pool. When you increase the number of monitors, more memory is consumed on the associated ESX hosts.
When the Windows 7 3D Rendering setting is selected, you can select at most two monitors.
Note
You must power off and on existing virtual machines for this setting to take effect. Restarting a virtual machine does not cause the setting to take effect.
Max resolution of any one monitor
If you use PCoIP as the display protocol and you do not select the Windows 7 3D Rendering setting, you should specify the maximum resolution of any one monitor.
When the Windows 7 3D Rendering setting is not selected, the Max resolution of any one monitorsetting affects the amount of VRAM that is assigned to desktops in the pool. When you increase the resolution, more memory is consumed on the associated ESX hosts.
When the Windows 7 3D Rendering setting is selected, you cannot change the maximum resolution of any one monitor. The resolution is set to 1920x1200 pixels.
Note
You must power off and on existing virtual machines for this setting to take effect. Restarting a virtual machine does not cause the setting to take effect.
Adobe Flash quality
Determines the quality of Adobe Flash content that is displayed on Web pages.
Do not control. Quality is determined by Web page settings.
Low. This setting results in the most bandwidth savings. If no quality level is specified, the system defaults to Low.
Medium. This setting results in moderate bandwidth savings.
High. This setting results in the least bandwidth savings.
For more information, see Adobe Flash Quality and Throttling.
Adobe Flash throttling
Determines the frame rate of Adobe Flash movies. If you enable this setting, you can reduce or increase the number of frames displayed per second by selecting an aggressiveness level.
Disabled. No throttling is performed. The timer interval is not modified.
Conservative. Timer interval is 100 milliseconds. This setting results in the lowest number of dropped frames.
Moderate. Timer interval is 500 milliseconds.
Aggressive. Timer interval is 2500 milliseconds. This setting results in the highest number of dropped frames.
For more information, see Adobe Flash Quality and Throttling.
Note
Properties set for local desktops do not take effect until the desktops are checked back in.