You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device problem occurs on - arm64 QEMU Virtual Machine
Software versions of OpenWrt/LEDE release, packages, etc. - 19.07.3
Steps to reproduce -
Boot OpenWRT as per the instructions at [[https://openwrt.org/docs/guide-user/virtualization/qemu|OpenWRT QEMU Documentation]] on an arm64 virtual machine.
When hosted in a QEMU virtual machine on arm64 (aarch64), OpenWRT is unable to shut down.
QEMU supports two shutdown methods on arm64, ACPI and QEMU Guest Agent
ACPI on arm64 requires UEFI support, which is not enabled in the armvirt-64 kernel.
QEMU Guest Agent has a package for OpenWRT but the package is broken due to the base implementation of OpenWRT.
QEMU Guest Agent forks a process that calls /sbin/shutdown with several flags when ordered to shut down.
/sbin/shutdown does not exist in the base system.
The flags passed are not compatible with /sbin/poweroff.
This is solved with a simple script:
/sbin/shutdown: #!/bin/sh
/sbin/poweroff
Ideally support for armvirt-64 should move to uefi, since that is the expected supported method of booting a arm64 virtual machine.
This would require the addition of CONFIG_EFI_STUB to the armvirt-64 kernel config.
It would also require changing the armvirt-64 packaging to include the kernel efi image in the root file system, and/or add a bootloader such as grub.
The text was updated successfully, but these errors were encountered:
Cleaned up the script and fixed all variations of the shutdown command.
#!/bin/sh
/bin/echo $4 > /dev/console
if [ $2 == "-P" ]
then
echo "Shutting down with poweroff" > /dev/console
/sbin/poweroff
elif [ $2 == "-r" ]
then
echo "Shutting down with reboot" > /dev/console
/sbin/reboot
elif [ $2 == "-H" ]
then
echo "Shutting down with halt" > /dev/console
/sbin/halt
fi
pgwipeout:
Supply the following if possible:
Boot OpenWRT as per the instructions at [[https://openwrt.org/docs/guide-user/virtualization/qemu|OpenWRT QEMU Documentation]] on an arm64 virtual machine.
When hosted in a QEMU virtual machine on arm64 (aarch64), OpenWRT is unable to shut down.
QEMU supports two shutdown methods on arm64, ACPI and QEMU Guest Agent
ACPI on arm64 requires UEFI support, which is not enabled in the armvirt-64 kernel.
QEMU Guest Agent has a package for OpenWRT but the package is broken due to the base implementation of OpenWRT.
QEMU Guest Agent forks a process that calls /sbin/shutdown with several flags when ordered to shut down.
/sbin/shutdown does not exist in the base system.
The flags passed are not compatible with /sbin/poweroff.
This is solved with a simple script:
/sbin/shutdown:
#!/bin/sh
/sbin/poweroff
Ideally support for armvirt-64 should move to uefi, since that is the expected supported method of booting a arm64 virtual machine.
This would require the addition of CONFIG_EFI_STUB to the armvirt-64 kernel config.
It would also require changing the armvirt-64 packaging to include the kernel efi image in the root file system, and/or add a bootloader such as grub.
The text was updated successfully, but these errors were encountered: