quickemu icon indicating copy to clipboard operation
quickemu copied to clipboard

feat: quickget should detect or allow specify the host architecture when fetching iso

Open d7an opened this issue 1 year ago • 3 comments

Expected behaviour

I'm on Apple MacBook Pro with Apple Silicon M1 chip. When running 'quickget' to fetch the iso, it doesn't detect the host architecture and attempt the fetch one that works on the host, and appear to favor x86_64/amd64 iso.

Supporting command line argument allowing user to specify the preferred architecture would also be a good option.

Actual behaviour

Seems to favor x86_64/amd architecture.

Steps to reproduce the behaviour

❯ arch   
arm64

❯ quickget --show-iso-url ubuntu 22.04
https://releases.ubuntu.com/22.04/ubuntu-22.04.3-desktop-amd64.iso

Quickemu output

See above.

Linux Distribution & Kernel

❯ uname -a
Darwin mbp-2021.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64

d7an avatar Jan 31 '24 06:01 d7an

There has been talk about architecture support for a while. I don't have capable ARM64 hardware, so someone else will have to do the work on quickemu. I've created a PR with ARM64 support in quickget for certain operating systems, but it'll have to wait until quickemu supports other architectures. #917

lj3954 avatar Feb 04 '24 02:02 lj3954

Since qemu can emulate various architectures selecting the image should not be based solely on the current machines architecture. While that may be an appropriate default user should be able to select any supported architecture to get then have quickemu generate correct emulation environment for it.

dabrown645 avatar Feb 08 '24 18:02 dabrown645

Since qemu can emulate various architectures selecting the image should not be based solely on the current machines architecture. While that may be an appropriate default user should be able to select any supported architecture to get then have quickemu generate correct emulation environment for it.

This was specifically part of my draft PR, although the way the original quickget creates a subshell to access the ISO URL caused it to be nearly impossible for the function to directly relay that. Instead, I had to check for strings like 'aarch64' in the filename, which is obviously not as reliable. Still, it leaves an "arch" value in the config file, but only if it's not amd64 (which in my eyes should undoubtedly remain as a default for quickemu).

lj3954 avatar Feb 09 '24 02:02 lj3954