Skip to content

Conversation

@pablodelarco
Copy link
Contributor

@pablodelarco pablodelarco commented Jan 8, 2026

Appliance Creation Wizard v2.0

An interactive wizard that makes creating OpenNebula appliances simple and fast. Now supports Docker appliances and LXC system containers for both x86_64 and ARM64 architectures.

Features

Docker Appliances (KVM)

  • Turn any Docker image into a full VM
  • Supports ghcr.io, Docker Hub, and private registries
  • Auto-update checking for container images
  • Multiple base OS options (Ubuntu, Debian, Alma, Rocky, openSUSE)

LXC System Containers (New in v2.0)

  • Lightweight Alpine Linux-based containers
  • Pre-configured application catalog:
    • Mosquitto MQTT - IoT message broker
    • Node-RED - Flow-based automation
    • Nginx - Web server
    • Redis - In-memory database
    • PostgreSQL - Relational database
    • InfluxDB - Time series database
    • Telegraf - Metrics collection
    • Grafana - Monitoring dashboards
    • Homebridge - HomeKit bridge
    • Zigbee2MQTT - Zigbee gateway
    • Netdata - Real-time monitoring
  • Automatic service configuration with OpenRC
  • Direct deployment to OpenNebula

General Features

  • Interactive wizard with arrow-key navigation
  • ARM64 support for both Docker and LXC
  • Non-interactive mode for CI/automation
  • Auto-cleanup on build failure

Testing Instructions

Prerequisites

# For x86_64 Docker appliances (KVM)
sudo apt-get install -y packer qemu-system-x86 qemu-utils genisoimage

# For ARM64 Docker appliances (KVM)
sudo apt-get install -y packer qemu-system-aarch64 qemu-utils genisoimage

# For LXC appliances (no extra deps, uses Alpine minirootfs)
# Just needs: curl, tar, and optionally qemu-img

Quick Start

# 1. Clone and checkout
git clone https://github.com/OpenNebula/marketplace-community.git
cd marketplace-community
git checkout feature/appliance-wizard-arm64
git submodule update --init --recursive

# 2. Run the wizard
cd wizard
./appliance-wizard.sh

Non-Interactive Mode

# Docker appliance
./appliance-wizard.sh examples/nginx.env

# LXC appliance (create env file)
cat > nodered-lxc.env << 'EOF'
APPLIANCE_TYPE="lxc"
LXC_APPLICATION="nodered"
APPLIANCE_NAME="nodered-alpine-lxc"
VM_MEMORY="512"
VM_VCPU="1"
EOF
./appliance-wizard.sh nodered-lxc.env

Files Changed

wizard/
├── appliance-wizard.sh          # Interactive wizard (v2.0)
├── generate-docker-appliance.sh # Docker appliance generator
└── examples/
    ├── nginx.env
    ├── portainer.env
    └── grafana.env

What to Test

  1. Appliance Type Selection - Verify both Docker and LXC options work
  2. LXC Application Catalog - Test different pre-configured apps
  3. LXC Build Process - Verify Alpine rootfs is built correctly
  4. Direct Deployment - Test oneimage/onetemplate creation on OpenNebula
  5. Docker Mode - Ensure existing Docker functionality still works
  6. ARM64 - Test both appliance types on aarch64
  7. Non-interactive - Test with env files for both types

- appliance-wizard.sh: Interactive TUI wizard for deploying Docker appliances
  - Automatic ARM64/x86_64 architecture detection
  - Wizard-based deployment directly on OpenNebula front-end
  - Progress indicators and proper VM state waiting
  - Support for Sunstone integration

- generate-docker-appliance.sh: Script to generate appliance files from Docker images
  - Creates packer templates, appliance.sh, and context files
  - Multi-OS support (Debian, RHEL, SUSE families)
  - ARM64 native support with UEFI firmware configuration
pablodelarco and others added 6 commits January 8, 2026 15:09
Replace gawk (GNU awk specific) with sed for SSH configuration.
This fixes build failures on AlmaLinux, Rocky Linux, and Debian 12
which may not have gawk installed by default.
1. Cleanup on build failure:
   - Removes appliances/<name>/ directory
   - Removes packer/<name>/ directory
   - Removes from Makefile.config SERVICES

2. Improved tests (comprehensive):
   - Docker installation tests
   - Container status tests
   - Port mapping verification
   - Environment variable checks
   - Volume mount validation
   - SSH/Console configuration tests

3. Env file support for non-interactive mode:
   - ./appliance-wizard.sh myapp.env
   - AUTO_BUILD=true for automatic builds
   - --help shows env file format

4. SSH config fix for Alma/Rocky/Debian:
   - Uses sed instead of gawk for compatibility
- Rename docs/automatic-appliance-tutorial/ -> wizard/
- Update internal path references
- Add example env files for popular apps (nginx, portainer, grafana)

Users can now simply:
  cd wizard && ./appliance-wizard.sh
