Closed chaoMaster closed 5 years ago
Hello
Can you please try to call the New-WindowsOnlineImage function with the actual path of the config.ini instead of the variable?
I have tested your config file with a couple of changes, needed to reflect my system configuration, but it worked just fine. I changed:
Please also check that you are using the latest master code. Let us know if you manage to get it working.
It's still returning this Error:
PS C:\windows-openstack-imaging-tools> git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
PS C:\windows-openstack-imaging-tools> Import-Module .\WinImageBuilder.psm1
PS C:\windows-openstack-imaging-tools> Import-Module .\Config.psm1
PS C:\windows-openstack-imaging-tools> Import-Module .\UnattendResources\ini.psm1
PS C:\windows-openstack-imaging-tools> New-WindowsOnlineImage -ConfigFilePath .\config.ini
6/14/2019 9:07:37 AM - Windows online image generation started.
New-WindowsOnlineImage : Error formatting a string: Input string was not in a correct format..
At line:1 char:1
+ New-WindowsOnlineImage -ConfigFilePath .\config.ini
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Selected switch...ce = true flag.:String) [New-WindowsOnlineImage], R
untimeException
+ FullyQualifiedErrorId : FormatError,New-WindowsOnlineImage
Hi, I have the same issue, my previous Windows version to use to create image was 2012r2, I tried some work around like update PS to latest version but still no luck, I tried to install windows 2016 and it can create the image now, dont know what is the root cause but if you are using VM to create image, try to reinstall it to newer version of windows.
@chaoMaster do you have an English version of Windows? The error you got might be a string parsing or a Powershell quirk that is a little bit harder to debug.
Thank you, Adrian Vladu
@chaoMaster Can you also run only 'Get-WindowsImageConfig $ConfigFilePath'?
The error you got was because of the fact that the VM switch you used was not an external one. The proper error message was fixed by https://github.com/cloudbase/windows-openstack-imaging-tools/pull/256
When I run the New-WindowsOnlineImage command, it told me the Error formatting string
The PowerShell version:
The config.ini detail: