0

Ansible for SQL Server DBAs. Available Now!

Header Logo
Blog DBA Challenges
Courses
Automated Sandbox Framework Ansible for SQL Server DBAs: Level 1
Log In
← Back to all posts
Connect
Share to…
Share

#010 Pre-Staging the SQL Server Network VCO

Oct 19, 2024

Two weeks ago, you completed the cluster build in preparation for the SQL Server installation.

This week, we'll focus on the crucial step of pre-staging the SQL Server Network Virtual Computer Object (VCO).  Pre-staging the VCO helps avoid permission issues during the SQL Server Failover Cluster Instance (FCI) installation.

This challenge has five objectives.

  1. Pre-stage the VCO in Active Directory.
  2. Disable the VCO in AD.
  3. Grant the CNO permissions to the VCO.
  4. Install SQL Server FCI using the pre-staged VCO.
  5. Verify the SQL Server Network Name and connectivity.

 

If you're using Vagrant, go ahead and spin up your lab using "vagrant up".  This would be a good time to create a second snapshot of your cluster VMs as well (using Vagrant?  use vagrant snapshot save).  Just in case you want to repeat the process.

Ready?


Estimated time to complete: Less than 3 hours.


Step 1: Pre-stage the VCO in Active Directory

We'll start by creating the computer account that will represent the SQL Server Network Name in AD.

  1. Log on to your domain controller, DC1, using your admin_* credentials.
  2. Open Active Directory Users and Computers.
  3. Select the Computers container.
  4. Right-click on Computers, select New, and then Computer.
  5. Type SQLCLUSTER1 (or your preferred name) in the Computer name field.
  6. Click OK.

 

FYI, while you're here, go ahead and create two additional user accounts.  These will be standard accounts that you'll use for the SQL Server Agent and Database Engine service accounts. I went with sqlclustengsvc and sqlclustagentsvc.

Step 2: Disable the VCO

Disabling the VCO allows the cluster to take ownership during the SQL Server installation.

  1. Right-click on SQLCLUSTER1 and select Disable Account.
  2. Confirm that the account now shows a down arrow indicating it's disabled.

Step 3: Grant the CNO Permissions to the VCO

The Cluster Name Object (CNO) needs permission to bring the VCO online.

  1. Ensure Advanced Features are enabled (click view in the menu and make sure Advanced Features is checked).
  2. Right-click on SQLCLUSTER1 and select Properties.
  3. Go to the Security tab and click Add.
  4. Click Object Types, check Computers, and then click OK.
  5. In the Enter the object names to select field, type the name of your CNO (e.g., CLUSTER1), then click Check Names, and OK.
  6. Back in the Permissions window, select the CNO (e.g., CLUSTER1$).
  7. Grant Full Control permissions.
  8. Click OK to apply the changes.

Step 4: Install SQL Server FCI on the first node

Now, you're ready to install SQL Server and use the pre-staged VCO.  You'll need the SQL Server 2022 Developer Edition ISO for this step.

  1. Log in to CLUSTER1SRV1 using your standard user account.
  2. Start the SQL Server installation.
  3. In the SQL Server Installation Center, click Installation on the left and choose New SQL Server failover cluster installation.
  4. Proceed through the setup by accepting the license terms and selecting the features you need.
  5. On the Instance Configuration page, for SQL Server Network Name, enter SQLCLUSTER1.
  6. On the Cluster Resource Group page, accept defaults or specify as needed.
  7. On the Cluster Disk Selection page, select the shared disks you added to the cluster (E, F, and T).
  8. On the Cluster Network Configuration page, provide a static IP address for the SQL Server instance.  Remember to use an IP that falls outside the DHCP range.  I went with 192.168.88.8.
  9. On the Service Configuration page, provide the service accounts you created earlier (leave the startup type as manual).  Check "grant perform volume maintenance tasks privileges to SQL Server Database Engine Service, and click next. 
  10. On the next page, configure the authentication mode for mixed mode, add a SA password, and add your current user to the sysadmin server role. 
  11. Click the Data Directories tab.  Choose E:\ as the data root directory, E:\Data as the user database directory, and F:\Data as the user database log directory.  The backup directory can be left as the default for now (not best practice, but you can configure a file share later).
  12. Click the Tempdb tab and configure the data and log directories to use T:\Data.
  13. Click Next or configure the remaining maxdop and memory parameters (then next).
  14. Click Install.

