Ask HN:为什么虚拟化技术还未臻完善?

3作者: prmph5 个月前
现在是 20205 年,即使对于普通用户来说,虚拟化仍然是个令人头疼的问题。 我用 MacBook Air M1 作为我的开发笔记本,我只是想拥有一个可复现的 Debian 开发环境。 我的选择:使用 devcontainer,或者在 Virtualbox、VMWare、Parallels、UTM 等上使用虚拟机。 VSCode 和 Typescript 偶尔会出问题,导致它们无法正常工作,我根本无法继续使用它们。不确定原因,但我想它们内部存在一些奇怪的错误,这些错误会在我的机器上出现某些特殊情况组合时浮现出来。使用 devcontainer 我认为 VSCode 仍然直接在我的机器上运行,但连接到容器,所以这对我来说不是一个解决方案,我需要一个真正的虚拟机。 所以,我首先尝试了 VirtualBox。花了好几个小时在虚拟机上安装 Debian 并让它运行良好后,很快虚拟机就变得慢得像蜗牛一样。我做的任何事情都无法可靠地解决这个问题。我也无法让显示分辨率正常工作。我再次放弃了 VirtualBox(我每隔几年就会尝试一次,忘记了我不使用 VirtualBox 的原因)。 接下来,我想尝试 VMWare,却发现它被卖给了 Broadcom,当我点击他们的页面链接时,我需要登录才能下载,但我找不到注册的方法。好吧。 接下来,我尝试了 Parallels。在上面运行 Debian 虚拟机后,我惊叹于它的流畅程度。我正在试用,但如果一切顺利,我不会有问题付费。唉,这太好了,不真实。我开始在虚拟机中随机失去互联网连接(奇怪的是只影响终端)。我看到默认的网络模式是共享网络。我在网上阅读了指南,建议切换到桥接网络。在虚拟机上花费大量时间设置防火墙和其他安全配置并切换到桥接网络后,我仍然遇到间歇性的连接问题。似乎现在情况更糟了。突然,我再次想起了为什么这么多年来我没有 Parallels 订阅。 沮丧之下,我终于放弃了。我痛苦地记得 UTM 也和 VirtualBox 一样存在类似的性能和屏幕显示问题。 那么还剩下什么选择呢?我真的无法在我的 Macbook 上物理安装双启动 Linux(尽管有 Asahi,因为我只想要 Debian)。也许我可以注册一个云 VPS 并使用它。或者直接购买新的 AMD mini PC 并在上面运行 Debian。无论哪种方式,很明显,在经过数十年的技术进步之后,虚拟化的故事仍然是一个令人沮丧的故事。
查看原文
It&#x27;s 20205, and virtualization is still a headache, even for casual use.<p>I use a MacBook Air M1 as my dev laptop, and I just wanted to have a reproducible dev environment running Debian.<p>My options: use devcontainer, or use a VM on Virtualbox, VMWare, Parallels, UTM, etc.<p>VSCode &amp; Typescript gets messed up every now and then, such that they don&#x27;t work and I simply can&#x27;t continue with them. Not sure why, but I think there are weird internal bugs in those that surface whenever there is some special combination of circumstances on my machine. With devcontainer I think VSCode still runs directly on my machine but connects to the container, so this is nto a solution for me, I need a real VM.<p>So I try VirtualBox first. After spending hours installing Debian on a VM and getting it running nicely, within a short time the VM slows to a crawl. Nothing I do reliably fixes this. I also cannto get the display resolution to behave properly. I give up on VirtualBox, again (I keep trying this every few years forgetting why I don&#x27;t use VirtualBox)<p>Next, I want to try VMWare, only to find out it is sold to Broadcom, and when I follow the link to their page, I&#x27;m supposed to log in to download, and yet I see no way to register. Oh well.<p>Next, I try Parallels. After getting a Debian VM running on it, I marbvel at how smoothly it works. I&#x27;m in the trial, but I&#x27;m not going to have a problem paying up if everything goes on well. Alas, it was too good to be true. I start to to have random loss of internet connectivity (weirdly affecting the terminal only) in the VM. I see that the default networking mode is shared networking. I read guides online suggesting to switch to bridged networking. After spending oodles of time setting up the firewall and other security configuration on the VM and switching to bridged networking, I&#x27;m still having intermittent connectivity issues. it seems they are even worse now. Suddenly I remember again why I don&#x27;t have a Parallels subscription after all these years.<p>Frustrated, I finally give up. I ruefully remember that UTM also has similar performance and screen display problems as VirtualBox.<p>So what options are left? I can&#x27;t really physically install a dual-boot Linux on my Macbook (Asahi notwithstanding, since I only want Debian). Maybe I could sign up for a cloud VPS and use that. Or just buy new AMD mini PCs and run Debian on those. Either way, it&#x27;s clear the virtualization story, after decades of supposed tech advancement, is still a bitter one.