编写虚拟机管理程序?
我正在研究一个博士项目的想法。
我的想法之一是编写一个虚拟机管理程序(或裸机)(?),这样我就可以在不使用真正的主机操作系统的情况下运行多个操作系统。示例我获得了启动操作系统的某种类型选项的菜单,查看已运行的操作系统中正在发生的情况的“控制台”。重新启动操作系统,安装新操作系统,等等。
所以没有主机操作系统,只是一个控制一切的小应用程序。
从概念上讲,人们如何考虑这样做?
我有一台MacBook。我应该能够修改 EFI 启动的内容。也许从一个非常小的 Linux Live 实现开始,然后将其扩展得非常非常早?
是否有可能使用达尔文并将其扩展到很早以前?
I am researching ideas for a PhD project.
One of my thoughts is writing a hypervisor (or bare metal) (?) so I could run multiple OS's without use of a true host operating system. Example I get a menu of some type of options to start operating systems, view what the 'console' of what is going on in an OS that is already running. Reboot OS's, install a new one, etc.
So no host OS, just a small app that controls everything.
Conceptually how does one think about doing this?
I have a MacBook. I should be able to modify what the EFI boots. Maybe start with a very minimal Linux LIve implementation and scale it really, really far back?
Is it possible to use Darwin and scale it very far back?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您所说的想法并不是对科学的原创贡献。
我的建议是回顾一下 Xen 和一般虚拟机管理程序文献,这些文献可以追溯到 20 世纪 60 年代和 20 世纪 60 年代。
70年代IBM发明它的时候。
我确信那里有改进的空间和原创的想法。
在实际编写虚拟机管理程序方面,您应该首先查看维基百科,因为它对虚拟化提供了很好的简介。
以下是历史摘要,包括一些重要的引用:http://www.kernelthread.com/publications/virtualization /。请注意,第一个引用来自 1959 年!
Your idea as stated is not an original contribution to the science.
My advice is to review Xen and the general hypervisor literature, dating back to the '60s &
'70s when IBM invented it.
I'm certain there is room for improvement and original ideas there.
In terms of actually writing a hypervisor, you should review Wikipedia first, as it gives a good brief on virtualization.
Here is a historical summary, including some seminal citations: http://www.kernelthread.com/publications/virtualization/. Note the first citation is from 1959!
缩减现有桌面/服务器操作系统似乎是一个糟糕的选择。 OTOH,与其重做所有事情,不如从嵌入式 RTOS(例如 ecos 或 L4)开始从中提取一些功能,这可能会很有用。此外,一些代码可能会从 QEMU 中重复使用。
如果我这样做,我会专注于使用 VT-x 和 AMD-V 的硬件虚拟化,忽略动态重新编译(除非是您工作的重点)。
另外,在我看来,最好已经能够编写足够的操作系统来制作一些小型测试操作系统,这些操作系统可以在裸硬件上启动以用于测试正在开发的虚拟机管理程序。
顺便说一句,如果缩减现有操作系统是一个好的策略,我认为它在 Linux 或主要 BSD 之一上效果最好。使用达尔文可能会带来痛苦。
Scaling back an existing desktop/server OS seems like a poor choice. OTOH, rather than redo everything, it may be useful to start with an embedded RTOS such as ecos or L4 to draw some features from. Additionally, some code could possibly be re-used from QEMU.
If I were doing it, I would focus on hardware virtualization using VT-x and AMD-V ignore dynamic recompilation (unless was to be the focus of your work).
Also, it seems to me that it would be a good idea to already be able to write operating systems enough to make some small test operating systems that can boot on bare hardware to use for testing the hypervisor under development.
BTW, if scaling back an existing OS was a good strategy, I think it would work best on Linux or one of the major BSDs. Using Darwin is likely asking for pain.
缩减现有操作系统来开发虚拟机管理程序似乎不太可能。
一定要看看现有的一些开源虚拟机管理程序项目。
如果您有兴趣了解它们的工作原理以及如何进行写作
然后你可以尝试:
Virtual Machines by Smith &梅尔。
Chisnall 的《Xen Hypervisor 权威指南》。
如果您打算从头开始编写它,并且您的目标是 x86 系列处理器,那么您将不得不亲自使用虚拟化指令(例如 Intel VT-x)。这将使用纯汇编语言,或者最多是内联汇编。你在这里谈论的是真正低级的东西。
Scaling back an existing OS to develop a hypervisor seems an unlikely approach.
Definitely have a look at some of the existing open source hypervisor project out there.
If you are interesting in reading about how they work and how you might approach writing
one then you could try:
Virtual Machines by Smith & Mair.
The Definitive Guide to the Xen Hypervisor by Chisnall.
If you are going to write it from scratch, and you are targeting the x86 family of processors then you are going to have to get your hands dirty with virtualization instructions (eg. Intel VT-x). And this will be with pure assembly language, or at best inline assembly. You are talking real low level stuff here.
如果您对计算机通信和虚拟机管理程序感兴趣,那么跨操作系统通信怎么样[它比尝试通过普通 TCP/IP 套接字进行连接要便宜。
If you are interested in computer communication and hypervisiors what about cross OS communication [it would be cheaper than trying to connect via normal TCP/IP sockets.
ESX 本质上是一个缩减版的 Linux 安装 - 添加了许多其他优点:所以您的基本前提是不错的。
然而,对于一个博士项目来说,这听起来太宽泛了:你应该专注于更小的事情。
ESX is essentially a scaled-back Linux install - with a host of other goodies added: so your basic premise is decent.
However, for a PhD project, it sounds too broad: you should focus on something smaller.