1 ## The DragonFly virtual kernels
5 ***Obtained from [vkernel(7)](http://leaf.dragonflybsd.org/cgi/web-man?command#vkernel§ion7) written by Sascha Wildner, added by Matthias Schmidt***
8 The motivation for writing the vkernel was finding an elegant
9 solution to one immediate and one long term issue in pursuing the project’s main goal of Single System
10 Image clustering over the Internet. First, as any person who is familiar with distributed algorithms will
11 attest, implementing cache coherency without hardware support is a complex task. It would not be made
12 any easier by enduring a 2-3 minute delay in the edit-compile-run cycle while each machine goes
13 through the boot sequence. As a nice side effect, userspace programming errors are unlikely to bring the
14 machine down and one has the benefit of working with superior debugging tools (and can more easily
17 The second, long term, issue that virtual kernels are intended to address is finding a way to securely
18 (which is the top priority) and efficiently dedicate system resources to a cluster that operates over the
19 (hostile) Internet. Because a kernel is a more or less standalone environment, it should be possible to
20 completely isolate the process a virtual kernel runs in from the rest of the system.
22 The vkernel architecture allows for running DragonFly kernels in userland.
28 A number of virtual device drivers exist to supplement the virtual kernel.
34 The vkd driver allows for up to 16 [vn(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#vn§ion4) based disk devices. The root device will be `vkd0`.
38 The vcd driver allows for up to 16 virtual CD-ROM devices. Basically this is a read only `vkd` device with a block size of 2048.
40 #### Network interface
42 The vke driver supports up to 16 virtual network interfaces which are
44 associated with [tap(4)](http://leaf.dragonflybsd.org/cgi/web-man?command#tap§ion4) devices on the host. For each `vke` device, the per-interface read only [sysctl(3)](http://leaf.dragonflybsd.org/cgi/web-man?command=sysctl§ion=3) variable `hw.vkeX.tap_unit` holds the unit number of the associated [tap(4)](http://leaf.dragonflybsd.org/cgi/web-man?command=tap§ion=4) device.