main 6af0a61

README.md RawHistoryFolder

VM Testing

Quick QEMU testing environment for ArchUp installer.

Prerequisites

sudo pacman -S qemu-full edk2-ovmf sshpass rsync

Setup

# 1. Create disk image
./create-vm-img.sh

# 2. Start VM with Arch ISO
./start-qemu-arch-iso.sh

# 3. In the VM, start SSH and set password
systemctl start sshd
passwd  # Set password to: test

# 4. From host, setup SSH keys
ssh-copy-id -p 2222 root@localhost  # Use password: test

Quick Test Cycle

# One-time: after install, create snapshot
./snapshot-create.sh clean-install

# Iterate: reset → test → poweroff → repeat
./snapshot-restore.sh clean-install
./start-qemu-installed.sh

Scripts

  • snapshot-create.sh [name] - Create snapshot
  • snapshot-restore.sh [name] - Restore snapshot
  • snapshot-list.sh - List snapshots
  • snapshot-delete.sh <name> - Delete snapshot
  • quick-test.sh [name] - Restore + boot
  • backup-golden.sh - Full backup for safety

Notes

  • SSH: localhost:2222 → VM :22
  • ISO/qcow2 files gitignored

Hardware Profiles

The QEMU launchers support two hardware profiles that simulate realistic PC hardware. Both use q35 machine type, NVMe storage, Intel e1000e NIC, XHCI USB, Intel HDA audio, and virtio-vga GPU.

Profile System Board
desktop (default) Gigabyte B550 AORUS ELITE V2 Gigabyte B550
laptop ThinkPad X1 Carbon Gen 10 LENOVO 21CB

Usage

# Desktop profile (default)
./start-qemu-installed.sh
./start-qemu-installed.sh --profile desktop
./start-qemu-desktop.sh                      # convenience wrapper

# Laptop profile
./start-qemu-installed.sh --profile laptop
./start-qemu-laptop.sh                       # convenience wrapper

# Secure Boot (ArchUp preflight expects it OFF by default)
./start-qemu-installed.sh --secure-boot on

# ISO boot with profile
./start-qemu-arch-iso.sh --profile laptop

# Custom SSH port
./start-qemu-installed.sh --ssh-port 2223

Verify Hardware Inside the VM

After booting, run these inside the VM to confirm the hardware identity:

# BIOS/system/board identity (should show Gigabyte or LENOVO strings)
dmidecode -t 0,1,2,3

# PCI devices (check for virtio-vga, e1000e)
lspci -nn

# Storage identity (should show nvme0n1 with serial TESTDESKTOP0001 or TESTLAPTOP00001)
lsblk -o NAME,MODEL,SERIAL,TYPE

# UEFI boot entries
bootctl status

# NIC name (e1000e presents as enp*s0 or similar)
ip link

Notes

  • Secure Boot mode copies OVMF_VARS to a temp file each run; keys must be enrolled manually via UEFI shell on first boot.
  • check-luks.sh defaults to /dev/nvme0n1p2. For old virtio-disk images use --disk /dev/vda2.
  • arch-test.qcow2 must exist before launching any VM (run ./create-vm-img.sh first). The ISO launcher also requires it as the install target disk.
  • Desktop and laptop profiles use different MAC addresses (52:54:00:12:34:01 / :02) so both VMs can run concurrently on the same host.
source
1# VM Testing
2
3Quick QEMU testing environment for ArchUp installer.
4
5## Prerequisites
6
7```bash
8sudo pacman -S qemu-full edk2-ovmf sshpass rsync
9```
10
11## Setup
12
13```bash
14# 1. Create disk image
15./create-vm-img.sh
16
17# 2. Start VM with Arch ISO
18./start-qemu-arch-iso.sh
19
20# 3. In the VM, start SSH and set password
21systemctl start sshd
22passwd  # Set password to: test
23
24# 4. From host, setup SSH keys
25ssh-copy-id -p 2222 root@localhost  # Use password: test
26```
27
28## Quick Test Cycle
29
30```bash
31# One-time: after install, create snapshot
32./snapshot-create.sh clean-install
33
34# Iterate: reset → test → poweroff → repeat
35./snapshot-restore.sh clean-install
36./start-qemu-installed.sh
37```
38
39## Scripts
40
41- `snapshot-create.sh [name]` - Create snapshot
42- `snapshot-restore.sh [name]` - Restore snapshot
43- `snapshot-list.sh` - List snapshots
44- `snapshot-delete.sh <name>` - Delete snapshot
45- `quick-test.sh [name]` - Restore + boot
46- `backup-golden.sh` - Full backup for safety
47
48## Notes
49
50- SSH: `localhost:2222` → VM `:22`
51- ISO/qcow2 files gitignored
52
53## Hardware Profiles
54
55The QEMU launchers support two hardware profiles that simulate realistic PC hardware. Both use `q35` machine type, NVMe storage, Intel e1000e NIC, XHCI USB, Intel HDA audio, and virtio-vga GPU.
56
57| Profile | System | Board |
58|---------|--------|-------|
59| `desktop` (default) | Gigabyte B550 AORUS ELITE V2 | Gigabyte B550 |
60| `laptop` | ThinkPad X1 Carbon Gen 10 | LENOVO 21CB |
61
62### Usage
63
64```bash
65# Desktop profile (default)
66./start-qemu-installed.sh
67./start-qemu-installed.sh --profile desktop
68./start-qemu-desktop.sh                      # convenience wrapper
69
70# Laptop profile
71./start-qemu-installed.sh --profile laptop
72./start-qemu-laptop.sh                       # convenience wrapper
73
74# Secure Boot (ArchUp preflight expects it OFF by default)
75./start-qemu-installed.sh --secure-boot on
76
77# ISO boot with profile
78./start-qemu-arch-iso.sh --profile laptop
79
80# Custom SSH port
81./start-qemu-installed.sh --ssh-port 2223
82```
83
84### Verify Hardware Inside the VM
85
86After booting, run these inside the VM to confirm the hardware identity:
87
88```bash
89# BIOS/system/board identity (should show Gigabyte or LENOVO strings)
90dmidecode -t 0,1,2,3
91
92# PCI devices (check for virtio-vga, e1000e)
93lspci -nn
94
95# Storage identity (should show nvme0n1 with serial TESTDESKTOP0001 or TESTLAPTOP00001)
96lsblk -o NAME,MODEL,SERIAL,TYPE
97
98# UEFI boot entries
99bootctl status
100
101# NIC name (e1000e presents as enp*s0 or similar)
102ip link
103```
104
105### Notes
106
107- Secure Boot mode copies OVMF_VARS to a temp file each run; keys must be enrolled manually via UEFI shell on first boot.
108- `check-luks.sh` defaults to `/dev/nvme0n1p2`. For old virtio-disk images use `--disk /dev/vda2`.
109- `arch-test.qcow2` must exist before launching any VM (run `./create-vm-img.sh` first). The ISO launcher also requires it as the install target disk.
110- Desktop and laptop profiles use different MAC addresses (`52:54:00:12:34:01` / `:02`) so both VMs can run concurrently on the same host.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close