@pablodelarco pablodelarco force-pushed the feature/appliance-wizard-arm64 branch from 7798a17 to 1488520 Compare January 8, 2026 23:04
OpenNebula Community Contributor added 2 commits January 9, 2026 10:59
- Add ghcr.io (GitHub Container Registry) support for image validation
- Fix autologin setting being ignored (now respects AUTOLOGIN_ENABLED)
- Add LOGIN_USERNAME and ROOT_PASSWORD support for password-based login
- Improve VM failure detection with better error messages
- Fix OS family detection for better distro support
- Improve JSON regex matching for architecture detection
- Add DOCKER_AUTO_UPDATE option (CHECK/YES/NO) to wizard
- CHECK: Notify user of updates on boot (default)
- YES: Automatically update Docker image on boot
- NO: Never check for updates
- Add docker-appliance-update helper script for manual updates
- Add ONEAPP_DOCKER_AUTO_UPDATE context variable for runtime override
- Update example .env files with new option
@roamingengineer311 roamingengineer311 self-assigned this Jan 14, 2026
Major update adding LXC system container support alongside Docker appliances:

LXC Container Features:
- Alpine Linux-based lightweight containers
- Pre-configured application catalog:
  - Mosquitto MQTT, Node-RED, Nginx, Redis
  - PostgreSQL, InfluxDB, Telegraf, Grafana
  - Homebridge, Zigbee2MQTT, Netdata
- Automatic service configuration with OpenRC init scripts
- DHCP networking with optional OpenNebula context support
- SSH host key generation during build
- Proper SCHED_REQUIREMENTS for LXC host scheduling

UI/UX Improvements:
- New space-themed ASCII logo
- Updated welcome screen reflecting both Docker and LXC capabilities
- Fixed ANSI escape code display issues in output

Technical Changes:
- Version bump to 2.0.0
- Added appliance type selection step
- LXC build process with Alpine minirootfs
- Direct deployment to OpenNebula with oneimage/onetemplate
- Privileged container support (LXC_UNPRIVILEGED=no)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pablodelarco pablodelarco changed the title Add appliance wizard with ARM64 support Add appliance wizard v2.0 with ARM64 and LXC support Jan 20, 2026
@roamingengineer311
Copy link
Collaborator

@pablodelarco Please check the attached document. I tested each OS with different options, and the appliance build failed in all cases. I tested only docker based appliances on x86_64.
build_output.txt

- Add marketplace submission workflow with automated file generation
- Add terminal input reset function for reliable interactive prompts
- Add LXC container IP detection and OpenNebula sync
- Add network IP allocation and address range checks
- Add memory requirements configuration per LXC application
- Improve Grafana setup to listen on all interfaces
@pablodelarco
Copy link
Contributor Author

pablodelarco commented Jan 21, 2026

Thanks for the detailed testing @roamingengineer311 ! I've identified and fixed the root cause.

Issue Found

The LOGIN_USERNAME, ROOT_PASSWORD, and AUTOLOGIN_ENABLED variables were not being embedded in the generated appliance.sh script. When the provisioning script ran during the Packer build, these variables were empty, causing:

chpasswd: (user ) pam_chauthtok() failed, error:
Authentication token manipulation error

Notice (user ) shows an empty username.

Fix Applied

Commit 046817a adds the missing login configuration variables to the APPLIANCE_HEADER section in generate-docker-appliance.sh:

AUTOLOGIN_ENABLED="${AUTOLOGIN_ENABLED:-true}"
LOGIN_USERNAME="${LOGIN_USERNAME:-root}"
ROOT_PASSWORD="${ROOT_PASSWORD:-opennebula}"

Note on SSH Timeouts

The SSH timeout issues on ubuntu24min and opensuse15 appear to be a separate issue (likely boot timing or network config). Let me know if those persist after the main fix is verified.

The LOGIN_USERNAME, ROOT_PASSWORD, and AUTOLOGIN_ENABLED variables
were not being embedded in the generated appliance.sh script, causing
the chpasswd command to fail with empty username during provisioning.

Error was: chpasswd: (user ) pam_chauthtok() failed

This fix adds the login configuration variables to the APPLIANCE_HEADER
section so they are available when configure_console_autologin() runs.
@pablodelarco pablodelarco force-pushed the feature/appliance-wizard-arm64 branch from 046817a to 1319fb1 Compare January 21, 2026 22:03
@roamingengineer311
Copy link
Collaborator

roamingengineer311 commented Jan 23, 2026

@pablodelarco resolved
The builds complete successfully (except for Ubuntu 24), but the virtual machines with appliances do not start for various reasons.

debian12
ubunt22min
nginx:latest 
not even booting 

ubunt24min
nginx:latest 
==> qemu.nginx: Using SSH communicator to connect: 127.0.0.1
==> qemu.nginx: Waiting for SSH to become available...
==> qemu.nginx: Timeout waiting for SSH.
==> qemu.nginx: Deleting output directory...
Build 'qemu.nginx' errored after 15 minutes 20 seconds: Timeout waiting for SSH.

alma9,rocky9,opensuse15 
hashicorp-vault:latest 
kernel-panic

Could you test this on your side?

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.

3 participants