LabBuilder icon indicating copy to clipboard operation
LabBuilder copied to clipboard

New-LabException - Configuration file not found error

Open rjsandoval opened this issue 7 years ago • 3 comments

I CREATED THE FOLLOWING D:\MYLAB D:\MYLAB\ISOFILES D:\MYLAB\VHDFILES Running script Import-Module LabBuilder Install-Lab -ConfigPath 'D:\MyLab\Configuration.xml' Got a damn error: Submitting Issue request to GIT

PowerShell Version - 5.1.17666.1000

PowerShell Host - ISE

Operating System - Windows 10 1803

LabBuilder Version - 0.8.4.1160

Error received after executing script - New-LabException : Configuration file D:\MyLab\Configuration.xml is not found. At C:\Program Files\WindowsPowerShell\Modules\LabBuilder\0.8.4.1160\lib\public\lab.ps1:62 char:9

  •     New-LabException @exceptionParameters
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [New-LabException], Excepti on
    • FullyQualifiedErrorId : ConfigurationFileNotFoundError,New-LabException Maybe I should keep to the code for now: copied the files to the c: drive Install-Lab -ConfigPath 'c:\MyLab\Configuration.xml'

rjsandoval avatar Jun 12 '18 04:06 rjsandoval

Hi @rjsandoval - the install-lab process needs a lab definition file (configuration.xml) to be found in the folder D:\mylab.

You can either make one your self or more easily grab one from the samples folder in the folder of the module. You can also find the samples folder here: https://github.com/PlagueHO/LabBuilder/tree/dev/LabBuilder/samples

You will need to tweak the locations of your ISO and VHD folders in this file to point to your c:\mylab\isofiles and c:\mylab\vhdfiles

Let me know if this resolves your issue.

PlagueHO avatar Jun 12 '18 05:06 PlagueHO

Ok I will try that, thanks for the prompt follow up.

rjsandoval avatar Jun 14 '18 04:06 rjsandoval

I made the changes and it looked like it went then it error-ed. PS C:\WINDOWS\system32> Install-Lab -ConfigPath 'c:\MyLab\Configuration.xml'

Name Used (GB) Free (GB) Provider Root CurrentLocation


C 352.01 123.05 FileSystem C:\ WINDOWS\system32 D 244.32 687.07 FileSystem D:
E 0.01 0.80 FileSystem E:
F 2.63 0.00 FileSystem F:
G 2.63 0.00 FileSystem G:
H 2.63 0.00 FileSystem H:
I 2.63 0.00 FileSystem I:
C 352.01 123.05 FileSystem C:\ WINDOWS\system32 D 244.32 687.07 FileSystem D:
E 0.01 0.80 FileSystem E:
F 2.63 0.00 FileSystem F:
G 2.63 0.00 FileSystem G:
H 2.63 0.00 FileSystem H:
I 2.63 0.00 FileSystem I:\

Windows(R) Image to Virtual Hard Disk Converter for Windows(R) 10 Copyright (C) Microsoft Corporation. All rights reserved. Version 10.0.14278.1000.amd64fre.rs1_es_media.160201-1707

INFO : Looking for the requested Windows image in the WIM file INFO : Image 1 selected (ServerHyperCore)... INFO : Creating sparse disk... INFO : Mounting VHDX... INFO : Initializing disk... INFO : Creating EFI system partition... INFO : Formatting system volume... INFO : Setting system partition as ESP... INFO : Creating MSR partition... INFO : Creating windows partition... INFO : Formatting windows volume... INFO : Windows path (K:) has been assigned. INFO : System volume location: J: INFO : Applying image to VHDX. This could take a while... INFO : Image was applied successfully. INFO : Making image bootable... INFO : Drive is bootable. Cleaning up... INFO : Dismounting VHDX... INFO : Closing Windows image... INFO : Done. C 356.31 118.76 FileSystem C:\ WINDOWS\system32 D 244.32 687.07 FileSystem D:
E 0.01 0.80 FileSystem E:
F 2.63 0.00 FileSystem F:
G 2.63 0.00 FileSystem G:
H 2.63 0.00 FileSystem H:
I 2.63 0.00 FileSystem I:
Copy-Item : Cannot find path 'I:\Nanoserver\Packages' because it does not exist. At C:\Program Files\WindowsPowerShell\Modules\LabBuilder\0.8.4.1160\lib\public\templatevhd.ps1:558 char:17

  •             Copy-Item `
    
  •             ~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (I:\Nanoserver\Packages:String) [Copy-Item], ItemNotFoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

PS C:\WINDOWS\system32>

rjsandoval avatar Jun 14 '18 05:06 rjsandoval