Wait for the installation to complete before proceeding to Step 5.  Did you get the green checks? 

Step 5: Verify the SQL Server Network Name and Connectivity

Check the VCO in Active Directory:

  • On DC1, refresh Active Directory Users and Computers.
  • Verify that SQLCLUSTER1 is now enabled.

Verify in Failover Cluster Manager:

  • On CLUSTER1SRV, open Failover Cluster Manager.
  • Expand Roles and select your SQL Server role.
  • Ensure that all resources are online, including the SQL Server Network Name.

Test Connectivity:

  • You can install SQL Server Management Studio on a client machine (SRV1, built in the 001 challenge, would be a good place for it).
  • Try to connect to SQLCLUSTER1.  Bummer, you won't be able to.

 

We'll stop here for this week.  Your last step is to determine why you can't connect to SQLCLUSTER1 from SRV1.  Leave a comment below if you solve it.  

Helping Others and Sharing Your Results

That's it for this week.  In the next challenge, we'll address why you can't connect yet and add our second cluster node.

If you have tips other readers can learn from, please share them in the comments.  You can message me on LinkedIn or post about it and tag me with the #dbachallenges hashtag.

Feedback

If there's a DBA Challenge you'd like to see, let me know by replying to this email.  

Over the course of several weeks, you've built a cluster and half of an FCI.  These are a lot of steps to perform manually each time. 

If you're curious to learn more about automation, I'd invite you to check out Ansible for SQL Server DBAs: Level 1.  Although Level 1 won't cover clustering, you'll build a foundation, using real-world playbooks, which will support both clustering and Availability Groups later (Level 2). 

Already know PowerShell and transact SQL?  Great, you'll continue to use those skills while also learning how Ansible can be used not just for SQL Server, but for configuring the OS and interacting with Active Directory.

It includes a few bonuses for registering early and is limited to 10 spots.  However, this course isn't for everyone.  It's very much hands-on with limited slide decks.

Who Should Not Enroll?

  • Those Unwilling to Commit: If you're not ready to invest time and effort, this course isn't the right fit.
  • Looking for Quick Fixes: This program requires dedication and application, not a passive approach.

How to Secure Your Spot.

  1. Enroll Today: Click the link below to secure your spot in this exclusive pre-sale offer.
  2. Watch Your Email: You'll be notified as the modules and bonuses are released.

Click Here to Enroll Now

Feel free to reply to this email and share your thoughts anytime—I’m all ears!

Good luck, and I look forward to seeing your results!

Luke

Responses

Join the conversation
t("newsletters.loading")
Loading...
#016 Leveraging Ansible Variables to Configure Lock Pages in Memory
You've probably seen it happen.  During peak load on a SQL Server instance, the operating system occasionally pages out parts of SQL Server's memory to disk, causing performance slowdowns.  And you've probably read how Lock Pages in Memory can help address this issue.   Granting this user right can be time-consuming and error-prone when done manually especially if you need to grant the permissi...
#015 Introduction to the Automated Sandbox Framework
2025 is just around the corner, and it's shaping up to be an exciting year for DBAs.  With Windows Server 2025 already here and SQL Server 2025 on the horizon, there's no better time to sharpen your skills and prepare for what's ahead. This year, I've focused on solving a common challenge for DBAs: how to quickly and consistently build test environments for learning and experimentation. In mid-...
#014 Introduction to the Enterprise Policy-Based Management Framework
It's been a few weeks since the last edition.  Life happens--between releasing Ansible for SQL Server DBAs, celebrating Thanksgiving, preparing for Christmas, and juggling the day-to-day demands of being a full-time consultant, it's easy to feel stretched thin.  Have you ever felt that way? But here's a question:  Are we just staying busy or moving toward our goals (we like to think so)?  Are o...

DBA Challenges

Helping you become a more efficient SQL Server Database Administrator through real-world challenges and automation.
Footer Logo
Policies Contact
© 2025 AUTOMATESQL LLC

Five Steps to Spot Automation Opportunities

Wondering if that task you're working on should be automated?  With your free Time Tracker Excel workbook, you're able to easily track and analyze how you spend your time throughout the day.

 

When you signup, we'll send you periodic emails with additional free content. Unsubscribe anytime.