Virtual lab for clustering and sql server RRS feed

  • Question

  • Hi All,

    I have to test and practice Distributed Always-on availability group on Windows server 2016. Below MS virtual lab links are not working. Can you please share correct links or alternative links to implement and test below setup.


    a. 4 Windows servers 2016 without domain (servers should be in workgroup).

    b. Two servers (data center1) in one cluster and another two servers (data center2) in another cluster (I will configure cluster)

    c. install sql server 2017 on all 4 labs

    d. Test sql server Distributed Always-on availability group

    Thanks in advance.

    Wednesday, April 29, 2020 10:25 AM

All replies

  • The first method I use for this requires a beta version of AutomatedLab (4.3.1) as a small bug in the Send-ModuleToPSSession was blocking the use of the dbatools module. If you update to 4.3.1 using this Beta MSI you can then execute the rest to deploy your databases.

    Once you’ve updated the version, you can run the following code block to move & restore the databases with dbatools.
    #Copy DBs to VM
    Copy-LabFileItem -Path 'D:\LabSources\Sample DBs\' -ComputerName ($LabName + "SQL2") -DestinationFolderPath C:\
    #Move dbaTools module to Server
    Send-ModuleToPSSession -Module (Get-Module -Name dbatools -ListAvailable) -Session (New-LabPSSession -ComputerName ($LabName + "SQL2")) -IncludeDependencies 
    #Invoke dbatools command
    Invoke-LabCommand -ActivityName 'Restore DBs' -ScriptBlock { Restore-DbaDatabase -SqlServer $env:COMPUTERNAME -Path C:\Sample DBs\ } -ComputerName ($LabName + "SQL2") -PassThru
    Wednesday, April 29, 2020 10:31 AM
  • Hi Max-44, 

    I have downloaded and installed AL 4.3.1 BETA version. After installtion, do i need run above code immediately with the help of PowerShell ISE? If, yes: i am not able to find sample DB's folder in LabSources folder. Do I need to create sample DB's folder inside LabSources folder? Sorry, I am asking lot of questions. This is the first time I am using AL.

    Path: C:\LabSources

    Thanks in Advance. 

    Wednesday, April 29, 2020 1:10 PM
  • Hi Again,

    I am trying to test ISOs have been picked up by AutomatedLab using the following command. But getting error. Please suggest.

    I have performed AL "Complete" installation. Downloaded AL from : https://github.com/AutomatedLab/AutomatedLab/releases/tag/

    Wednesday, April 29, 2020 1:36 PM