Skip to content

Commit 9ae1141

Browse files
committed
chore(rootfs): update rootfs to Ubuntu 24.04
Update guest rootfs to Ubuntu 24.04 Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 47f78fa commit 9ae1141

20 files changed

+89
-89
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ We test all combinations of:
132132

133133
| Instance | Host OS & Kernel | Guest Rootfs | Guest Kernel |
134134
| :-------- | :---------------- | :----------- | :----------- |
135-
| c5n.metal | al2 linux_5.10 | ubuntu 22.04 | linux_5.10 |
135+
| c5n.metal | al2 linux_5.10 | ubuntu 24.04 | linux_5.10 |
136136
| m5n.metal | al2023 linux_6.1 | | linux_6.1 |
137137
| m6i.metal | | | |
138138
| m6a.metal | | | |

docs/getting-started.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can check if your system meets the requirements by running
99
`firecracker/tools/devtool checkenv`.
1010

1111
An opinionated way to run Firecracker is to launch an
12-
[EC2](https://aws.amazon.com/ec2/) `c5.metal` instance with Ubuntu 22.04.
12+
[EC2](https://aws.amazon.com/ec2/) `c5.metal` instance with Ubuntu 24.04.
1313

1414
Firecracker requires [the KVM Linux kernel module](https://www.linux-kvm.org/)
1515
to perform its virtualization and emulation tasks.
@@ -95,7 +95,7 @@ For simplicity, this guide will not use the [`jailer`](../src/jailer/).
9595

9696
To successfully start a microVM, you will need an uncompressed Linux kernel
9797
binary, and an ext4 file system image (to use as rootfs). This guide uses a 5.10
98-
kernel image with a Ubuntu 22.04 rootfs from our CI:
98+
kernel image with a Ubuntu 24.04 rootfs from our CI:
9999

100100
```bash
101101
ARCH="$(uname -m)"
@@ -106,13 +106,13 @@ latest=$(wget "http://spec.ccfc.min.s3.amazonaws.com/?prefix=firecracker-ci/v1.1
106106
wget "https://s3.amazonaws.com/spec.ccfc.min/${latest}"
107107

108108
# Download a rootfs
109-
wget "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-22.04.ext4"
109+
wget "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-24.04.ext4"
110110

111111
# Download the ssh key for the rootfs
112-
wget "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-22.04.id_rsa"
112+
wget "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-24.04.id_rsa"
113113

114114
# Set user read permission on the ssh key
115-
chmod 400 ./ubuntu-22.04.id_rsa
115+
chmod 400 ./ubuntu-24.04.id_rsa
116116
```
117117

118118
### Getting a Firecracker Binary
@@ -238,7 +238,7 @@ sudo curl -X PUT --unix-socket "${API_SOCKET}" \
238238
}" \
239239
"http://localhost/boot-source"
240240

241-
ROOTFS="./ubuntu-22.04.ext4"
241+
ROOTFS="./ubuntu-24.04.ext4"
242242

243243
# Set rootfs
244244
sudo curl -X PUT --unix-socket "${API_SOCKET}" \
@@ -280,13 +280,13 @@ sudo curl -X PUT --unix-socket "${API_SOCKET}" \
280280
sleep 2s
281281

282282
# Setup internet access in the guest
283-
ssh -i ./ubuntu-22.04.id_rsa [email protected] "ip route add default via 172.16.0.1 dev eth0"
283+
ssh -i ./ubuntu-24.04.id_rsa [email protected] "ip route add default via 172.16.0.1 dev eth0"
284284

285285
# Setup DNS resolution in the guest
286-
ssh -i ./ubuntu-22.04.id_rsa [email protected] "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
286+
ssh -i ./ubuntu-24.04.id_rsa [email protected] "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
287287

288288
# SSH into the microVM
289-
ssh -i ./ubuntu-22.04.id_rsa [email protected]
289+
ssh -i ./ubuntu-24.04.id_rsa [email protected]
290290

291291
# Use `root` for both the login and password.
292292
# Run `reboot` to exit.

resources/rebuild.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function build_rootfs {
4848

4949
cp -rvf overlay/* $rootfs
5050

51-
# curl -O https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64-root.tar.xz
51+
# curl -O https://cloud-images.ubuntu.com/minimal/releases/noble/release/ubuntu-24.04-minimal-cloudimg-amd64-root.tar.xz
5252
#
5353
# TBD use systemd-nspawn instead of Docker
5454
# sudo tar xaf ubuntu-22.04-minimal-cloudimg-amd64-root.tar.xz -C $rootfs
@@ -206,7 +206,7 @@ function prepare_and_build_rootfs {
206206
compile_and_install $BIN/devmemread.c $BIN/devmemread
207207
fi
208208

209-
build_rootfs ubuntu-22.04 jammy
209+
build_rootfs ubuntu-24.04 noble
210210
build_initramfs
211211
}
212212

tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ that are pre-initialized with specific guest kernels and rootfs:
298298
299299
- `uvm_plain_any` is parametrized by the guest kernels
300300
[supported](../docs/kernel-policy.md) by Firecracker and a read-only Ubuntu
301-
22.04 squashfs as rootfs,
301+
24.04 squashfs as rootfs,
302302
- `uvm_plain` yields a Firecracker process pre-initialized with a 5.10 kernel
303-
and the same Ubuntu 22.04 squashfs.
303+
and the same Ubuntu 24.04 squashfs.
304304
305305
Generally, tests should use the former if you are testing some interaction
306306
between the guest and Firecracker, while the latter should be used if

tests/conftest.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -395,26 +395,26 @@ def rootfs_fxt(request, record_property):
395395

396396
# Fixtures for all Ubuntu rootfs, and specific versions
397397
rootfs = pytest.fixture(rootfs_fxt, params=rootfs_params("*.squashfs"))
398-
rootfs_ubuntu_22 = pytest.fixture(
399-
rootfs_fxt, params=rootfs_params("ubuntu-22*.squashfs")
398+
rootfs_ubuntu_24 = pytest.fixture(
399+
rootfs_fxt, params=rootfs_params("ubuntu-24*.squashfs")
400400
)
401401
rootfs_rw = pytest.fixture(rootfs_fxt, params=rootfs_params("*.ext4"))
402402

403403

404404
@pytest.fixture
405-
def uvm_plain(microvm_factory, guest_kernel_linux_5_10, rootfs_ubuntu_22):
405+
def uvm_plain(microvm_factory, guest_kernel_linux_5_10, rootfs_ubuntu_24):
406406
"""Create a vanilla VM, non-parametrized
407407
kernel: 5.10
408-
rootfs: Ubuntu 22.04
408+
rootfs: Ubuntu 24.04
409409
"""
410-
return microvm_factory.build(guest_kernel_linux_5_10, rootfs_ubuntu_22)
410+
return microvm_factory.build(guest_kernel_linux_5_10, rootfs_ubuntu_24)
411411

412412

413413
@pytest.fixture
414414
def uvm_plain_rw(microvm_factory, guest_kernel_linux_5_10, rootfs_rw):
415415
"""Create a vanilla VM, non-parametrized
416416
kernel: 5.10
417-
rootfs: Ubuntu 22.04
417+
rootfs: Ubuntu 24.04
418418
"""
419419
return microvm_factory.build(guest_kernel_linux_5_10, rootfs_rw)
420420

@@ -436,12 +436,12 @@ def artifact_dir():
436436

437437

438438
@pytest.fixture
439-
def uvm_plain_any(microvm_factory, guest_kernel, rootfs_ubuntu_22):
439+
def uvm_plain_any(microvm_factory, guest_kernel, rootfs_ubuntu_24):
440440
"""All guest kernels
441441
kernel: all
442-
rootfs: Ubuntu 22.04
442+
rootfs: Ubuntu 24.04
443443
"""
444-
return microvm_factory.build(guest_kernel, rootfs_ubuntu_22)
444+
return microvm_factory.build(guest_kernel, rootfs_ubuntu_24)
445445

446446

447447
guest_kernel_6_1_debug = pytest.fixture(

tests/framework/utils_drive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ class VhostUserBlkBackendType(Enum):
2323
CROSVM = "Crosvm"
2424

2525

26-
def partuuid_and_disk_path(rootfs_ubuntu_22, disk_path):
26+
def partuuid_and_disk_path(rootfs, disk_path):
2727
"""
2828
We create a new file with specified path, get its partuuid and use it as a rootfs.
2929
"""
30-
initial_size = rootfs_ubuntu_22.stat().st_size + 50 * MB
30+
initial_size = rootfs.stat().st_size + 50 * MB
3131
disk_path.touch()
3232
os.truncate(disk_path, initial_size)
3333
check_output(f"echo type=83 | sfdisk --no-tell-kernel {str(disk_path)}", shell=True)
3434
check_output(
35-
f"dd bs=1M seek=1 if={str(rootfs_ubuntu_22)} of={disk_path}", shell=True
35+
f"dd bs=1M seek=1 if={str(rootfs)} of={disk_path}", shell=True
3636
)
3737
ptuuid = check_output(
3838
f"blkid -s PTUUID -o value {disk_path}", shell=True, encoding="ascii"

tests/integration_tests/functional/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ def _drive_patch(test_microvm):
895895
"is_root_device": True,
896896
"cache_type": "Unsafe",
897897
"is_read_only": True,
898-
"path_on_host": "/ubuntu-22.04.squashfs",
898+
"path_on_host": "/" + test_microvm.rootfs_file.name,
899899
"rate_limiter": None,
900900
"io_engine": "Sync",
901901
"socket": None,
@@ -1226,7 +1226,7 @@ def test_get_full_config(uvm_plain):
12261226
"is_root_device": True,
12271227
"cache_type": "Unsafe",
12281228
"is_read_only": True,
1229-
"path_on_host": "/ubuntu-22.04.squashfs",
1229+
"path_on_host": "/" + test_microvm.rootfs_file.name,
12301230
"rate_limiter": None,
12311231
"io_engine": "Sync",
12321232
"socket": None,

tests/integration_tests/functional/test_cpu_features.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def msr_cpu_template_fxt(request):
272272
@pytest.mark.timeout(900)
273273
@pytest.mark.nonci
274274
def test_cpu_rdmsr(
275-
microvm_factory, msr_cpu_template, guest_kernel, rootfs_ubuntu_22, results_dir
275+
microvm_factory, msr_cpu_template, guest_kernel, rootfs_ubuntu_24, results_dir
276276
):
277277
"""
278278
Test MSRs that are available to the guest.
@@ -307,7 +307,7 @@ def test_cpu_rdmsr(
307307
"""
308308

309309
vcpus, guest_mem_mib = 1, 1024
310-
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
310+
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_24, monitor_memory=False)
311311
vm.spawn()
312312
vm.add_net_iface()
313313
vm.basic_config(
@@ -377,7 +377,7 @@ def dump_msr_state_to_file(dump_fname, ssh_conn, shared_names):
377377
@pytest.mark.timeout(900)
378378
@pytest.mark.nonci
379379
def test_cpu_wrmsr_snapshot(
380-
microvm_factory, guest_kernel, rootfs_ubuntu_22, msr_cpu_template
380+
microvm_factory, guest_kernel, rootfs_ubuntu_24, msr_cpu_template
381381
):
382382
"""
383383
This is the first part of the test verifying
@@ -398,7 +398,7 @@ def test_cpu_wrmsr_snapshot(
398398
shared_names = SNAPSHOT_RESTORE_SHARED_NAMES
399399

400400
vcpus, guest_mem_mib = 1, 1024
401-
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
401+
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_24, monitor_memory=False)
402402
vm.spawn()
403403
vm.add_net_iface()
404404
vm.basic_config(
@@ -534,7 +534,7 @@ def dump_cpuid_to_file(dump_fname, ssh_conn):
534534
@pytest.mark.timeout(900)
535535
@pytest.mark.nonci
536536
def test_cpu_cpuid_snapshot(
537-
microvm_factory, guest_kernel, rootfs_ubuntu_22, msr_cpu_template
537+
microvm_factory, guest_kernel, rootfs_ubuntu_24, msr_cpu_template
538538
):
539539
"""
540540
This is the first part of the test verifying
@@ -551,7 +551,7 @@ def test_cpu_cpuid_snapshot(
551551

552552
vm = microvm_factory.build(
553553
kernel=guest_kernel,
554-
rootfs=rootfs_ubuntu_22,
554+
rootfs=rootfs_ubuntu_24,
555555
)
556556
vm.spawn()
557557
vm.add_net_iface()
@@ -927,9 +927,9 @@ def check_enabled_features(test_microvm, cpu_template):
927927
"enhanced REP MOVSB/STOSB": "true",
928928
"SMAP: supervisor mode access prevention": "true",
929929
# xsave_0xd_0
930-
"XCR0 supported: x87 state": "true",
931-
"XCR0 supported: SSE state": "true",
932-
"XCR0 supported: AVX state": "true",
930+
"x87 state": "true",
931+
"SSE state": "true",
932+
"AVX state": "true",
933933
# xsave_0xd_1
934934
"XSAVEOPT instruction": "true",
935935
# extended_080000001_edx

tests/integration_tests/functional/test_cpu_features_aarch64.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ def get_cpu_template_dir(cpu_template):
6767
PLATFORM != "aarch64",
6868
reason="This is aarch64 specific test.",
6969
)
70-
def test_default_cpu_features(microvm_factory, guest_kernel, rootfs_ubuntu_22):
70+
def test_default_cpu_features(microvm_factory, guest_kernel, rootfs_ubuntu_24):
7171
"""
7272
Check the CPU features for a microvm with the specified config.
7373
"""
7474

75-
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
75+
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_24, monitor_memory=False)
7676
vm.spawn()
7777
vm.basic_config()
7878
vm.add_net_iface()
@@ -86,13 +86,13 @@ def test_default_cpu_features(microvm_factory, guest_kernel, rootfs_ubuntu_22):
8686
reason="This is aarch64 specific test.",
8787
)
8888
def test_cpu_features_with_static_template(
89-
microvm_factory, guest_kernel, rootfs_ubuntu_22, cpu_template
89+
microvm_factory, guest_kernel, rootfs_ubuntu_24, cpu_template
9090
):
9191
"""
9292
Check the CPU features for a microvm with the specified config.
9393
"""
9494

95-
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
95+
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_24, monitor_memory=False)
9696
vm.spawn()
9797
vm.basic_config(cpu_template=cpu_template)
9898
vm.add_net_iface()
@@ -114,13 +114,13 @@ def test_cpu_features_with_static_template(
114114
reason="This is aarch64 specific test.",
115115
)
116116
def test_cpu_features_with_custom_template(
117-
microvm_factory, guest_kernel, rootfs_ubuntu_22, custom_cpu_template
117+
microvm_factory, guest_kernel, rootfs_ubuntu_24, custom_cpu_template
118118
):
119119
"""
120120
Check the CPU features for a microvm with the specified config.
121121
"""
122122

123-
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
123+
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_24, monitor_memory=False)
124124
vm.spawn()
125125
vm.basic_config()
126126
vm.api.cpu_config.put(**custom_cpu_template["template"])

0 commit comments

Comments
 (0)