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
I am new to the community and just started to work with Packer. I am currently trying to build a Windows-2022 image with Packer having WSL and Ubuntu as distribution installed. Surprisingly the image creation until the last step prints out that Ubuntu is installed as the default distro but somehow I cannot see the Ubuntu distro when I created the VM from the image although WSL is installed and working.
Edit: I updated the windows-2022.pkr.hcl template to install the WSL and ubuntu with the following custom scripts.
Ubuntu was downloaded from https://aka.ms/wslubuntu2004 to a folder installer and it was under Users and I could the installed files under this folder in the VM created from Image.
Logs from the image creation:
==> azure-arm.image: Provisioning with powershell script: /home/vsts/work/1/s/images/windows/templates/../../win/scripts/Installers/Windows2022/Install-Ubuntu.ps1
azure-arm.image: list of installed wsl Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore
azure-arm.image: Downloading Ubuntu 20.04
azure-arm.image: Downloading package from https://aka.ms/wslubuntu2004 to C:\Users\installer\UbuntuonWindows.zip...
azure-arm.image: Package downloaded in 122.63 seconds
azure-arm.image: ubuntuAppxPath is : C:\Users\installer\UbuntuonWindows.zip
azure-arm.image: Expanding Ubuntu bundle
azure-arm.image: Expanding ubuntu application
azure-arm.image: Installing Ubuntu
azure-arm.image: Installing, this may take a few minutes...
azure-arm.image: Installation successful!
azure-arm.image: Ubuntu installation successful
==> azure-arm.image: Provisioning with powershell script: /home/vsts/work/1/s/images/windows/templates/../scripts/WSLCheck.ps1
azure-arm.image: list of installed wsl Windows Subsystem for Linux Distributions: Ubuntu (Default)
azure-arm.image: Docker status
azure-arm.image: wslDocker * Docker is not running
==> azure-arm.image: Provisioning with Powershell...
==> azure-arm.image: Provisioning with powershell script: /tmp/powershell-provisioner2805888685
azure-arm.image: IMAGE_STATE_COMPLETE
==> azure-arm.image: Querying the machine's properties ...
==> azure-arm.image: Querying the machine's additional disks properties ...
==> azure-arm.image: Powering off machine ...
==> azure-arm.image: Generalizing machine ...
==> azure-arm.image: Capturing image ...
==> azure-arm.image:
==> azure-arm.image: Deleting Virtual Machine deployment and its attatched resources...
Does anyone have faced a similar issue or am I dumb to understand it, does someone have any idea how to fix it?
More Information: It seems the registry entry for the Lxss default Distribution went missing in the created image.
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
The text was updated successfully, but these errors were encountered:
Hi 👋 thanks for reaching out.
For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility.
As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum.
We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response.
If no activity is taken on this question within 30 days it will be automatically closed.
If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue.
I learned that WSL distribution (in my case Ubuntu) installation is user-specific, I created a new user and used the same user in my pipelines which fixed the issue for me. So this is not a problem for me anymore.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Hi all,
I am new to the community and just started to work with Packer. I am currently trying to build a Windows-2022 image with Packer having WSL and Ubuntu as distribution installed. Surprisingly the image creation until the last step prints out that Ubuntu is installed as the default distro but somehow I cannot see the Ubuntu distro when I created the VM from the image although WSL is installed and working.
Edit: I updated the windows-2022.pkr.hcl template to install the WSL and ubuntu with the following custom scripts.
Ubuntu was downloaded from https://aka.ms/wslubuntu2004 to a folder installer and it was under Users and I could the installed files under this folder in the VM created from Image.
Logs from the image creation:
Does anyone have faced a similar issue or am I dumb to understand it, does someone have any idea how to fix it?
More Information: It seems the registry entry for the Lxss default Distribution went missing in the created image.
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
The text was updated successfully, but these errors were encountered: