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

Colima should notify user that vmtype=VZ and arch=x86_64 options should not be used together #1151

Open
maneesh29s opened this issue Oct 3, 2024 Discussed in #1150 · 1 comment

Comments

@maneesh29s
Copy link

maneesh29s commented Oct 3, 2024

Discussed in #1150

Lima does not allow x86_64 aarchitecture on VZ engine.

-> % limactl start --arch x86_64 --vm-type vz
FATA[0001] the YAML is invalid, saved the buffer as "lima.REJECTED.yaml": field `arch` must be "aarch64" for VZ; got "x86_64"

But when colima is started with --arch=x86_64 --vm-type=vz options, it does not issue any warning or error. Instead it silently falls back to using qemu engine on x86_64 architecture.
The qemu-x86_64 is extremely slow as it does not use Rosetta on mac.

To improve user experience, colima should either

  1. Issue a warning that since lima doesn't allow --arch=x86_64 --vm-type=vz combination, it is falling back qemu-x86_64
  2. Throw an error saying --arch=x86_64 --vm-type=vz options should not be used together, and do not start the VM.
@maneesh29s
Copy link
Author

maneesh29s commented Oct 3, 2024

If colima does not allow to start the VM with --arch=x86_64 --vm-type=vz, then that will immediately solve another issue also discussed in #1150:
The colima status prints "running using macOS Virtualization.Framework" even though it is clearly using qemu-x86_64.

This is because in colima's Config.DriverLabel function, the condition only checks if the VMtype is VZ. VMType is set to VZ as it is passed from the command line option --vm-type vz. But as mentioned before colima falls back to qemu engine when --arch x86_64 is also passed as option.
So the condition in Config.DriverLabel also needs to check if architecture is not x86_64.
Instead, I feel its better to just avoid this whole extra effort.

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

No branches or pull requests

1 participant