-
Notifications
You must be signed in to change notification settings - Fork 469
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
The latest CLOUDHV_EFI.fd can not start aarch64 VM #5202
Comments
Ping @jongwu, could you take a look? |
Hi @peng6662001 -, I build the latest edk2 and it works well. Can you give the uefi boot log here? |
As the docs direct you build the release version of edk2, you should rebuild it to "DEBUG" version to print the log. Use the followling cmdline instead of the last line in the doc.
|
Hi @peng6662001 -, I see serval grub files installed in your disk. Can you remove them and reinstall grub then try again? |
Hi @jongwu ,I have only one grub file now,but the build always fails,I can't fix it. |
Hi @jongwu ,I can still build success when I follow scripts/common-aarch64.sh |
Hi @peng6662001 -, can you build the latest edk2 now? Once done, you can run clh again. Make sure your guest image just has one grub under /boot/efi/ as I saw lots of grub files in your rlog:
|
@jongwu Do you know how to fix the build error in blog_0217.txt: |
Hi @peng6662001 -, It's a bug of the latest edk2. I will fix it. For now, try the following patch: `diff --git a/ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf b/ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf [LibraryClasses] |
@jongwu Please check new log
|
Hi @peng6662001 -, I encounter a similar issue when start ubuntu:22.04 based on clh/qemu:
...
If this is also your case, here is a workaround in edk2: `diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c +return EFI_SUCCESS;^M |
It maybe a bug for ubuntu shim. I try to rebuild ubuntu shim and replace "/boot/efi/EFI/BOOT/BOOTAA64.EFI" to fix it locally. |
@jongwu I built CLOUDHV_EFI.fd with the latest code,the vm worked well with focal-server-cloudimg-arm64-custom-20210929-0.raw,but it can't run with jammy-server-cloudimg-arm64-custom-20220329-0.raw,could you please take a look? |
Can you try the edk2 patch above? |
@jongwu I can't find ArmSetMemoryRegionNoExec in ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |
Hi @peng6662001 -, I think this issue is no related with Cloud Hypervisor or edk2. There is a same issue for Qemu. I think this bug derives from UEFI shim. I can find a workaround in edk2 but it's meaningless. I raise an issue in shim. Hope to get some feedback there. |
Looks like this issue wasn't related to CH in the end. |
Describe the bug
I reference docs/uefi.md to build cloudhv_efi.fd,then the VM starts fail
I reference scripts/common-aarch64.sh to rebuild cloudhv_efi.fd and run the VM with the same command,the VM can work.
VM configuration
./cloud-hypervisor --kernel CLOUDHV_EFI.fd --disk path=../focal-server-cloudimg-arm64.raw --disk path=/tmp/ubuntu-cloudinit.img --cmdline 'root=/dev/vda1 console=ttyS0 console=hvc0 rw' --cpus boot=1 --mem
ory size=2G --serial tty --console off -v
Logs
Linux kernel output:
log_fail.txt
log_good.txt
The text was updated successfully, but these errors were encountered: