Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vfkit: Don't try to use virtiofs it's unsupported
virtiofs file sharing is only available in macOS 12 and newer. This commit makes use of sw_vers to return a proper error when running on too old macOS versions. This also skips vfkit shared directory configuration so that we can start the VM anyway. For all of this to work, vfkit has to be built on a macOS 11 builder, the file sharing APIs will still be available when this binary is run on macOS 12. Building vfkit on macOS 12 and trying to run the resulting binary on macOS 11 will badly fail though: ``` DEBU Running '/Users/teuf/.crc/bin/vfkit -v' DEBU Command failed: signal: abort trap DEBU stdout: DEBU stderr: dyld: Symbol not found: _OBJC_CLASS_$_VZMultipleDirectoryShare Referenced from: /Users/teuf/.crc/bin/vfkit (which was built for Mac OS X 12.0) Expected in: /System/Library/Frameworks/Virtualization.framework/Versions/A/Virtualization in /Users/teuf/.crc/bin/vfkit DEBU failed to run executable /Users/teuf/.crc/bin/vfkit: signal: abort trap ```
- Loading branch information