Commit Graph

5 Commits

Author SHA1 Message Date
fe6ee25d1c Fix Proxmox VM login — force user creation via runcmd
The Arch Linux cloud image ignores Proxmox's --ciuser/--cipassword
and the cloud-init chpasswd module depending on version. The previous
approach had three conflicting methods fighting each other.

Fixed by:
- Removed --ciuser/--cipassword from qm set (they conflict with snippet)
- Removed chpasswd cloud-init module (unreliable on Arch)
- Set users: [] to disable cloud-init's default user module
- ALL user setup now done via runcmd (runs as root, always works):
  - Sets root password to 'darkforge' as fallback
  - Creates darkforge user via useradd + chpasswd
  - Grants passwordless sudo via /etc/sudoers.d/
  - Enables PermitRootLogin yes as safety net
- Package install via explicit pacman commands instead of packages: module
  (Arch cloud-init packages module can be unreliable)
- Added pacman-key --init/--populate before package install

Login credentials:
  user: darkforge  password: darkforge
  user: root       password: darkforge  (fallback)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:48:24 +01:00
6d1b87c7ab More ram 2026-03-19 15:41:11 +01:00
28946b52d0 Fix SSH password auth in Proxmox VM cloud-init
Arch Linux cloud images disable SSH password authentication by default.
Added cloud-init directives to:
- Enable ssh_pwauth
- Set the darkforge user password via chpasswd (plaintext, non-expiring)
- Write /etc/ssh/sshd_config.d/99-darkforge.conf enabling PasswordAuthentication
- Restart sshd after config is written

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:22:51 +01:00
c35ba5dc0f Use tmux for test runner — detachable SSH sessions
Tests now run inside a tmux session so you can disconnect and
reconnect without interrupting multi-hour test runs.

Changes:
- create-vm.sh: cloud-init no longer auto-runs tests, just provisions
  packages and clones the repo. Installs a `darkforge-test` command
  in /usr/local/bin that wraps run-in-vm.sh in tmux.
- run-in-vm.sh: detects when called as `darkforge-test` and re-execs
  inside a tmux session named "darkforge". --tmux flag for internal use.
- README updated with tmux workflow (detach/reattach instructions).

Workflow:
  ssh darkforge@<ip>
  darkforge-test --quick    # starts in tmux
  Ctrl+B D                  # detach, go do other things
  tmux attach -t darkforge  # come back later

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:59:52 +01:00
c464e0eec9 Add Proxmox test environment (VM creation + automated test suite)
Tests everything possible without the target hardware:

create-vm.sh (runs on Proxmox host):
- Creates Arch Linux VM (VMID 900, 8 cores, 16GB RAM, 100GB disk)
- UEFI boot with OVMF (for nested QEMU testing)
- Cloud-init auto-installs packages, clones repo, runs tests
- Nested virtualization enabled for QEMU-in-QEMU boot tests

run-in-vm.sh (runs inside the VM, 9 test suites):
1. Host environment validation
2. dpack build + unit tests + CLI smoke tests
3. Package definition validation (154 packages, dep resolution)
4. Script syntax checking (toolchain, init, installer, ISO)
5. Kernel config validation (critical options)
6. Package signing test (download zlib, compute SHA256)
7. Toolchain bootstrap (LFS Ch.5 cross-compiler build)
8. ISO generation
9. Nested QEMU boot test (UEFI boot, kernel + userspace check)

Modes: --quick (30min, suites 1-5), --no-build (1hr), full (2-6hr)
Generates report.json + report.txt for automated debugging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:32:01 +01:00