Skip to content

Feat/ubuntu cloud init - #2205

Draft
lukdz wants to merge 9 commits into
community-scripts:mainfrom
lukdz:feat/ubuntu-cloud-init
Draft

Feat/ubuntu cloud init#2205
lukdz wants to merge 9 commits into
community-scripts:mainfrom
lukdz:feat/ubuntu-cloud-init

Conversation

@lukdz

@lukdz lukdz commented Aug 22, 2026

Copy link
Copy Markdown

✍️ Description

The existing Ubuntu cloud-image VM scripts is creating an inaccessible VM:

  • No SSH keys were configured.
  • No default password was available.
  • The Proxmox console did not automatically log in as root.

⚠️ The following access model is opinionated and requires maintainer acceptance. ⚠️

Default Mode

  • Does not ask Cloud-Init configuration questions.
  • Configures the ubuntu user.
  • Uses DHCP networking.
  • ⚠️ Detects and configures valid SSH public keys from the Proxmox host. ⚠️
  • If no host SSH key exists, uses console-only access:
    • No username or password is configured.
    • SSH authentication is disabled.
    • Root auto-login is enabled through the Proxmox console.
  • Displays final access details after creation.

Advanced Mode

When enabled, Cloud-Init allows configuration of:

  • Username.
  • DHCP or static networking.
  • Gateway and DNS.
  • Optional password.
  • SSH key source.

Supported SSH key sources are:

  • Individual keys from the Proxmox host.
  • Pasted public key.
  • HTTPS URL.
  • File, folder, or glob.
  • No SSH key.

⚠️ Credential Behavior ⚠️

  • Password only: SSH password authentication is enabled.
  • SSH key only: SSH password authentication is disabled.
  • Password plus SSH key: SSH key authentication is used and password authentication is disabled.
  • No password and no SSH key: accepted as valid console-only access.
  • Console-only access enables root auto-login through the Proxmox console and disables SSH authentication.

Additional fixes include:

  • Corrected streamed loading of the shared Cloud-Init helper.
  • Corrected the Ubuntu 26.04 image URL.
  • Restored correct default disk sizes.
  • Improved disk-size prompts.
  • Suppressed noisy qm start output.
  • Removed custom Ubuntu 26.04 header and description overrides in favor of core helpers.

This change adds shared Cloud-Init support to all Ubuntu VM scripts:

  • Ubuntu 22.04
  • Ubuntu 24.04
  • Ubuntu 24.10
  • Ubuntu 26.04

🔗 Related PR / Issue

Link: #

✅ Prerequisites

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Full Proxmox integration testing has not been completed.
  • No breaking changes – Existing VM creation functionality remains intact.
  • No security risks – No hardcoded secrets or unnecessary privilege changes.

🏗️ arm64 Support

  • arm64 supported - Tested and supported on arm64.
  • arm64 not tested - Assumed to work on arm64, but testing has not been done.
  • arm64 not supported - Scripts use amd64 Ubuntu cloud images and reject non-amd64 hosts.

🛠️ Type of Change

  • 🐞 Bug fix – Fixes streamed helper loading, image URL, disk defaults, and output behavior.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Removes custom Ubuntu 26.04 overrides and uses core helpers.
  • 📝 Documentation update – Removes the obsolete implementation requirements document.

🔍 Code & Security Review

  • Follows CODE-AUDIT.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json) – Not applicable; this PR modifies existing VM scripts.
  • No hardcoded credentials
  • No Docker / Docker Compose – The application is installed bare-metal; Docker is not used.
  • No git pull – No application update mechanism is involved.

🤖 AI Assistance

  • No AI used – Scripts were written without AI assistance.
  • AI was used – I confirm the scripts were built using AGENTS.md and .github/agents/pve-script-creator.agent.md as guidance, and the output has been reviewed and corrected to match those guidelines.

📋 Additional Information

Validation completed:

  • Bash syntax validation passed for all four Ubuntu VM scripts and the shared Cloud-Init helper.
  • git diff --check passed.
  • Ubuntu 24.10 and Ubuntu 26.04 image URLs were verified as reachable.
  • Full Proxmox integration testing across all storage backends and interactive Cloud-Init combinations remains pending.

📦 Application Requirements (for new scripts)

  • The application is at least 6 months old
  • The application is actively maintained
  • The application has 600+ GitHub stars
  • Official release tarballs are published
  • I understand that not all scripts will be accepted due to various reasons and criteria by the community-scripts ORG

🌐 Source

@github-actions

Copy link
Copy Markdown
Contributor

Try these scripts

COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init/vm/ubuntu2204-vm.sh)"
COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init/vm/ubuntu2404-vm.sh)"
COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init/vm/ubuntu2410-vm.sh)"
COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/lukdz/ProxmoxVED/feat/ubuntu-cloud-init/vm/ubuntu2604-vm.sh)"

COMMUNITY_SCRIPTS_URL is not optional. Fetching the ct/ script from a branch
does not tell the engine where that branch is — with bash -c "$(curl …)" there
is no file on disk for the scripts root to be derived from, so it would fall back
to upstream main and look for the install script there.

Against a core branch as well

Add COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/OWNER/core/BRANCH
to test an engine change at the same time. The two resolve independently.

Useful flags while testing

dev_mode=net logs every fetch with status and duration, so you can confirm the
branch is really being used. dev_mode=keep stops a failed build from deleting
the container along with the evidence.

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.

1 participant