Closed ksalman closed 6 years ago
I think it's some kind of permission issue but I cannot figure out what exactly. It does create the config.ini.offline file and I think the error is due to it having trouble editing the file after creation. Powershell is running as Adminstrator.
I tried running cmd as Administrator, then started powershell from there and I don't see the error.
Hello,
The image generation is required to be run as Administrator. Have you solved the issue by running as Administrator?
Thank you, Adrian
Yea, I realize that. However the issue is that I see the problem when running Powershell as Administrator. I do not see the problem when I run cmd as Administrator, then starting Powershell from there.
Is "$ConfigFilePath" a relative or absolute path? ini powershell module does not work with relative paths.
Oh wow, you are right. When I use absolute path for $ConfigFilePath, it works.
Shouldn't it also not work when starting Powershell from cmd? I am really curious how it works with relative path path when I fire up Powershell from cmd.
Hello,
I will create a patch to convert the relative path to an absolute path in the ini.psm1 module, to make sure this never happens again. Thanks for the bug report.
Can you try this fix: https://github.com/cloudbase/windows-openstack-imaging-tools/pull/210 ? It should solve this issue.
Hi, thanks for the patch. I tested it and it works.
Great, I have also merged the PR.
Adrian.
I am trying to create an online image without anything special. From the readme I tried
New-WindowsOnlineImage -ConfigFilePath $ConfigFilePath
and I am getting this error. Any ideas how to fix that?