Skip to content

Commit d70adaf

Browse files
authored
fix(vm-driver): fixes BYOC sandbox creation failing with ext4-fs write access unavailable (#2150)
1 parent 5402551 commit d70adaf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

crates/openshell-driver-vm/scripts/openshell-vm-sandbox-init.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ setup_overlay_root() {
247247
if [ "${OPENSHELL_VM_INIT_MODE:-sandbox}" = "image-prep" ]; then
248248
prepare_guest_image_rootfs
249249
sync
250+
if ! umount /overlay; then
251+
ts "FATAL: failed to unmount /overlay cleanly after image-prep; refusing to produce a dirty image-cache disk"
252+
exit 1
253+
fi
250254
ts "image-prep complete"
251255
exit 0
252256
fi
@@ -256,7 +260,7 @@ setup_overlay_root() {
256260

257261
local lower_root="/lower"
258262
if [ -b /dev/vdc ]; then
259-
mount -t ext4 -o ro /dev/vdc /image-cache
263+
mount -t ext4 -o ro,noload /dev/vdc /image-cache
260264
if [ -d /image-cache/image-rootfs ]; then
261265
lower_root="/image-cache/image-rootfs"
262266
ts "using prepared image rootfs lowerdir"

0 commit comments

Comments
 (0)