Add Packer configuration to build a minimal Alpine 3.23 UEFI VM for XCP-ng tests#523
Draft
glehmann wants to merge 6 commits into
Draft
Add Packer configuration to build a minimal Alpine 3.23 UEFI VM for XCP-ng tests#523glehmann wants to merge 6 commits into
glehmann wants to merge 6 commits into
Conversation
This was referenced May 11, 2026
| "<wait3>", | ||
| "ifconfig eth0 up && udhcpc -i eth0<enter><wait5>", | ||
| # "USE<leftShiftOn>-<leftShiftOff>EFI=1 SWAP<leftShiftOn>-<leftShiftOff>SIZE=0 ERASE<leftShiftOn>-<leftShiftOff>DISKS=/dev/xvda setup-alpine -f http://{{.HTTPIP}}:{{.HTTPPort}}/answers.txt<enter>", | ||
| "USE<leftShiftOn>-<leftShiftOff>EFI=1 SWAP<leftShiftOn>-<leftShiftOff>SIZE=0 ERASE<leftShiftOn>-<leftShiftOff>DISKS=/dev/xvda setup-alpine -f https://raw.githubusercontent.com/xcp-ng/xcp-ng-tests/refs/heads/gln/packer-alpine-uefi-xcpng-loun/packer/http_files/answers.txt<enter>", |
Contributor
There was a problem hiding this comment.
The value of -f flag should be generic, isn't it?
What do you think of using an hcl variable to enable configuration here?
| "rc-update add xe-guest-utilities default<enter>", | ||
| # "rc-service xe-guest-utilities start<enter>", | ||
| # Remove log files | ||
| "find /var/log -type f -exec truncate -s 0 {} \\;<enter>", |
Contributor
There was a problem hiding this comment.
Those commands look similar to what I can see in cleanup.sh. Is it normal?
Btw, I don't see any occurrence of calling the cleanup script. Is there an implicit mechanism of Packer?
e9ab3bf to
f2fef78
Compare
701ce24 to
e14efd4
Compare
f2fef78 to
fdd3cbf
Compare
a5fd3b0 to
f7496e0
Compare
Replace the BlockDeviceInfo TypedDict and the per-call disk_is_available() check with a dataclass that includes availability as a field, determined once at scan time using mountpoint, mdadm, LVM, and ZFS checks. Extend enumeration to cover mdadm arrays and multipath devices in addition to local disks. Update all callers to use attribute access instead of dict subscript. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
zpool destroy removes the pool but leaves ZFS member signatures and the partition table on disk, causing the device to appear in use on the next test run. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Add a WWN field to BlockDeviceInfo (populated from lsblk for local disks, and from the DM alias for mpath devices). In the disks fixture, use WWNs to: - Mark a LUN unavailable on all hosts if it is already in use on any host (cross-host deduplication for shared FC/iSCSI LUNs). - Sort LUNs listed in LVMOHBA_DEVICE_CONFIG or LVMOISCSI_DEVICE_CONFIG to the end of each host's disk list, so they are only selected by other tests when no other disk is available. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Allow passing VHD_MAX and QCOW2_MAX as values to --volume-size and --write-volume-cap, making it easy to test at the maximum supported VDI size for each image format. MAX_VDI_SIZE in storage.py is now derived from the same constants to keep a single source of truth. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
…ter performance Add an optional `align` parameter (default: 4KiB) to align span positions to a given block size. Only positions are aligned (rounded down); span sizes are reduced if needed to avoid overlapping the next span's position. When config.write_volume_cap is large enough, spans are contiguous and cover the full device with no gaps. Without alignment, write throughput drops from ~700MiB/s to ~200MiB/s on large disks. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
…CP-ng tests The image is built with the vatesfr/packer-plugin-xenserver plugin targeting a local XCP-ng host. It produces a zstd-compressed XVA with: - Alpine Linux 3.23.4 (x86_64), UEFI boot (grub + GPT) - 1 vCPU, 256 MiB RAM, 512 MiB disk, no swap - xe-guest-utilities installed from the Alpine community repo - XCP-ng CI public SSH keys authorised for root - Post-processed by xva_bridge.py to set bridge=xenbr0 and zstd compression Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
f7496e0 to
cddcf93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The image is built with the vatesfr/packer-plugin-xenserver plugin targeting a
local XCP-ng host. It produces a zstd-compressed XVA with:
Signed-off-by: Gaëtan Lehmann gaetan.lehmann@vates.tech
This PR is part of a tree containing 19 PRs:
mastermaster