Description
Description
When installing lima via brew, qemu is not installed.
limactl start
works with vz and create the root disk without qemu-img, but creating a vm with additional disks will fail when creating the disk:
% limactl disk create mydisk --size 10g
INFO[0000] Creating qcow2 disk "mydisk" with size 10GiB
FATA[0000] failed to create qcow2 disk in "/Users/nsoffer/.lima/_disks/mydisk": failed to run [qemu-img create -f qcow2 /Users/nsoffer/.lima/_disks/mydisk/datadisk 10737418240]: "": exec: "qemu-img": executable file not found in $PATH
This failure could be avoided if we remove the unneeded dependency on qemu-img (#2853), but we still depend on qemu-img to create qcow2 disks. We also depend on qemu for the limactl snapshot command.
If we have a dependency we should depend on the package we depend on for best user experience.
If we want to introduce a soft dependency, that we can work with or without, we need to change the code so qcow2 format and qemu vmType are available only if qemu-img is available. The online help can recommend installing additional packages.
Possible fixes:
- require qemu in lima brew package
- change the code to make qemu-img optional
- make default disk format "raw"
- support qcow2 disks only if qemu-img is available
- support snapshots for qemu vms only if qemu is installed
- fail validation or warn of vmType: qemu if qemu is not installed
Related issues: