TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Vmctl/Vmcli – Easily Run Linux VMs on M1 Macs

198 点作者 gyf304超过 4 年前

10 条评论

gyf304超过 4 年前
I recently got myself a M1 Mac and I want to run Linux on it. By reading the docker M1 tech preview release (<a href="https:&#x2F;&#x2F;www.docker.com&#x2F;blog&#x2F;download-and-try-the-tech-preview-of-docker-desktop-for-m1&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.docker.com&#x2F;blog&#x2F;download-and-try-the-tech-previe...</a>), I was made aware of the existence of Virtualization.framework on recent macOS releases.<p>Virtualization.framework provides 99% of the building blocks for running a Linux VM on a Mac, but there’s no off-the-shelf CLI for running a VM.<p>Inspired by <a href="https:&#x2F;&#x2F;github.com&#x2F;evansm7&#x2F;vftool" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;evansm7&#x2F;vftool</a>, I wrote another CLI (vmcli) with some more features (better termios handling &#x2F; escape sequence detection) in Swift, and build a script (vmctl) to daemon-ize vmcli and help manage VMs. I also made a script for provisioning a Ubuntu VM, so you can run a Ubuntu VM from scratch in minutes.
评论 #25787896 未加载
评论 #25787664 未加载
评论 #25788943 未加载
评论 #25786912 未加载
boris超过 4 年前
Here is a previous discussion of a similar tool that also lists some of the limitations (like inability to use bridged networking without Apple&#x27;s permission) of using Virtualization.framework: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25382529" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25382529</a><p>I am personally more interested in tools that are based on Hypervisor.framework (which as I understand offers lower-level support for virtualization). Anyone knows what is the current state of Qemu support for M1 (last time I heard there were some out-of-tree patches)?
评论 #25788246 未加载
ulzeraj超过 4 年前
This is cool. Definitely going to test it. Years ago I’ve looked into something like this but found only find xhyve which looked a bit crude.<p>Ended using Parallels Desktop Lite which to my understanding is a GUI to VF. Used to be free for Linux VMs then they’ve changed to yearly subscriptions. And they charge premium for a year of their glorified virt-manager.<p>To make things worse their 1 year subscription is blocking me from changing countries on app store. I hate that company to guts now.
评论 #25787792 未加载
e12e超过 4 年前
So looking at: <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;virtualization" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;virtualization</a> I see that the host supports virtio for providing devices - but this is a hypervisor, not an emulator? You can&#x27;t run amd64 VMs on m1 and vice-versa? Is there a &quot;standard&quot; 64bit arm target that means pre-built VMs are available? It should also be possible to run windows arm VMs?
评论 #25790220 未加载
prime31超过 4 年前
For those looking for a UI and full desktop environment UTM has full support for the M1 now: <a href="https:&#x2F;&#x2F;github.com&#x2F;utmapp&#x2F;UTM" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;utmapp&#x2F;UTM</a>
6a74超过 4 年前
Wow. This is fantastic. I had no idea Virtualization.framework was a thing. I&#x27;ve installed and tested vmctl&#x2F;vmcli out on my M1 MacBook Air. Your instructions worked like a charm.<p>Edit: I don&#x27;t see the option to list running VMs though. I was hoping to check that powering off the VM worked. The inability to ping the VM tells me it is off, but if I didn&#x27;t have the IP, I don&#x27;t know how I would check this.
评论 #25788102 未加载
stephenr超过 4 年前
I wonder how practical it would be to implement a vagrant provider on top of this.<p>Has anyone tried running this on an intel Mac?
GEBBL超过 4 年前
Thank you so much. I bit the bullet and bought an M1 Mac but I’ve been really missing a Linux VM for hackthebox etc and was having to route through a Dropbox droplet. This should solve my issue
amedvednikov超过 4 年前
Amazing, thank you! Looks much cleaner than virtualbox. I assume the performance is much better as well.<p>Any way to build it without installing xcode, just with xcode command line tools?
proyb2超过 4 年前
A quick benchmark, Vmctl has fare slight lower&#x2F;better latencies than Parallels.