|
| 1 | +# XCP-ng Server Compatibility Test Kit |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +- **Docker** installed on your machine (or Docker Desktop for macOS/Windows). |
| 6 | +- **Hosts to test:** |
| 7 | + - At least one x86_64 server with XCP-ng installed (the release you want to test), |
| 8 | + [updated with the latest updates](https://xcp-ng.org/docs/updates.html). |
| 9 | + - A disk for the system, and a separate, empty disk for testing. |
| 10 | + - Optionally, a second identical host. If provided, will be automatically |
| 11 | + joined to the first to form a pool for storage migration and live migration |
| 12 | + tests. **Both hosts must have the same SSH root password.** |
| 13 | + - Internet access to download the test image. |
| 14 | + - SSH access available (root user; password-based authentication). |
| 15 | +- **Time:** The test suite execution might take up to an hour, depending on the hardware. |
| 16 | + |
| 17 | +## Security Notes |
| 18 | + |
| 19 | +The test VM is configured with a known access key and is **strictly reserved for testing purposes only**. |
| 20 | + |
| 21 | +## Quick Start |
| 22 | + |
| 23 | +Interactive mode (recommended): |
| 24 | + |
| 25 | +```bash |
| 26 | +docker run -it --rm -v ${PWD}:/app/logs:Z ghcr.io/xcp-ng/xcp-ng-tests/compat-kit |
| 27 | +``` |
| 28 | + |
| 29 | +You will be prompted for: |
| 30 | + |
| 31 | +- IP/hostname of the pool master. |
| 32 | +- IP/hostname of a second host (optional; press Enter to skip). |
| 33 | +- SSH root password (must be the same for both hosts). |
| 34 | + |
| 35 | +Alternatively, provide arguments on the command line: |
| 36 | + |
| 37 | +```bash |
| 38 | +docker run --rm \ |
| 39 | + -v ${PWD}:/app/logs \ |
| 40 | + ghcr.io/xcp-ng/xcp-ng-tests/compat-kit \ |
| 41 | + --master-host 192.168.1.10 \ |
| 42 | + --second-host 192.168.1.11 \ |
| 43 | + --password your_root_password |
| 44 | +``` |
| 45 | + |
| 46 | +After the container completes, test log files will be in the current directory: |
| 47 | + |
| 48 | +- `test_kit_1.log` — Single-host tests. |
| 49 | +- `test_kit_2.log` — Two-host pool tests — only if a second host was provided. |
| 50 | +- `test_kit_3.log` — Xen-level tests. |
| 51 | + |
| 52 | +Open these files locally with your text editor or log viewer. |
| 53 | + |
| 54 | +## Command-line options |
| 55 | + |
| 56 | +```text |
| 57 | + --master-host MASTER_HOST |
| 58 | + IP or hostname of the pool master |
| 59 | + --second-host SECOND_HOST |
| 60 | + IP or hostname of the second host (optional, for pool tests) |
| 61 | + --password PASSWORD SSH root password (if not provided, will be prompted) |
| 62 | + --log-dir LOG_DIR Directory where log files will be written (default: /app/logs) |
| 63 | + --log-level {debug,info,warning,error,critical} |
| 64 | + Logging level (default: info) |
| 65 | + --vm-image-url VM_IMAGE_URL |
| 66 | + URL to the VM image to download (default: https://nextcloud.vates.tech/index.php/s/MmEjo8qYo7Ccs2B/download) |
| 67 | + --skip-cleanup Don't remove SSH keys from hosts on exit |
| 68 | + --dry-run Print what would be done without making any changes |
| 69 | + --non-interactive Don't prompt for missing parameters; fail if required arguments are missing |
| 70 | +``` |
| 71 | + |
| 72 | +## Development |
| 73 | + |
| 74 | +### Building the Docker image |
| 75 | + |
| 76 | +From the xcp-ng-tests repository root: |
| 77 | + |
| 78 | +```bash |
| 79 | +docker build -t ghcr.io/xcp-ng/xcp-ng-tests/compat-kit -f compat_kit/Dockerfile . |
| 80 | +``` |
| 81 | + |
| 82 | +This creates an image with all dependencies pre-installed, including the xcp-ng-tests suite and |
| 83 | +test runner tools. |
0 commit comments