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

Update image-builder.md - Add a sleep delay to the customizations script #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbiver
Copy link

@mbiver mbiver commented Mar 18, 2025

This executes too rapidly and many times the image isn't ready for the quickstart json to run inside the VM. You end up with a (PackerBuildFailed) and if you look in the customization.log, you'll see messages like the below. If the OS just has a little bit of time to fully come up, though, before the customizations, the error goes away.

[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui: azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_main_i18n_Translation-en - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui: azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_main_binary-amd64_Packages - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui: azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_restricted_i18n_Translation-en - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui: azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_restricted_binary-amd64_Packages - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui: azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_i18n_Translation-en - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui: azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_Packages - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 [INFO] 2138 bytes written for 'stdout'
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 packer-plugin-azure_v2.2.0_x5.0_linux_amd64 plugin: 2025/03/18 20:42:48 [ERROR] Remote command exited with '100': chmod +x /tmp/script_3400.sh; sudo '/tmp/script_3400.sh'
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 packer-plugin-azure_v2.2.0_x5.0_linux_amd64 plugin: 2025/03/18 20:42:48 [INFO] RPC endpoint: Communicator ended with: 100
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 [INFO] 0 bytes written for 'stderr'

This executes too rapidly and many times the image isn't ready for the quickstart json to run inside the VM.  You end up with a (PackerBuildFailed) and if you look in the customization.log, you'll see messages like the below.  If the OS  just has a little bit of time to fully come up, though, before the customizations, the error goes away.  

[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui:     azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_main_i18n_Translation-en - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui:     azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_main_binary-amd64_Packages - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui:     azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_restricted_i18n_Translation-en - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui:     azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_restricted_binary-amd64_Packages - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui:     azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_i18n_Translation-en - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 ui:     azure-arm: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_Packages - open (2: No such file or directory)
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 [INFO] 2138 bytes written for 'stdout'
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 packer-plugin-azure_v2.2.0_x5.0_linux_amd64 plugin: 2025/03/18 20:42:48 [ERROR] Remote command exited with '100': chmod +x /tmp/script_3400.sh; sudo '/tmp/script_3400.sh'
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 packer-plugin-azure_v2.2.0_x5.0_linux_amd64 plugin: 2025/03/18 20:42:48 [INFO] RPC endpoint: Communicator ended with: 100
[7111a125-9cce-4cc6-80f1-70030c08e815] PACKER 2025/03/18 20:42:48 [INFO] 0 bytes written for 'stderr'
Copy link
Contributor

@mbiver : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Copy link

Learn Build status updates of commit 39f7233:

✅ Validation status: passed

File Status Preview URL Details
articles/virtual-machines/linux/image-builder.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@v-dirichards
Copy link
Contributor

@kof-f

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged C+L Pull Request Review Team label label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants