swift doesn't find Virtualisation framework

I am trying to play with the sample code that you provided to run the fedora distribution. However, when I compiled it with swift terminal, I get the following error.

error: 'VZVirtualMachineConfiguration' is only available in macOS 11.0 or newer

How can I instruct swift to fetch the proper framework?

PS: I am running all from my terminal, I am not an IDE user

I presume you are looking at the one titled Running Linux in a Virtual Machine, but there are other samples for the Virtualization framework, in case you're looking at one of the others.

For the above sample, I successfully compiled it by first opening the project in Xcode 16.2 to set my development team for code signing purposes. Then on the command line, I compiled it (still with Xcode 16.2) this way:

% cd /Path/To/RunningLinuxInAVirtualMachine
% xcodebuild 

How do your compile commands or Xcode versions differ?

— Ed Ford,  DTS Engineer

swift doesn't find Virtualisation framework
 
 
Q