diff --git a/cloud-hypervisor/tests/common/tests_wrappers.rs b/cloud-hypervisor/tests/common/tests_wrappers.rs index addc803e2..cabd53239 100644 --- a/cloud-hypervisor/tests/common/tests_wrappers.rs +++ b/cloud-hypervisor/tests/common/tests_wrappers.rs @@ -301,7 +301,7 @@ pub(crate) fn test_cpu_topology( packages: u8, use_fw: bool, ) { - let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); let total_vcpus = threads_per_core * cores_per_package * packages; let direct_kernel_boot_path = direct_kernel_boot_path(); @@ -895,15 +895,7 @@ pub(crate) fn _test_virtio_fs( use_generic_vhost_user: bool, pci_segment: Option, ) { - #[cfg(target_arch = "aarch64")] - let focal_image = if hotplug { - FOCAL_IMAGE_UPDATE_KERNEL_NAME.to_string() - } else { - FOCAL_IMAGE_NAME.to_string() - }; - #[cfg(target_arch = "x86_64")] - let focal_image = FOCAL_IMAGE_NAME.to_string(); - let disk_config = UbuntuDiskConfig::new(focal_image); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); let api_socket = temp_api_path(&guest.tmp_dir); let event_path = temp_event_monitor_path(&guest.tmp_dir); @@ -1281,7 +1273,7 @@ pub(crate) fn test_memory_mergeable(mergeable: bool) { // We assume the number of shared pages in the rest of the system to be constant let ksm_ps_init = get_ksm_pages_shared(); - let disk_config1 = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let disk_config1 = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest1 = Guest::new(Box::new(disk_config1)); let mut child1 = GuestCommand::new(&guest1) .default_cpus() @@ -1307,7 +1299,7 @@ pub(crate) fn test_memory_mergeable(mergeable: bool) { let ksm_ps_guest1 = get_ksm_pages_shared(); - let disk_config2 = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let disk_config2 = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest2 = Guest::new(Box::new(disk_config2)); let mut child2 = GuestCommand::new(&guest2) .default_cpus() @@ -1353,15 +1345,7 @@ pub(crate) fn test_memory_mergeable(mergeable: bool) { // interface attached to the virtual IOMMU since this is the one used to // send all commands through SSH. pub(crate) fn _test_virtio_iommu(_acpi: bool /* not needed on x86_64 */) { - // Virtio-iommu support is ready in recent kernel (v5.14). But the kernel in - // Focal image is still old. - // So if ACPI is enabled on AArch64, we use a modified Focal image in which - // the kernel binary has been updated. - #[cfg(target_arch = "aarch64")] - let focal_image = FOCAL_IMAGE_UPDATE_KERNEL_NAME.to_string(); - #[cfg(target_arch = "x86_64")] - let focal_image = FOCAL_IMAGE_NAME.to_string(); - let disk_config = UbuntuDiskConfig::new(focal_image); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); #[cfg(target_arch = "x86_64")] @@ -3114,7 +3098,7 @@ pub(crate) fn _test_watchdog(guest: &Guest) { // Trigger a panic (sync first). We need to do this inside a screen with a delay so the SSH command returns. guest.ssh_command("screen -dmS reboot sh -c \"sleep 5; echo s | tee /proc/sysrq-trigger; echo c | sudo tee /proc/sysrq-trigger\"").unwrap(); // Allow some time for the watchdog to trigger (max 30s) and reboot to happen - guest.wait_vm_boot_custom_timeout(50).unwrap(); + guest.wait_vm_boot_custom_timeout(120).unwrap(); // Check a reboot is triggered by the watchdog expected_reboot_count += 1; assert_eq!(get_reboot_count(guest), expected_reboot_count); diff --git a/cloud-hypervisor/tests/common/utils.rs b/cloud-hypervisor/tests/common/utils.rs index a847e7e8b..fe22d5230 100644 --- a/cloud-hypervisor/tests/common/utils.rs +++ b/cloud-hypervisor/tests/common/utils.rs @@ -1022,7 +1022,6 @@ pub(crate) fn enable_guest_watchdog(guest: &Guest, watchdog_sec: u32) { .unwrap_or_default() ); - // Enable systemd watchdog guest .ssh_command(&format!( "echo RuntimeWatchdogSec={watchdog_sec}s | sudo tee -a /etc/systemd/system.conf" diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index f8769fbd7..a7ff2c4db 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -51,16 +51,16 @@ mod common_parallel { #[test] #[cfg(target_arch = "x86_64")] - fn test_focal_hypervisor_fw() { - let guest = basic_regular_guest!(FOCAL_IMAGE_NAME) + fn test_jammy_hypervisor_fw() { + let guest = basic_regular_guest!(JAMMY_IMAGE_NAME) .with_kernel(fw_path(FwType::RustHypervisorFirmware)); _test_simple_launch(&guest); } #[test] #[cfg(target_arch = "x86_64")] - fn test_focal_ovmf() { - let guest = basic_regular_guest!(FOCAL_IMAGE_NAME).with_kernel(fw_path(FwType::Ovmf)); + fn test_jammy_ovmf() { + let guest = basic_regular_guest!(JAMMY_IMAGE_NAME).with_kernel(fw_path(FwType::Ovmf)); _test_simple_launch(&guest); } @@ -342,8 +342,7 @@ mod common_parallel { #[test] #[cfg(target_arch = "x86_64")] fn test_iommu_segments() { - let focal_image = FOCAL_IMAGE_NAME.to_string(); - let disk_config = UbuntuDiskConfig::new(focal_image); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); // Prepare another disk file for the virtio-disk device @@ -584,14 +583,14 @@ mod common_parallel { #[test] fn test_virtio_block_io_uring() { let guest = - make_virtio_block_guest(&GuestFactory::new_regular_guest_factory(), FOCAL_IMAGE_NAME); + make_virtio_block_guest(&GuestFactory::new_regular_guest_factory(), JAMMY_IMAGE_NAME); _test_virtio_block(&guest, false, true, false, false, ImageType::Raw); } #[test] fn test_virtio_block_aio() { let guest = - make_virtio_block_guest(&GuestFactory::new_regular_guest_factory(), FOCAL_IMAGE_NAME) + make_virtio_block_guest(&GuestFactory::new_regular_guest_factory(), JAMMY_IMAGE_NAME) .with_cpu(4); _test_virtio_block(&guest, true, false, false, false, ImageType::Raw); } @@ -599,7 +598,7 @@ mod common_parallel { #[test] fn test_virtio_block_sync() { let guest = - make_virtio_block_guest(&GuestFactory::new_regular_guest_factory(), FOCAL_IMAGE_NAME) + make_virtio_block_guest(&GuestFactory::new_regular_guest_factory(), JAMMY_IMAGE_NAME) .with_cpu(4); _test_virtio_block(&guest, true, true, false, false, ImageType::Raw); } @@ -1661,8 +1660,8 @@ mod common_parallel { let mut raw_file_path = workload_path.clone(); let mut vhd_file_path = workload_path; - raw_file_path.push(FOCAL_IMAGE_NAME); - vhd_file_path.push(FOCAL_IMAGE_NAME_VHD); + raw_file_path.push(JAMMY_IMAGE_NAME); + vhd_file_path.push(JAMMY_IMAGE_NAME_VHD); // Generate VHD file from RAW file std::process::Command::new("qemu-img") @@ -1677,7 +1676,7 @@ mod common_parallel { .expect("Expect generating VHD image from RAW image"); let guest = make_virtio_block_guest( &GuestFactory::new_regular_guest_factory(), - FOCAL_IMAGE_NAME_VHD, + JAMMY_IMAGE_NAME_VHD, ); _test_virtio_block(&guest, false, false, false, false, ImageType::FixedVhd); } @@ -1689,8 +1688,8 @@ mod common_parallel { let mut raw_file_path = workload_path.clone(); let mut vhdx_file_path = workload_path; - raw_file_path.push(FOCAL_IMAGE_NAME); - vhdx_file_path.push(FOCAL_IMAGE_NAME_VHDX); + raw_file_path.push(JAMMY_IMAGE_NAME); + vhdx_file_path.push(JAMMY_IMAGE_NAME_VHDX); // Generate dynamic VHDX file from RAW file std::process::Command::new("qemu-img") @@ -1704,7 +1703,7 @@ mod common_parallel { .expect("Expect generating dynamic VHDx image from RAW image"); let guest = make_virtio_block_guest( &GuestFactory::new_regular_guest_factory(), - FOCAL_IMAGE_NAME_VHDX, + JAMMY_IMAGE_NAME_VHDX, ); _test_virtio_block(&guest, false, false, true, false, ImageType::Vhdx); } @@ -2769,11 +2768,7 @@ mod common_parallel { #[test] fn test_memory_hotplug() { - #[cfg(target_arch = "aarch64")] - let focal_image = FOCAL_IMAGE_UPDATE_KERNEL_NAME.to_string(); - #[cfg(target_arch = "x86_64")] - let focal_image = FOCAL_IMAGE_NAME.to_string(); - let disk_config = UbuntuDiskConfig::new(focal_image); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); let api_socket = temp_api_path(&guest.tmp_dir); @@ -4939,11 +4934,7 @@ mod common_parallel { } fn _test_pmem_hotplug(pci_segment: Option) { - #[cfg(target_arch = "aarch64")] - let focal_image = FOCAL_IMAGE_UPDATE_KERNEL_NAME.to_string(); - #[cfg(target_arch = "x86_64")] - let focal_image = FOCAL_IMAGE_NAME.to_string(); - let disk_config = UbuntuDiskConfig::new(focal_image); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); #[cfg(target_arch = "x86_64")] @@ -5232,7 +5223,7 @@ mod common_parallel { #[test] fn test_watchdog() { - let guest = basic_regular_guest!(FOCAL_IMAGE_NAME); + let guest = basic_regular_guest!(JAMMY_IMAGE_NAME); _test_watchdog(&guest); } @@ -5265,10 +5256,10 @@ mod common_parallel { #[test] #[cfg(not(feature = "mshv"))] fn test_ovs_dpdk() { - let disk_config1 = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let disk_config1 = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest1 = Guest::new(Box::new(disk_config1)); - let disk_config2 = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let disk_config2 = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest2 = Guest::new(Box::new(disk_config2)); let api_socket_source = format!("{}.1", temp_api_path(&guest2.tmp_dir)); @@ -6274,7 +6265,7 @@ mod common_parallel { #[cfg(not(feature = "mshv"))] fn _test_live_migration_watchdog(upgrade_test: bool, local: bool) { - let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(disk_config)); let kernel_path = direct_kernel_boot_path(); let console_text = String::from("On a branch floating down river a cricket, singing."); @@ -6451,7 +6442,7 @@ mod common_parallel { // Trigger a panic (sync first). We need to do this inside a screen with a delay so the SSH command returns. guest.ssh_command("screen -dmS reboot sh -c \"sleep 5; echo s | tee /proc/sysrq-trigger; echo c | sudo tee /proc/sysrq-trigger\"").unwrap(); // Allow some time for the watchdog to trigger (max 30s) and reboot to happen - guest.wait_vm_boot_custom_timeout(50).unwrap(); + guest.wait_vm_boot_custom_timeout(120).unwrap(); // Check a reboot is triggered by the watchdog expected_reboot_count += 1; assert_eq!(get_reboot_count(&guest), expected_reboot_count); @@ -9347,10 +9338,10 @@ mod common_sequential { #[cfg(not(feature = "mshv"))] fn _test_live_migration_ovs_dpdk(upgrade_test: bool, local: bool) { - let ovs_disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let ovs_disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let ovs_guest = Guest::new(Box::new(ovs_disk_config)); - let migration_disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let migration_disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); let migration_guest = Guest::new(Box::new(migration_disk_config)); let src_api_socket = temp_api_path(&migration_guest.tmp_dir); @@ -11129,9 +11120,9 @@ mod aarch64_acpi { #[test] fn test_simple_launch_acpi() { - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); - vec![Box::new(focal)].drain(..).for_each(|disk_config| { + vec![Box::new(jammy)].drain(..).for_each(|disk_config| { let guest = Guest::new(disk_config); let mut child = GuestCommand::new(&guest) diff --git a/cloud-hypervisor/tests/integration_cvm.rs b/cloud-hypervisor/tests/integration_cvm.rs index 039f8840f..0f4b17d77 100644 --- a/cloud-hypervisor/tests/integration_cvm.rs +++ b/cloud-hypervisor/tests/integration_cvm.rs @@ -27,8 +27,8 @@ mod common_cvm { } #[test] - fn test_focal_simple_launch() { - let guest = basic_cvm_guest!(FOCAL_IMAGE_NAME); + fn test_jammy_simple_launch() { + let guest = basic_cvm_guest!(JAMMY_IMAGE_NAME); _test_simple_launch(&guest); } @@ -116,7 +116,7 @@ mod common_cvm { fn test_virtio_block_io_uring() { let guest = make_virtio_block_guest( &GuestFactory::new_confidential_guest_factory(), - FOCAL_IMAGE_NAME, + JAMMY_IMAGE_NAME, ); _test_virtio_block(&guest, false, true, false, false, ImageType::Raw); } @@ -125,7 +125,7 @@ mod common_cvm { fn test_virtio_block_aio() { let guest = make_virtio_block_guest( &GuestFactory::new_confidential_guest_factory(), - FOCAL_IMAGE_NAME, + JAMMY_IMAGE_NAME, ); _test_virtio_block(&guest, true, false, false, false, ImageType::Raw); } @@ -134,7 +134,7 @@ mod common_cvm { fn test_virtio_block_sync() { let guest = make_virtio_block_guest( &GuestFactory::new_confidential_guest_factory(), - FOCAL_IMAGE_NAME, + JAMMY_IMAGE_NAME, ); _test_virtio_block(&guest, true, true, false, false, ImageType::Raw); } @@ -289,7 +289,7 @@ mod common_cvm { #[test] fn test_watchdog() { - let guest = basic_cvm_guest!(FOCAL_IMAGE_NAME); + let guest = basic_cvm_guest!(JAMMY_IMAGE_NAME); _test_watchdog(&guest); } diff --git a/performance-metrics/src/performance_tests.rs b/performance-metrics/src/performance_tests.rs index f0b2d6d02..b3e230b33 100644 --- a/performance-metrics/src/performance_tests.rs +++ b/performance-metrics/src/performance_tests.rs @@ -13,9 +13,6 @@ use thiserror::Error; use crate::{ImageFormat, PerformanceTestControl, PerformanceTestOverrides, mean}; -#[cfg(target_arch = "aarch64")] -pub const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom-20210929-0-update-tool.raw"; - #[allow(dead_code)] #[derive(Error, Debug)] enum Error { @@ -138,8 +135,8 @@ pub fn performance_net_throughput(control: &PerformanceTestControl) -> f64 { let test_timeout = control.test_timeout; let (rx, bandwidth) = control.net_control.unwrap(); - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let mut guest = performance_test_new_guest(Box::new(focal), control); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let mut guest = performance_test_new_guest(Box::new(jammy), control); let num_queues = control.num_queues.unwrap(); let queue_size = control.queue_size.unwrap(); @@ -178,8 +175,8 @@ pub fn performance_net_throughput(control: &PerformanceTestControl) -> f64 { } pub fn performance_net_latency(control: &PerformanceTestControl) -> f64 { - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let mut guest = performance_test_new_guest(Box::new(focal), control); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let mut guest = performance_test_new_guest(Box::new(jammy), control); let num_queues = control.num_queues.unwrap(); let queue_size = control.queue_size.unwrap(); @@ -325,8 +322,8 @@ fn measure_boot_time(cmd: &mut GuestCommand, test_timeout: u32) -> Result f64 { let r = std::panic::catch_unwind(|| { - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let guest = performance_test_new_guest(Box::new(focal), control); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let guest = performance_test_new_guest(Box::new(jammy), control); let mut cmd = GuestCommand::new(&guest); let c = cmd @@ -349,8 +346,8 @@ pub fn performance_boot_time(control: &PerformanceTestControl) -> f64 { pub fn performance_boot_time_pmem(control: &PerformanceTestControl) -> f64 { let r = std::panic::catch_unwind(|| { - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let guest = performance_test_new_guest(Box::new(focal), control); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let guest = performance_test_new_guest(Box::new(jammy), control); let mut cmd = GuestCommand::new(&guest); let c = cmd .default_cpus() @@ -387,8 +384,8 @@ pub fn performance_block_io(control: &PerformanceTestControl) -> f64 { let bandwidth = block_control.bandwidth; let test_file = block_control.test_file; - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let mut guest = performance_test_new_guest(Box::new(focal), control); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let mut guest = performance_test_new_guest(Box::new(jammy), control); let api_socket = guest .tmp_dir .as_path() @@ -528,8 +525,8 @@ fn measure_restore_time( pub fn performance_restore_latency(control: &PerformanceTestControl) -> f64 { let r = std::panic::catch_unwind(|| { - let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); - let guest = performance_test_new_guest(Box::new(focal), control); + let jammy = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let guest = performance_test_new_guest(Box::new(jammy), control); let api_socket_source = String::from( guest .tmp_dir diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index ddf934335..0e728e4b5 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -28,24 +28,6 @@ build_virtiofsd() { update_workloads() { cp scripts/sha1sums-aarch64-common "$WORKLOADS_DIR" - FOCAL_OS_RAW_IMAGE_NAME="focal-server-cloudimg-arm64-custom-20210929-0.raw" - FOCAL_OS_RAW_IMAGE_DOWNLOAD_URL="https://ch-images.azureedge.net/$FOCAL_OS_RAW_IMAGE_NAME" - FOCAL_OS_RAW_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_NAME" - if [ ! -f "$FOCAL_OS_RAW_IMAGE" ]; then - pushd "$WORKLOADS_DIR" || exit - time wget --quiet $FOCAL_OS_RAW_IMAGE_DOWNLOAD_URL || exit 1 - popd || exit - fi - - FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME="focal-server-cloudimg-arm64-custom-20210929-0.qcow2" - FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_DOWNLOAD_URL="https://ch-images.azureedge.net/$FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME" - FOCAL_OS_QCOW2_UNCOMPRESSED_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_NAME" - if [ ! -f "$FOCAL_OS_QCOW2_UNCOMPRESSED_IMAGE" ]; then - pushd "$WORKLOADS_DIR" || exit - time wget --quiet $FOCAL_OS_QCOW2_IMAGE_UNCOMPRESSED_DOWNLOAD_URL || exit 1 - popd || exit - fi - JAMMY_OS_RAW_IMAGE_NAME="jammy-server-cloudimg-arm64-custom-20220329-0.raw" JAMMY_OS_RAW_IMAGE_DOWNLOAD_URL="https://ch-images.azureedge.net/$JAMMY_OS_RAW_IMAGE_NAME" JAMMY_OS_RAW_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_RAW_IMAGE_NAME" @@ -180,17 +162,6 @@ update_workloads() { # Prepare linux image (build from source or download pre-built) prepare_linux - # Update the kernel in the cloud image for some tests that requires recent kernel version - FOCAL_OS_RAW_IMAGE_UPDATE_KERNEL_NAME="focal-server-cloudimg-arm64-custom-20210929-0-update-kernel.raw" - cp "$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_NAME" "$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_UPDATE_KERNEL_NAME" - FOCAL_OS_RAW_IMAGE_UPDATE_KERNEL_ROOT_DIR="$WORKLOADS_DIR/focal-server-cloudimg-root" - NEW_KERNEL="$WORKLOADS_DIR/Image-arm64.gz" - DST_KERNEL_PATH="boot/vmlinuz" - mkdir -p "$FOCAL_OS_RAW_IMAGE_UPDATE_KERNEL_ROOT_DIR" - IMG="$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_UPDATE_KERNEL_NAME" - # Mount image partition, copy kernel, and unmount - copy_to_image "$IMG" "$FOCAL_OS_RAW_IMAGE_UPDATE_KERNEL_ROOT_DIR" "$NEW_KERNEL" "$DST_KERNEL_PATH" || exit 1 - # Build virtiofsd build_virtiofsd diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index 09083ed2b..99d0e54ef 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -188,7 +188,7 @@ VFIO_DIR="$WORKLOADS_DIR/vfio" VFIO_DISK_IMAGE="$WORKLOADS_DIR/vfio.img" rm -rf "$VFIO_DIR" "$VFIO_DISK_IMAGE" mkdir -p "$VFIO_DIR" -cp "$FOCAL_OS_RAW_IMAGE" "$VFIO_DIR" +cp "$JAMMY_OS_RAW_IMAGE" "$VFIO_DIR" cp "$FW" "$VFIO_DIR" cp "$VMLINUX_IMAGE" "$VFIO_DIR" || exit 1 diff --git a/scripts/run_metrics.sh b/scripts/run_metrics.sh index c84f5b994..fcc8597e8 100755 --- a/scripts/run_metrics.sh +++ b/scripts/run_metrics.sh @@ -11,21 +11,6 @@ export TEST_ARCH WORKLOADS_DIR="$HOME/workloads" mkdir -p "$WORKLOADS_DIR" -build_fio() { - FIO_DIR="$WORKLOADS_DIR/fio_build" - FIO_REPO="https://github.com/axboe/fio.git" - - checkout_repo "$FIO_DIR" "$FIO_REPO" master "1953e1adb5a28ed21370e85991d7f5c3cdc699f3" - if [ ! -f "$FIO_DIR/.built" ]; then - pushd "$FIO_DIR" || exit - ./configure - make -j "$(nproc)" - cp fio "$WORKLOADS_DIR/fio" - touch .built - popd || exit - fi -} - process_common_args "$@" build_features="mshv" @@ -38,62 +23,40 @@ fi cp scripts/sha1sums-"${TEST_ARCH}"-common "$WORKLOADS_DIR" if [ "${TEST_ARCH}" == "aarch64" ]; then - FOCAL_OS_IMAGE_NAME="focal-server-cloudimg-arm64-custom-20210929-0.qcow2" + JAMMY_OS_IMAGE_NAME="jammy-server-cloudimg-arm64-custom-20220329-0.qcow2" else - FOCAL_OS_IMAGE_NAME="focal-server-cloudimg-amd64-custom-20210609-0.qcow2" + JAMMY_OS_IMAGE_NAME="jammy-server-cloudimg-amd64-custom-20241017-0.qcow2" fi -FOCAL_OS_IMAGE_URL="https://ch-images.azureedge.net/$FOCAL_OS_IMAGE_NAME" -FOCAL_OS_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_IMAGE_NAME" -if [ ! -f "$FOCAL_OS_IMAGE" ]; then +JAMMY_OS_IMAGE_URL="https://ch-images.azureedge.net/$JAMMY_OS_IMAGE_NAME" +JAMMY_OS_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_IMAGE_NAME" +if [ ! -f "$JAMMY_OS_IMAGE" ]; then pushd "$WORKLOADS_DIR" || exit - time wget --quiet $FOCAL_OS_IMAGE_URL || exit 1 + time wget --quiet $JAMMY_OS_IMAGE_URL || exit 1 popd || exit fi if [ "${TEST_ARCH}" == "aarch64" ]; then - FOCAL_OS_RAW_IMAGE_NAME="focal-server-cloudimg-arm64-custom-20210929-0.raw" + JAMMY_OS_RAW_IMAGE_NAME="jammy-server-cloudimg-arm64-custom-20220329-0.raw" else - FOCAL_OS_RAW_IMAGE_NAME="focal-server-cloudimg-amd64-custom-20210609-0.raw" + JAMMY_OS_RAW_IMAGE_NAME="jammy-server-cloudimg-amd64-custom-20241017-0.raw" fi -FOCAL_OS_RAW_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_NAME" -if [ ! -f "$FOCAL_OS_RAW_IMAGE" ]; then +JAMMY_OS_RAW_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_RAW_IMAGE_NAME" +if [ ! -f "$JAMMY_OS_RAW_IMAGE" ]; then pushd "$WORKLOADS_DIR" || exit - time qemu-img convert -p -f qcow2 -O raw $FOCAL_OS_IMAGE_NAME $FOCAL_OS_RAW_IMAGE_NAME || exit 1 + time qemu-img convert -p -f qcow2 -O raw $JAMMY_OS_IMAGE_NAME $JAMMY_OS_RAW_IMAGE_NAME || exit 1 popd || exit fi pushd "$WORKLOADS_DIR" || exit -if ! grep focal sha1sums-"${TEST_ARCH}"-common | sha1sum --check; then +if ! grep jammy sha1sums-"${TEST_ARCH}"-common | sha1sum --check; then echo "sha1sum validation of images failed, remove invalid images to fix the issue." exit 1 fi popd || exit -if [ "${TEST_ARCH}" == "aarch64" ]; then - build_fio - - # Update the fio in the cloud image to use io_uring on AArch64 - FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_NAME="focal-server-cloudimg-arm64-custom-20210929-0-update-tool.raw" - cp "$FOCAL_OS_RAW_IMAGE" "$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_NAME" - FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_ROOT_DIR="$WORKLOADS_DIR/focal-server-cloudimg-root" - if [ ! -d "$FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_ROOT_DIR" ]; then - mkdir -p "$FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_ROOT_DIR" - fi - # Mount image partition - IMG="$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_NAME" - - # Update fio binary in the image - SRC_FIO_PATH="$WORKLOADS_DIR/fio" - DST_FIO_PATH="usr/bin/fio" - - # Mount image partition, copy fio, and unmount - chmod +x "$SRC_FIO_PATH" - copy_to_image "$IMG" "$FOCAL_OS_RAW_IMAGE_UPDATE_TOOL_ROOT_DIR" "$SRC_FIO_PATH" "$DST_FIO_PATH" || exit -fi - # Prepare linux image (build from source or download pre-built) prepare_linux diff --git a/scripts/sha1sums-aarch64-common b/scripts/sha1sums-aarch64-common index d955f98be..341dbb256 100644 --- a/scripts/sha1sums-aarch64-common +++ b/scripts/sha1sums-aarch64-common @@ -1,6 +1,4 @@ e4addb6e212a298144f9eb0eb6e36019d013f0e7 alpine-minirootfs-aarch64.tar.gz -25b4f9ac308898d63b73d7db0e0e2d4768853723 focal-server-cloudimg-arm64-custom-20210929-0.qcow2 -9953b31bb1923cdd8d91b1b7cc9ad3a9be1e0a59 focal-server-cloudimg-arm64-custom-20210929-0.raw 7118f4d4cad18c8357bc2ad9824a50f9a82a860a jammy-server-cloudimg-arm64-custom-20220329-0.qcow2 1f2b71be43b8f748f01306c4454e5c921343faa4 jammy-server-cloudimg-arm64-custom-20220329-0.raw ce3656987f9e4238ef8afbd65fca219460c1f767 CLOUDHV_EFI.fd diff --git a/scripts/sha1sums-x86_64-common b/scripts/sha1sums-x86_64-common index b7fb9923c..be703a672 100644 --- a/scripts/sha1sums-x86_64-common +++ b/scripts/sha1sums-x86_64-common @@ -1,4 +1,2 @@ -f1eccdc5e1b515dbad294426ab081b47ebfb97c0 focal-server-cloudimg-amd64-custom-20210609-0.qcow2 -7f5a8358243a96adf61f5c20139b29f308f2c0e3 focal-server-cloudimg-amd64-custom-20210609-0.raw 5f10738920efb74f0bf854cadcd1b1fd544e49c8 jammy-server-cloudimg-amd64-custom-20241017-0.qcow2 c1dfbe7abde400e675844568dbe9d3914222f6de jammy-server-cloudimg-amd64-custom-20241017-0.raw diff --git a/scripts/test-util.sh b/scripts/test-util.sh index ca89159e2..8d4029f3c 100644 --- a/scripts/test-util.sh +++ b/scripts/test-util.sh @@ -168,7 +168,7 @@ download_hypervisor_fw() { } download_linux() { - KERNEL_TAG="ch-release-v6.16.9-20251112" + KERNEL_TAG="ch-release-v6.16.9-20260508" if [ -n "$AUTH_DOWNLOAD_TOKEN" ]; then echo "Using authenticated download from GitHub" KERNEL_URLS=$(curl --silent https://api.github.com/repos/cloud-hypervisor/linux/releases/tags/${KERNEL_TAG} \ @@ -346,25 +346,8 @@ copy_to_image() { return $? } -# Download x86 guest images (Focal and Jammy) +# Download x86 guest images download_x86_guest_images() { - FOCAL_OS_IMAGE_NAME="focal-server-cloudimg-amd64-custom-20210609-0.qcow2" - FOCAL_OS_IMAGE_URL="https://ch-images.azureedge.net/$FOCAL_OS_IMAGE_NAME" - FOCAL_OS_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_IMAGE_NAME" - if [ ! -f "$FOCAL_OS_IMAGE" ]; then - pushd "$WORKLOADS_DIR" || exit - time wget --quiet $FOCAL_OS_IMAGE_URL || exit 1 - popd || exit - fi - - FOCAL_OS_RAW_IMAGE_NAME="focal-server-cloudimg-amd64-custom-20210609-0.raw" - FOCAL_OS_RAW_IMAGE="$WORKLOADS_DIR/$FOCAL_OS_RAW_IMAGE_NAME" - if [ ! -f "$FOCAL_OS_RAW_IMAGE" ]; then - pushd "$WORKLOADS_DIR" || exit - time qemu-img convert -p -f qcow2 -O raw $FOCAL_OS_IMAGE_NAME $FOCAL_OS_RAW_IMAGE_NAME || exit 1 - popd || exit - fi - JAMMY_OS_IMAGE_NAME="jammy-server-cloudimg-amd64-custom-20241017-0.qcow2" JAMMY_OS_IMAGE_URL="https://ch-images.azureedge.net/$JAMMY_OS_IMAGE_NAME" JAMMY_OS_IMAGE="$WORKLOADS_DIR/$JAMMY_OS_IMAGE_NAME" diff --git a/test_data/cloud-init/ubuntu/ci/user-data b/test_data/cloud-init/ubuntu/ci/user-data index 45105d53b..530736f10 100644 --- a/test_data/cloud-init/ubuntu/ci/user-data +++ b/test_data/cloud-init/ubuntu/ci/user-data @@ -47,7 +47,7 @@ write_files: # 1G ram requires 512 pages echo 512 | sudo tee /proc/sys/vm/nr_hugepages sudo chmod a+rwX /dev/hugepages - /mnt/cloud-hypervisor --kernel /mnt/vmlinux-x86_64 --cmdline "console=hvc0 reboot=k panic=1 nomodules root=/dev/vda1 VFIOTAG" --disk path=/mnt/focal-server-cloudimg-amd64-custom-20210609-0.raw path=/mnt/cloudinit.img --cpus boot=1 --memory size=512M,hotplug_size=1G,hugepages=on --device path=/sys/bus/pci/devices/0000:00:05.0/ path=/sys/bus/pci/devices/0000:00:07.0/ path=/sys/bus/pci/devices/0000:00:08.0/ --api-socket=/tmp/ch_api.sock + /mnt/cloud-hypervisor --kernel /mnt/vmlinux-x86_64 --cmdline "console=hvc0 reboot=k panic=1 nomodules root=/dev/vda1 VFIOTAG" --disk path=/mnt/jammy-server-cloudimg-amd64-custom-20241017-0.raw path=/mnt/cloudinit.img --cpus boot=1 --memory size=512M,hotplug_size=1G,hugepages=on --device path=/sys/bus/pci/devices/0000:00:05.0/ path=/sys/bus/pci/devices/0000:00:07.0/ path=/sys/bus/pci/devices/0000:00:08.0/ --api-socket=/tmp/ch_api.sock - path: /etc/systemd/system/notify-booted.service diff --git a/test_infra/src/lib.rs b/test_infra/src/lib.rs index c58e6a9c8..6c1d9529b 100644 --- a/test_infra/src/lib.rs +++ b/test_infra/src/lib.rs @@ -1781,7 +1781,7 @@ impl Guest { if self.vm_type == GuestVmType::Confidential { 407_000 } else { - 480_000 + 400_000 } } "1G" => { @@ -2595,12 +2595,11 @@ pub const MAX_NUM_PCI_SEGMENTS: u16 = 96; #[cfg(target_arch = "x86_64")] pub mod x86_64 { - pub const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-amd64-custom-20210609-0.raw"; pub const JAMMY_VFIO_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-custom-vfio-20241012-0.raw"; - pub const FOCAL_IMAGE_NAME_VHD: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhd"; - pub const FOCAL_IMAGE_NAME_VHDX: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhdx"; pub const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-custom-20241017-0.raw"; + pub const JAMMY_IMAGE_NAME_VHD: &str = "jammy-server-cloudimg-amd64-custom-20241017-0.vhd"; + pub const JAMMY_IMAGE_NAME_VHDX: &str = "jammy-server-cloudimg-amd64-custom-20241017-0.vhdx"; pub const JAMMY_IMAGE_NAME_QCOW2: &str = "jammy-server-cloudimg-amd64-custom-20241017-0.qcow2"; pub const JAMMY_IMAGE_NAME_QCOW2_ZLIB: &str = "jammy-server-cloudimg-amd64-custom-20241017-0-zlib.qcow2"; @@ -2622,12 +2621,9 @@ pub use x86_64::*; #[cfg(target_arch = "aarch64")] pub mod aarch64 { - pub const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom-20210929-0.raw"; - pub const FOCAL_IMAGE_UPDATE_KERNEL_NAME: &str = - "focal-server-cloudimg-arm64-custom-20210929-0-update-kernel.raw"; - pub const FOCAL_IMAGE_NAME_VHD: &str = "focal-server-cloudimg-arm64-custom-20210929-0.vhd"; - pub const FOCAL_IMAGE_NAME_VHDX: &str = "focal-server-cloudimg-arm64-custom-20210929-0.vhdx"; pub const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-arm64-custom-20220329-0.raw"; + pub const JAMMY_IMAGE_NAME_VHD: &str = "jammy-server-cloudimg-arm64-custom-20220329-0.vhd"; + pub const JAMMY_IMAGE_NAME_VHDX: &str = "jammy-server-cloudimg-arm64-custom-20220329-0.vhdx"; pub const JAMMY_IMAGE_NAME_QCOW2: &str = "jammy-server-cloudimg-arm64-custom-20220329-0.qcow2"; pub const JAMMY_IMAGE_NAME_QCOW2_ZLIB: &str = "jammy-server-cloudimg-arm64-custom-20220329-0-zlib.qcow2";