-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate long boot wait time in block device test #46
Comments
I have been able to look at this (or actually ended up looking at this in the context of something else!). Here is what happens,
Consequently a number of processes that rely on being able to write to FS fail.
All the services are started properly and hence we quickly get a login shell. The root cause appears to be the read-only mount of the root filesystem. Why that happens with |
I am able to figure out why the root file system is mounted read only. This has got to do with the flag in the header of the $ file bzimage-focal
bzimage-focal: Linux kernel x86 boot executable bzImage, version 5.4.81 (root@gabhijit-Lenovo-IdeaPad-S340-14IWL) #1 SMP Thu Feb 4 14:27:35 IST 2021, RO-rootFS, swap_dev 0x4, Normal VGA The flag comes from the FWIW, I tried to edit this flag using I also tried editing the default kernel command line by giving Which means whenever we are specifying a I can add a fix to the test case by adding the |
@gabhijit Yep, it would be great. Thanks for the thorough investigation! |
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
For @lauralt Related to code you referred above, I believe
Default being |
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
Since the `bzImage` has got a `RO-RootFS` flag set, the RootFS mounted was read-only that resulted in a number of startup services to fail and consequently resulted in longer boot time. Since, we are specifying separate root, mounting it as `rw` by passing kernel commandline flag `rw`, the RootFS is mounted as read-write and then the OS boots normally. Signed-off-by: Abhijit Gadgil <[email protected]>
@gabhijit Makes sense, I'll open some issues for the blk cmd line configuration and other block related things. The api thing, at this point, needs a broader discussion, we were hoping for example to make things more modular at this level and have a clearer separation between the api and the vmm. |
This is fixed inside #64. This can be closed? |
Yeah it can, I left it open as a reminder for the issues above, but we can close it as well. I'll open those issues this week. |
@seanmichwalsh and I encountered this problem when running the VMM for the first time. We fixed this by granting read, write, and execute permissions to all files in the directories containing both. Eg executing |
@tumbleshack : The Host file corresponding to the if disk_path is not None:
# Terrible hack to have a rootfs owned by the user.
with tempfile.NamedTemporaryFile(dir='/tmp', delete=True) as tmpfile:
tmp_file_path = tmpfile.name
cp_cmd = "cp {} {}".format(disk_path, tmp_file_path)
subprocess.run(cp_cmd, shell=True, check=True)
vmm_cmd.append("--block")
vmm_cmd.append("path={}".format(tmp_file_path)) |
Haha, of course, it does make sense that a file system would need to be writable. Thanks for the workaround. |
I had similar problem (I didn't configure the block device to be read-only, but the file system is mounted read only). I simply changed vmm-reference/src/devices/src/virtio/block/mod.rs Lines 92 to 93 in 1226002
to |
This prevents the root fs from being mounted read-only if no flags are given. Related to #46. Plus, rw flag can be removed from start_vmm_process in the test script. Signed-off-by: Seonghyun Park <[email protected]>
Figure out why the
(bzimage-focal, rootfs.ext4)
combination takes too long to boot fortest_reference_vmm_with_disk
intests/test_run_reference_vmm.py
(see comment aboveKERNELS_DISK
global).The text was updated successfully, but these errors were encountered: