开源软件名称(OpenSource Name):evansm7/vftool开源软件地址(OpenSource Url):https://github.com/evansm7/vftool开源编程语言(OpenSource Language):Objective-C 97.3%开源软件介绍(OpenSource Introduction):Virtualization.framework tool (vftool)Here lies a really minimalist and very noddy command-line wrapper to run VMs in the macOS Big Sur Virtualization.framework. Vftool runs Linux virtual machines with virtio block, network, entropy and console devices. All of the hard work and actual virtualisation is performed by Virtualization.framework -- this wrapper simply sets up configuration objects, describing the VM. It's intended to be the simplest possible invocation of this framework, whilst allowing configuration for:
Tested on an M1-based Mac (running arm64/AArch64 VMs), but should work on Intel Macs too (to run x86 VMs). Requires macOS >= 11. This is not a GUI-based app, and this configuration is provided on the command-line. Note also that Virtualization.framework does not currently provide public interfaces for framebuffers/video consoles/GUI, so the resulting VM will have a (text) console and networking only. Consider using VNC into your VM, which is quite usable. BuildingIn XcodeIt should be one click, though you may have to set up your (free) developer ID/AppleID developer Team in the "Signing & Capabilities" tab of the project configuration. Or, from the commandlineInstall the commandline tools (or Xcode proper) and run This results in RunningThe following command-line arguments are supported:
Only the The Multiple disc images can be attached by using several The kernel should be uncompressed. The initrd may be a gz. Disc images are raw/flat files (nothing fancy like qcow2). When starting vftool, you will see output similar to:
vftool is now waiting for a connection to the VM's console -- in this example, it's created
Note this provides an accurate terminal to your guest, as far as Terminal/screen provide. At this point, vftool starts the VM. (Well, vftool validates some items after this point, so if your disc images don't exist then you'll find out now.) Kernels/notesAn example working commandline is:
I've used a plain/defconfig Linux 5.9 build (not gzipped):
Note that Virtualization.framework provides all IO as virtio-pci, including the console (i.e. not a UART). The debian install kernel does not have virtio drivers, unfortunately. I ended up using debootstrap ( Networking and entitlementsThe The bridging requires the binary to have the
This seems to be saying that one requires a paid developer account and to ask nicely to be able to use this OS feature. (Rolls eyes) Fortunately, the "NAT" default works fine for the outgoing direction, and even permits incoming connections -- it appears to be kernel-level NAT from a bridged interface instead of the user-level TCP/IP stuff as used in QEMU. I end up with a host-side IssuesFolks have reported problems (I believe with the pty setup) when running in tmux. References
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论