cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
684 stars 229 forks source link

Examples/create-windows-online-cloud-image.ps1 will fail if extra drivers directory is empty #241

Closed varnav closed 5 years ago

varnav commented 5 years ago
1/28/2019 11:17:00 AM - Adding drivers from "C:\drivers\" to image "E:\"

Deployment Image Servicing and Management tool
Version: 10.0.17134.1

Image Version: 10.0.14393.693

Searching for driver packages to install...

Error: 2

No driver packages were found on the specified path.
Verify that the driver .INF files are in the specified location and try the command again.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
1/28/2019 11:17:12 AM - Dism failed to add drivers from: C:\drivers\
Dism failed to add drivers from: C:\drivers\
At C:\src\windows-openstack-imaging-tools\WinImageBuilder.psm1:534 char:9
+         throw "Dism failed to add drivers from: $driversPath"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Dism failed to ...om: C:\drivers\:String) [], RuntimeException
    + FullyQualifiedErrorId : Dism failed to add drivers from: C:\drivers\
ader1990 commented 5 years ago

Hello,

Are you trying to run this from the PowerShell ISE? The dism utility does not play nice with that commandline.

Thank you, Adrian

varnav commented 5 years ago

I was running from admin PowerShell CLI. BTW I commented out line 77 and everything worked like a charm!