5 ms·
> "Xen is a type 1 hypervisor that runs on bare metal, and KVM is type 2 that runs as processes in a host OS." Is it not the other way around, that KVM runs on
by cbhl 9y ago
> "Xen is a type 1 hypervisor that runs on bare metal, and KVM is type 2 that runs as processes in a host OS."
Is it not the other way around, that KVM runs on bare metal (and needs processor support) while Xen runs as processes (and needs special kernel binaries)?
- detaro 9y agoNo, it's not. It's true that KVM needs processor support: it kind of adds a special process type that the kernel runs in an virtualized environment, through the hardware virtualization features. The linux kernel of the host schedules the execution of the VMs. Xen has a small hypervisor running on bare metal. It can run both unmodified guests using hardware support or modified guests where hardware access is replaced with direct calls into the hypervisor (paravirtualization). The small hypervisor schedules the execution of the VMs. For access to devices it cooperates with a special virtual machine (dom0), which has full access to the hardware, runs the drivers and multiplexes access for the other VMs - the hypervisor is really primarily scheduling and passing data between domains, very micro-kernel like. Dom0 needs kernel features to fulfill that role.
- cbhl 9y agoToday I learned something. Thanks!
- liuw 9y agoNo. See the Classification section. https://en.m.wikipedia.org/wiki/Hypervisor https://en.m.wikipedia.org/wiki/Hypervisor
- brendangregg 9y agoI updated this because, as someone pointed out, type 2 is no longer a good description of KVM. It uses kernel modules that access devices directly, so it's not strictly type 2 where it all runs as a process. Maybe I should just stop using the "types".
- cthalupa 9y agoThe type definitions have basically always been misused anyway. It's a shoehorning of formal proofs from the 70s onto modern concepts, and it doesn't really work. Though, really, I'm just quoting Anthony Liguori from 6 years ago, so credit where it's due: https://news.ycombinator.com/item?id=2614975 https://news.ycombinator.com/item?id=2614975