Skip to content
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

hypervisor-fw doesn't work with RO root disk #209

Closed
liuw opened this issue Nov 14, 2022 · 2 comments · Fixed by #210
Closed

hypervisor-fw doesn't work with RO root disk #209

liuw opened this issue Nov 14, 2022 · 2 comments · Fixed by #210

Comments

@liuw
Copy link
Member

liuw commented Nov 14, 2022

When using a readonly root disk with hypervisor-fw. I get the following.

./target/release/cloud-hypervisor  --cpus boot=4 --memory size=2G --kernel ../hypervisor-fw --cmdline "root=/dev/vda1 console=hvc0 console=ttyS0 rw systemd.journald.forward_to_console=1 " --disk path=../focal-server-cloudimg-amd64.raw,readonly=true  --console tty
cloud-hypervisor: 16.17385915s: <_disk0_q0> ERROR:virtio-devices/src/block.rs:221 -- Request failed: Os { code: 9, kind: Uncategorized, message: "Bad file descriptor" }
cloud-hypervisor: 16.173971948s: <_disk0_q0> ERROR:virtio-devices/src/thread_helper.rs:55 -- Error running worker: HandleEvent(Failed to process queue (complete): AsyncRequestFailure)

It looks like hypervisor-fw is trying to write to the disk somehow?

Not sure how much we care about this use case.

@rbradford
Copy link
Member

@liuw FYI --cmdline has no affect when using hypervisor-fw,

rbradford added a commit to rbradford/rust-hypervisor-firmware that referenced this issue Nov 14, 2022
TEST=Boot cloud-hypervisor with read-only block device and observe that
writes generate errors in the EFI/boot loader code but the OS continues
to boot.

Fixes: cloud-hypervisor#209

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
rbradford added a commit to rbradford/rust-hypervisor-firmware that referenced this issue Nov 14, 2022
TEST=Boot cloud-hypervisor with read-only block device and observe that
writes generate errors in the EFI/boot loader code but the OS continues
to boot.

Fixes: cloud-hypervisor#209

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
@liuw
Copy link
Member Author

liuw commented Nov 14, 2022

@liuw FYI --cmdline has no affect when using hypervisor-fw,

I know. I was just modifying one of my existing runes to do a quick test.

retrage pushed a commit that referenced this issue Nov 15, 2022
TEST=Boot cloud-hypervisor with read-only block device and observe that
writes generate errors in the EFI/boot loader code but the OS continues
to boot.

Fixes: #209

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants