In this part, we are going to install and configure SQL server 2017, then create the databases for vCenter server, View Composer and View Events. Also, important configurations will be made in order to add this user later on to a View Connection server.
This is part 6 out of 12 of the VDI LAB series. Check out the introduction first.
The ultimate VDI deployment guide (from scratch) with VMware vSphere 6.5 and Horizon View 7.3 – 2018. 😉
- Windows Server 2016 template, previously created in part 4 of this series
- Download SQL Server 2017 (This will be performed in section 3)
2. Prepare the VM
- Deploy the VM from the template previously created and modify the hardware specs for CPU, RAM, and HDD.
- Configure a static IP address.
- Change computer name and add the server to the domain.
- Use the domain controller server credentials.
- Reboot the VM
@Domain Controller Server
- The SQL Server will be added to the computers folder of the domain controller server. Later this can be moved to the new OU VM / Computer (Created in part 5 - section 5 - of this series).
3. Install SQL Server 2017
@ SQL Server VM
- Download SQL Server 2017, here.
- Let’s use the Developer edition.
- Double-click in the application SQL file to start the installation.
- From installation type select Custom
- Select media download target (Just leave as default).
- The download will begin. This will take some time, after this, the installation wizard will start.
- From SQL Server Installation Center, select Installation.
- Select: “New SQL Server stand-alone installation or add features to an existing installation”
- Check Specify a free edition and choose “Developer”
- Accept license terms.
- Decide whether or not to use Microsoft Update
- Review Install Rules and make corrections if necessary.
- Select Database Engine Services. Only this feature is necessary for our vSphere environment.
- Specify a name and instance ID. I am using “VM” for both options.
- Leave as default for service account configurations.
- In Authentication Mode select Mixed Mode, enter a password and then click to Add Current User.
- Click Install.
- The installation shouldn't take long.
- Review the installation and features status and click Next.
4. Install SQL Server Management Tools
- Still from SQL Server Installation Center, select: “Install SQL Server Management Studio”
- This action will take you to the Microsoft link to start the download. Select: “Download SQL Server Management Studio 17.4” or the latest one.
- Go to Downloads, double-click SSMS application and click Run.
- From Microsoft SQL Server Management Studio wizard, click Install.
- Wait for the installation to be completed.
- Click Close to finish the installation wizard.
- Click Start and find Microsoft SQL Server Management Studio.
- From Connect to Server, click Browse for more... in Server name. Then go to Local Servers / Database Engine and select the instance previously created during the SQL server installation.
- Type Login and Password credentials and check Remember Password. Click Connect.
- We now have access to the database server.
5. Create Databases and Users
@ Management Studio
Let’s create vCenter database and user. This will be the most important database and user if vCenter Server Windows based is used.
NOTE: I’ll use vCenter based on windows for the sake of practicing, but using VCSA is recommended and lots of steps can be cut down from this installation.
NOTE: If you plan to use VCSA 6.7 as the one to control the desktops, is better to have an embedded database, and the creation of this vCenter user won't be required. But still, View Composer and View Events database are necessary.
5.1 Create vCenter Database
- Right-click Databases and click New Database...
- Name the vCenter database and leave the rest as default, if no special requirement is needed. I found that the database Initial Size of 10MB is OK for my environment. Click OK.
5.2 Create vCenter user
- Got to the Security folder and Right-click Logins, click New Login...
- From Login Name, click Search… then input vCenter user (previously created in the domain controller server in part 5 of this series), click Check Names and then OK.
- The domain controller will ask for credentials.
- From General, select Windows authentication, click OK.
- From User Mappings, select the vCenter database and check this user as db_owner. Or just follow the example and mark as the image below, this is very important!
- Right-click on the database instance and select Properties.
- Go to Permissions, select the vCenter user and check following permissions: View any definition and View server state. Click OK.
5.3 Create View Composer and View Events Databases and Users
- Follow the same steps for the vCenter database and user creation to create:
- View Composer database
- View Composer user
- View Events database
- View Events user
- Apply same permissions and user mappings to these users as was done for the vCenter user, following their respective user/database.
IMPORTANT NOTE: When creating the user for the View Events, SQL Server Authentication MUST be selected, otherwise, it won’t be possible to add to View Connection server.
6. Important Configurations
- Start SQL Server Browser service, by default is Disabled.
- Also, in order to add View Events user later to View Connection server. Make sure TCP/IP status is Enabled and open port 1433 in SQL server. Follow this link for more details. https://kb.vmware.com/s/article/1029537
- Go to Start / SQL Server Configuration Manager.
- Go to SQL Server Configuration Manager (local) / SQL Server Network Configuration / Protocols for VM (instance). Very that TCP/IP is Enabled, If not, enabled it.
- Right-click on TCP/IP and go to IP Addresses tab and go way down to find IPAII. Clear the information on TCP Dynamic Ports and add 1433 port to TCP port. Just as the image below.
After this, databases and users will be ready for the infrastructure.
Im coming to work with you in Taiwan.