Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudbase-init.msi fails with non-ASCII groups names #392

Open
al-indigo opened this issue Mar 24, 2024 · 2 comments
Open

Cloudbase-init.msi fails with non-ASCII groups names #392

al-indigo opened this issue Mar 24, 2024 · 2 comments

Comments

@al-indigo
Copy link

It seems that Cloudbase-init.msi silent install fails on writing file cloudbase-init.conf. It's not empty, but if fails exactly before the option "groups" is set and in automatic mode it is set in ru-locale to "Администраторы".
I've double-checked: without any automation, the installer does the same. If I change "Администраторы" to "Administators", the installation succeeds.

There is a missing option for this automated deploy in $msiexecArgumentList for this to change, so there is no automatic way to overwhelm this problem.

Ways for solution:

  1. Fix the writing behaviour for non-ascii symbols into configuration
  2. Or at least make it possible to override it during msi silent installation

image
image

@al-indigo
Copy link
Author

Writing down "dumb" way to fix it until developers from Cloudbase find a right way. If you face the same problem, you can make the following:

  1. Avoid an error mentioned in TMP/TEMP env variable breaks ini.psm1 with non-ASCII usernames #391 , I have provided a way to do it inside the description
  2. Comment out the part related to cloudbase-init MSI installation
  3. Instead of this part insert this to make the script wait for file "C:\UnattendResources\done.txt" creation to proceed:
    $signalFile = "$resourcesDir\done.txt"
    Write-Host "Please install Cloudbase-Init manually. Create the file $signalFile when done."
    # Wait for the signal file to be created
    while (-not (Test-Path $signalFile)) {
        Start-Sleep -Seconds 10
    }
    Remove-Item $signalFile -ErrorAction SilentlyContinue
  1. When the script pauses and tells you to install cloudbase-init manually, do it. In the field "groups" write anything in english (Administrators for example).
  2. After cloudbase-init installation, replace the value in "C:\Program Files\Cloudbase-init\conf\cloudbase-init.conf" at third line to correspond your groups. I have put a ready init.conf file in the folder which is copied to C:\UnattendResources folder and than replaced the file inside "C:\Program Files\Cloudbase-init..." but you do it as you wish
  3. After that create a text file C:\UnattendResources\done.txt
  4. After all powershell windows close, manually turn off the VM

@ader1990
Copy link
Member

Hello, a quick workaround is to use the config options cloudbase_init_config_path and cloudbase_init_unattended_config_path to set custom cloudbase-init config files https://github.com/cloudbase/windows-imaging-tools/blob/master/Config.psm1#L158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants