You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your issue related to a Jumpstart scenario, ArcBox, or HCIBox?
HCIBox
Describe the bug
If the windowsAdminPassword string in the main.parameters.json file contains dollar signs ($), the HCIBox deployment fails during the autorun script execution, because of the following error:
Import-PowerShellDataFile : The file 'C:\HCIBox\HCIBox-Config.psd1' could not be parsed as a PowerShell Data File.
The issue seems to be caused by the $ signs that are not correctly handled inside the HCIBox-Config.psd1.
In details: the password specified in main.parameters.json is automatically written into the following line in HCIBox-Config.psd1:
SDNAdminPassword = "%staging-password%" # Do not change - this value is replaced during Bootstrap with the password supplied in the ARM deployment
but, if the password string contains dollar signs, Import-PowerShellDataFile cannot parse that updated file anymore, probably because $ are special characters, unless the string is enclosed in single quotes.
I was actually able to load the file after changing the double quote in the above line with a single quote - this maybe can fix the problem.
To Reproduce
In the preparation steps, edit the main.parameters.json file as described in the documentation. In "windowsAdminPassword", specify a password string containing two dollar signs $$
launch the Bicep deployment, that works correctly
login to the HCIBox-Client machine with the specified password; this works
the autorun script starts, immediately showing an error while loading the C:\HCIBox\HCIBox-Config.psd1
the script is still able to download the VHDs, but the after unzipping the Ubuntu image, it fails in Register-AzSHCI.ps1:25 with the following error in the log: TerminatingError(ConvertTo-SecureString): "Cannot bind argument to parameter 'String' because it is null."
The null string is the SDNAdminPassword that was not set because HCIBox-Config.psd1 was not correctly parsed in the previous steps.
Expected behavior
The script should work even if the password contains one or more dollar signs.
Environment summary
azure-cli 2.43.0
The text was updated successfully, but these errors were encountered:
Hey friend! Thanks for opening this issue. We appreciate your contribution and welcome you to our community! We are glad to have you here and to have your input on the Azure Arc Jumpstart.
Good catch and summary of your fix. I will investigate making the switch to single quotes permanent for this field and others where we are doing string replacements.
Is your issue related to a Jumpstart scenario, ArcBox, or HCIBox?
HCIBox
Describe the bug
If the windowsAdminPassword string in the main.parameters.json file contains dollar signs ($), the HCIBox deployment fails during the autorun script execution, because of the following error:
Import-PowerShellDataFile : The file 'C:\HCIBox\HCIBox-Config.psd1' could not be parsed as a PowerShell Data File.
The issue seems to be caused by the $ signs that are not correctly handled inside the HCIBox-Config.psd1.
In details: the password specified in main.parameters.json is automatically written into the following line in HCIBox-Config.psd1:
SDNAdminPassword = "%staging-password%" # Do not change - this value is replaced during Bootstrap with the password supplied in the ARM deployment
but, if the password string contains dollar signs, Import-PowerShellDataFile cannot parse that updated file anymore, probably because $ are special characters, unless the string is enclosed in single quotes.
I was actually able to load the file after changing the double quote in the above line with a single quote - this maybe can fix the problem.
To Reproduce
TerminatingError(ConvertTo-SecureString): "Cannot bind argument to parameter 'String' because it is null."
The null string is the SDNAdminPassword that was not set because HCIBox-Config.psd1 was not correctly parsed in the previous steps.
Expected behavior
The script should work even if the password contains one or more dollar signs.
Environment summary
azure-cli 2.43.0
The text was updated successfully, but these errors were encountered: