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

Failed to start cloud-hypervisor when using hypervisor_fw on aarch64 #5987

Open
peng6662001 opened this issue Nov 27, 2023 · 4 comments
Open
Labels
AArch64 Affects AArch64 only

Comments

@peng6662001
Copy link
Contributor

peng6662001 commented Nov 27, 2023

Describe the bug
I cloned the latest code of rust-hypervisor-firmware and built it.
But the hypervisor_fw was not able to start the VM.

To Reproduce
Built rust-hypervisor-firmware with:

cargo build --release --target aarch64-unknown-none.json -Zbuild-std=core,alloc -Zbuild-std-features=compiler-builtins-mem

Version

Output of cloud-hypervisor --version:

cloud-hypervisor --version
cloud-hypervisor v36.0-48-gaf06adfd

VM configuration

What command line did you run (or JSON config data):

cloud-hypervisor --cpus boot=4 --memory size=1G,shared=on --disk path=/root/workloads/focal-server-cloudimg-arm64-custom-20210929-0.raw path=/home/dom/images/cloudinit --kernel /root/workloads/hypervisor-fw --api-socket /tmp/ch0

Guest OS version details:
focal-server-cloudimg-arm64-custom-20210929-0.raw

Host OS version details:
Ubuntu 22.04.3 LTS

Logs

Output of cloud-hypervisor -v from either standard error or via --log-file:

cloud-hypervisor: 33.612070s: <vcpu0> DEBUG:virtio-devices/src/transport/pci_common_config.rs:170 -- read_common_config_word: offset 0x1e
cloud-hypervisor: 33.612144s: <vcpu0> DEBUG:virtio-devices/src/transport/pci_common_config.rs:170 -- read_common_config_word: offset 0x1e
cloud-hypervisor: 33.612652s: <vcpu0> DEBUG:virtio-devices/src/transport/pci_common_config.rs:170 -- read_common_config_word: offset 0x1e
PANIC: panicked at src/efi/mod.rs:947:13:
Failed to extract path

Full log:hypervisor-fw_log.zip

The zip contains vlog_CLOUDHVEFI for compare with error log.

@likebreath likebreath added the AArch64 Affects AArch64 only label Nov 27, 2023
@jongwu
Copy link
Contributor

jongwu commented Dec 6, 2023

Hello @peng6662001 , thanks for raising this.

This issue is not releated with CH but RHF.
I‘ve encountered this issue as well. I think this derives from The Grub inside your ubuntu 20.04 image loads kernel in a memory mapped device by efi load_image protocol. However, RHF has no ability to handle this device. To resolve this, we need add memory mapped device driver inside RHF. Maybe later.

You can try the latest ubuntu 20.04 image that works well with RHF.

@peng6662001
Copy link
Contributor Author

Hello @peng6662001 , thanks for raising this.

This issue is not releated with CH but RHF. I‘ve encountered this issue as well. I think this derives from The Grub inside your ubuntu 20.04 image loads kernel in a memory mapped device by efi load_image protocol. However, RHF has no ability to handle this device. To resolve this, we need add memory mapped device driver inside RHF. Maybe later.

You can try the latest ubuntu 20.04 image that works well with RHF.

I will try it.

@peng6662001
Copy link
Contributor Author

peng6662001 commented Dec 6, 2023

@jongwu Could you please provide the address of the latest ubuntu 20.04 image?I downloaded img from https://cloud-images.ubuntu.com/focal/current/, it can't be used in cloud-hypervisor.

@peng6662001
Copy link
Contributor Author

I use latest cloud-hypervisor,hypervisor_fw and focal-server-cloudimg-arm64.img,but the vm still won't start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AArch64 Affects AArch64 only
Projects
None yet
Development

No branches or pull requests

3 participants