pluralsight / PS-AutoLab-Env

A PowerShell module for creating lab configurations using Lability and Desired State Configuration. Look at README.md for more information.
MIT License
269 stars 74 forks source link

Unable to build PowerShellLab environment #243

Closed bibliophile8117 closed 3 years ago

bibliophile8117 commented 3 years ago

I'm trying to set up my first lab environment, but it keeps failing. at the setup-lab step. I'm running PowerShell as an administrator, and I have admin rights on my machine. The console log reads:

`PS C:\Autolab\Configurations\PowerShellLab> Setup-Lab

    This is the Setup-Lab script. This script will perform the following:

    * Run the configs to generate the required .mof files
    Note! - If there is an error creating the .mofs, the setup will fail

    * Run the lab setup
    Note! If this is the first time you have run this, it can take several
    hours to download the ISO files and resources depending on the configuration.
    You may also see new drives being added and removed as the ISO is mounted
    and converted. This step should only happen the first time you run this
    command.

    ** Possible problem
    If the downloads finish but the script doesn't continue (pauses),
    press the Enter key once and it should continue

    *You will be able to wipe and rebuild this lab without needing to perform                                               the downloads again.                                                                                            Installing required DSCResource modules from PSGallery                                                                  You may need to say "yes" to a Nuget Provider                                                                           xActiveDirectory [v3.0.0.0] requires no updates.                                                                        xComputerManagement [v4.1.0.0] requires no updates.                                                                     xNetworking [v5.7.0.0] requires no updates.

xDhcpServer [v2.0.0.0] requires no updates. xWindowsUpdate [v2.8.0.0] requires no updates. xPSDesiredStateConfiguration [v9.1.0] requires no updates. xPendingReboot [v0.4.0.0] requires no updates. xAdcsDeployment [v1.4.0.0] requires no updates. xDnsServer [v1.16.0.0] requires no updates. xWebAdministration [v3.1.1] requires no updates. Build the .Mof files from the configs

Directory: C:\Autolab\Configurations\PowerShellLab

Mode LastWriteTime Length Name


-a---- 11/20/2020 10:36 AM 605872 DOM1.mof -a---- 11/20/2020 10:36 AM 1088 DOM1.meta.mof -a---- 11/20/2020 10:36 AM 12006 SRV1.mof -a---- 11/20/2020 10:36 AM 1088 SRV1.meta.mof -a---- 11/20/2020 10:36 AM 16678 SRV2.mof -a---- 11/20/2020 10:36 AM 1088 SRV2.meta.mof -a---- 11/20/2020 10:36 AM 9706 SRV3.mof -a---- 11/20/2020 10:36 AM 1088 SRV3.meta.mof -a---- 11/20/2020 10:36 AM 18444 WIN10.mof -a---- 11/20/2020 10:36 AM 1090 WIN10.meta.mof Building the lab environment for PowerShellLab Failed to start lab configuration. Resource download 'C:\Autolab\ISOs\2016_x64_EN_Eval.iso' checksum does not match '70721288BBCDFE3239D8F8C0FAE55F1F'. At line:59 char:13

PS C:\Autolab\Configurations\PowerShellLab> Get-PSAutolabSetting

AutoLab : C:\Autolab PSVersion : 5.1.19041.1 PSEdition : Desktop OS : Microsoft Windows 10 Enterprise FreeSpaceGB : 420.57 MemoryGB : 16 PctFreeMemory : 59.05 Processor : Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz IsElevated : True RemotingEnabled : True HyperV : 10.0.19041.1 PSAutolab : 4.18.0 Lability : 0.19.1 Pester : {4.10.1, 3.4.0} PowerShellGet : 1.0.0.1 PSDesiredStateConfiguration : 1.1

PS C:\Autolab\Configurations\PowerShellLab> echo $PSVersionTable

Name Value


PSVersion 5.1.19041.1 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.1 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1`

I assume I'm missing something, but I've been following the directions in the "detailed setup" file, and can't figure out what I'm missing. Any help would be appreciated!

jdhitsolutions commented 3 years ago

Looks like your ISO downloads failed. I would change to the configuration folder and run Wipe-Lab. Then go to C:\AutoLab\ISOs and delete all the files. You have an error for one bad file but others might be bad as well so you might as well start over. Then change to C:\Autolab\VMVirtualHardDisks and delete any files. Do the same thing under C:\Autolab\MasterVirtualHardDisks.

Then go back to the configuration folder and run Setup-Lab again. This should re-download the ISO files and rebuild the virtual disks.

jdhitsolutions commented 3 years ago

Closing presumed resolved or no longer an issue.