cloud-hypervisor SAL + rhai test script for it

This commit is contained in:
Maxime Van Hees
2025-08-20 18:01:21 +02:00
parent d1c80863b8
commit d735316b7f
7 changed files with 782 additions and 13 deletions

View File

@@ -67,17 +67,18 @@ print("✓ snapshot deleted: s1");
// Optional: Base image builder (commented to avoid big downloads by default)
// Uncomment to test manually on a dev machine with bandwidth.
// print("\n--- Optional: Build Ubuntu 24.04 Base ---");
// let base_dir = "/tmp/virt_images";
// let base = qcow2_build_ubuntu_24_04_base(base_dir, 10);
// if base.is_err() {
// print(`⚠️ base build failed or skipped: ${base.unwrap_err()}`);
// } else {
// let m = base.unwrap();
// print(`✓ Base image path: ${m.base_image_path}`);
// print(`✓ Base snapshot: ${m.snapshot}`);
// print(`✓ Source URL: ${m.url}`);
// if m.resized_to_gb != () { print(`✓ Resized to: ${m.resized_to_gb}G`); }
// }
print("\n--- Optional: Build Ubuntu 24.04 Base ---");
let base_dir = "/tmp/virt_images";
let m;
try {
m = qcow2_build_ubuntu_24_04_base(base_dir, 10);
} catch (err) {
print(`⚠️ base build failed or skipped: ${err}`);
exit();
}
print(`✓ Base image path: ${m.base_image_path}`);
print(`✓ Base snapshot: ${m.snapshot}`);
print(`✓ Source URL: ${m.url}`);
if m.resized_to_gb != () { print(`✓ Resized to: ${m.resized_to_gb}G`); }
print("\n=== QCOW2 Basic Tests Completed ===");