-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Symptom
/dev/vdb (the 10 GB container disk) does not exist inside the VM even though the kernel sees both disks in /proc/partitions. Container.Init fails to mount the container disk, so apt-get install and other container writes land on the tiny 256 MB guest rootfs (/dev/vda) instead.
Root Cause
The guest init process (boxlite-guest) mounts tmpfs on /tmp, /var/tmp, and /run via mount_essential_tmpfs() in guest/src/mounts.rs, but never mounts devtmpfs at /dev. Without devtmpfs, the kernel has no mechanism to auto-populate block device nodes — /dev/vda exists only because the rootfs image has it baked in, but /dev/vdb has no pre-existing node.
Impact
- Container disk is never mounted.
BlockDeviceMount::mount()inguest/src/storage/block_device.rscorrectly checksdevice.exists()and returnsStorage("Block device not found: /dev/vdb"). - Container writes go to guest rootfs. The 256 MB vda fills up quickly, causing
apt-getand similar tools to fail with ENOSPC. - Affects all boxes that use a separate container disk (which is the default configuration).
Fix
Mount devtmpfs at /dev early in guest startup (before the gRPC server starts). The kernel will then auto-populate all block device nodes discovered via virtio-blk.
mount(Some("devtmpfs"), "/dev", Some("devtmpfs"), MS_NOSUID, Some("mode=0755"))This should run before the existing tmpfs mounts and before GuestServer::run().