Skip to content

fix(vm-iso-installer): download remote kickstart files locally#17930

Open
sonarbhavarth wants to merge 1 commit into
microsoft:4.0from
sonarbhavarth:fix/issue-17915
Open

fix(vm-iso-installer): download remote kickstart files locally#17930
sonarbhavarth wants to merge 1 commit into
microsoft:4.0from
sonarbhavarth:fix/issue-17915

Conversation

@sonarbhavarth

Copy link
Copy Markdown

When PXE booting with an HTTP kickstart URL in the kernel cmdline (inst.ks),
anaconda-launcher.sh passed the URL directly to anaconda as a subprocess.
Anaconda requires a local file path in this context and would fail with a
missing file error.

This commit updates anaconda-launcher.sh to download HTTP/HTTPS URLs
via curl to /tmp/ks.cfg before passing it to anaconda, resolving
deployments that rely on remote kickstarts.

Fixes #17915

Copilot AI review requested due to automatic review settings July 7, 2026 09:28
@sonarbhavarth sonarbhavarth requested a review from a team as a code owner July 7, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the VM ISO installer's anaconda-launcher.sh wrapper. When PXE booting with an HTTP(S) kickstart URL supplied via inst.ks= on the kernel cmdline, the script previously passed the raw URL directly to anaconda --kickstart=, which expects a local file path in this subprocess context and fails with "Kickstart file is missing." The change downloads the remote kickstart to a local file first, addressing issue #17915.

Changes:

  • Detects when the extracted inst.ks value is an HTTP/HTTPS URL and downloads it with curl to /tmp/ks.cfg, then points CUSTOM_KS at the local copy before invoking anaconda.

Comment on lines +18 to +20
if [[ "$CUSTOM_KS" == http* ]]; then
curl -sf -o /tmp/ks.cfg "$CUSTOM_KS" && CUSTOM_KS="/tmp/ks.cfg"
fi
CUSTOM_KS=""
if grep -qo 'inst\.ks=[^ ]*' /proc/cmdline 2>/dev/null; then
CUSTOM_KS=$(grep -o 'inst\.ks=[^ ]*' /proc/cmdline | sed 's/inst\.ks=//')

When PXE booting with an HTTP kickstart URL in the kernel cmdline (inst.ks),
anaconda-launcher.sh passed the URL directly to anaconda as a subprocess.
Anaconda requires a local file path in this context and would fail with a
missing file error.

This commit updates anaconda-launcher.sh to download HTTP/HTTPS URLs
via curl to /tmp/ks.cfg before passing it to anaconda, resolving
deployments that rely on remote kickstarts.

Fixes microsoft#17915
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

Successfully merging this pull request may close these issues.

[4.0] Offline installer does not handle HTTP URLs in inst.ks kernel parameter

2 participants