version 1.14, 2014/12/23 23:43:27
|
version 1.15, 2014/12/24 00:04:47
|
Line 41 Prerequisites
|
Line 41 Prerequisites
|
|
|
Installing NetBSD/Xen is not extremely difficult, but it is more |
Installing NetBSD/Xen is not extremely difficult, but it is more |
complex than a normal installation of NetBSD. |
complex than a normal installation of NetBSD. |
|
In general, this HOWTO is occasionally overly restrictive about how |
|
things must be done, guiding the reader to stay on the established |
|
path when there are no known good reasons to stray. |
|
|
This HOWTO presumes a basic familiarity with the Xen system |
This HOWTO presumes a basic familiarity with the Xen system |
architecture. |
architecture. |
Line 50 hardware and installing software from pk
|
Line 53 hardware and installing software from pk
|
|
|
For more details on Xen, see [](http://www.xen.org/). |
For more details on Xen, see [](http://www.xen.org/). |
|
|
Installing Xen with NetBSD as privileged domain (dom0) |
Versions of Xen and NetBSD |
====================================================== |
========================== |
|
|
|
Most of the installation concepts and instructions are independent of |
|
Xen version. This section gives advice on which version to choose. |
|
Versions not in pkgsrc and older unsupported versions of NetBSD are |
|
inentionally ignored. |
|
|
|
Xen |
|
--- |
|
|
|
In NetBSD, xen is provided in pkgsrc, via matching pairs of packages |
|
xenkernel and xentools. We will refer only to the kernel versions, |
|
but note that both packages must be installed together and must have |
|
matching versions. |
|
|
|
xenkernel3 and xenkernel33 provide Xen 3.1 and 3.3. These no longer |
|
receive security patches and should not be used. |
|
|
|
xenkernel41 provides Xen 4.1. This is no longer maintained by Xen, |
|
but as of 2014-12 receives backported security patches. It is a |
|
reasonable although trailing-edge choice. |
|
|
|
xenkernel42 provides Xen 4.2. This is maintained by Xen, but old as |
|
of 2014-12. |
|
|
|
Ideally newer versions of Xen will be added to pkgsrc. |
|
|
|
NetBSD |
|
------ |
|
|
|
The netbsd-5, netbsd-6, netbsd-7, and -current branches are all |
|
reasonable choices, with more or less the same considerations for |
|
non-Xen use. Therefore, netbsd-6 is recommended as the stable version |
|
of the most recent release. |
|
|
|
As of NetBSD 6, a NetBSD domU will support multiple vcpus. There is |
|
no SMP support for NetBSD as dom0. (The dom0 itself doesn't really |
|
need SMP; the lack of support is really a problem when using a dom0 as |
|
a normal computer.) |
|
|
|
Recommendation |
|
-------------- |
|
|
|
Therefore, this HOWTO recommends running xenkernel42 (and xentools42) |
|
and NetBSD 6 stable branch. |
|
|
|
NetBSD as a dom0 |
|
================ |
|
|
|
NetBSD can be used as a dom0 and works very well. The following |
|
sections address installation, updating NetBSD, and updating Xen. |
|
|
|
Styles of dom0 operation |
|
------------------------ |
|
|
|
There are two basic ways to use Xen. The traditional method is for |
|
the dom0 to do absolutely nothing other than providing support to some |
|
number of domUs. Such a system was probably installed for the sole |
|
purpose of hosting domUs, and sits in a server room on a UPS. |
|
|
|
The other way is to put Xen under a normal-usage computer, so that the |
|
dom0 is what the computer would have been without Xen, perhaps a |
|
desktop or laptop. Then, one can run domUs at will. Purists will |
|
deride this as less secure than the previous approach, and for a |
|
computer whose purpose is to run domUs, they are right. But Xen and a |
|
dom0 (without domUs) is not meaingfully less secure than the same |
|
things running without Xen. One can boot Xen or boot regular NetBSD |
|
alternately with little problems, simply refraining from starting the |
|
Xen daemons when not running Xen. |
|
|
|
Note that NetBSD as dom0 does not support multiple CPUs. This will |
|
limit the performance of the Xen/dom0 workstation approach. |
|
|
|
Installation of NetBSD and Xen |
|
------------------------------ |
|
|
Note that it doesn't make sense to talk about installing a dom0 OS |
Note that it doesn't make sense to talk about installing a dom0 OS |
without also installing Xen itself. |
without also installing Xen itself. |
Line 210 Install grub with the following command:
|
Line 287 Install grub with the following command:
|
Done. |
Done. |
|
|
|
|
|
Updating NetBSD in a dom0 |
|
------------------------- |
|
|
|
This is just like updating NetBSD on bare hardware, assuming the new |
|
version supports the version of Xen you are running. Generally, one |
|
replaces the kernel and reboots, and then overlays userland binaries |
|
and adjusts /etc. |
|
|
|
Note that one must update both the non-Xen kernel typically used for |
|
rescue purposes and the DOM0 kernel used with Xen. |
|
|
|
Updating Xen versions |
|
--------------------- |
|
|
|
TODO: write |
|
|
Creating unprivileged domains (domU) |
Creating unprivileged domains (domU) |
==================================== |
==================================== |
|
|
Line 359 working vif-bridge is also provided with
|
Line 452 working vif-bridge is also provided with
|
|
|
#!/bin/sh |
#!/bin/sh |
#============================================================================ |
#============================================================================ |
# $NetBSD: howto.mdwn,v 1.13 2014/12/23 23:40:11 gdt Exp $ |
# $NetBSD: howto.mdwn,v 1.14 2014/12/23 23:43:27 gdt Exp $ |
# |
# |
# /usr/pkg/etc/xen/vif-bridge |
# /usr/pkg/etc/xen/vif-bridge |
# |
# |