TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

KVM host in a few lines of code

158 pointsby stargraveabout 5 years ago

4 comments

st_goliathabout 5 years ago
&gt; However, no one forces you to use KVM directly. There is libvirt, a nice friendly wrapper for low-level virtualization techniques such as KVM or BHyve.<p>No, that&#x27;s not what libvirt does. libvirt abstracts handling of tools like Qemu, or LXC. No lowlevel stuff.<p>When people talk about libvirt, they usually mean the libvirt daemon that manages VMs or containers using other programs and accepts XML machine descriptions as input.<p>The actual &quot;libvirt&quot; library is simply a front end library for talking to the daemon and is used internally by tools like virsh (CLI) or virtman (GUI tool).<p>Some ~7 years ago I used the libvirt library for a small in-house tool. It has the possibly shittiest API ever designed. No abstraction whatsoever, just a couple C functions that accept XML strings as input and possibly return XML responses from the daemon.
评论 #23248718 未加载
评论 #23249813 未加载
评论 #23248981 未加载
评论 #23247916 未加载
评论 #23250102 未加载
zokierabout 5 years ago
There is also this LWN article which covers much of the same ground: <a href="https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;658511&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;658511&#x2F;</a><p>I do like here that the author here went beyond minimal hello world and also showed how to boot linux
评论 #23249736 未加载
AshamedCaptainabout 5 years ago
It would be trivial for VirtualBox to use KVM instead of shipping an (out of tree) kernel module that uses the vmx instructions directly. I don&#x27;t understand what exactly is blocking VirtualBox from doing that. They already use HyperV in Windows instead of abusing vmx directly.<p>They could still keep their qemu fork and everything so that the driver compatibility is still top-notch, but at least they would not require out of tree kernel modules, and VirtualBox would also be concurrently usable with other KVM users.
评论 #23250917 未加载
matoabout 5 years ago
If you&#x27;re interested in &quot;other things&quot; that can be done with KVM, take a look at the Solo5 &quot;hvt&quot; tender: <a href="https:&#x2F;&#x2F;github.com&#x2F;Solo5&#x2F;solo5&#x2F;tree&#x2F;master&#x2F;tenders&#x2F;hvt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Solo5&#x2F;solo5&#x2F;tree&#x2F;master&#x2F;tenders&#x2F;hvt</a>.