Diff for /wikisrc/ports/xen/howto.mdwn between versions 1.182 and 1.186

version 1.182, 2020/11/15 14:47:55 version 1.186, 2020/11/15 15:09:31
Line 15  website](http://www.xenproject.org/). Line 15  website](http://www.xenproject.org/).
   
 [[!toc]]  [[!toc]]
   
 # Overview: Versions of Xen, Styles, NetBSD  # Overview
   
 The basic concept of Xen is that the hypervisor (xenkernel) runs on  The basic concept of Xen is that the hypervisor (xenkernel) runs on
 the hardware, and runs a privileged domain ("dom0") that can access  the hardware, and runs a privileged domain ("dom0") that can access
Line 27  xen itself).  It also addresses how to r Line 27  xen itself).  It also addresses how to r
 and how to deal with having a domU in a Xen environment run by someone  and how to deal with having a domU in a Xen environment run by someone
 else and/or not running NetBSD.  else and/or not running NetBSD.
   
   There are many choices one can make; the HOWTO recommends the standard
   approach and limits discussion of alternatives in many cases.
   
 ## Guest Styles  ## Guest Styles
   
 Xen supports different styles of guests.  Xen supports different styles of guests.
Line 60  is required.  Thus, a dom0 can be PVHv2. Line 63  is required.  Thus, a dom0 can be PVHv2.
 The source code uses PVH and config files use pvh; this refers to PVHv2.  The source code uses PVH and config files use pvh; this refers to PVHv2.
 See [PVH(v2)](https://wiki.xenproject.org/wiki/PVH_(v2\)_Domu).  See [PVH(v2)](https://wiki.xenproject.org/wiki/PVH_(v2\)_Domu).
   
   
 At system boot, the dom0 kernel is loaded as a module with Xen as the kernel.  At system boot, the dom0 kernel is loaded as a module with Xen as the kernel.
 The dom0 can start one or more domUs.  (Booting is explained in detail  The dom0 can start one or more domUs.  (Booting is explained in detail
 in the dom0 section.)  in the dom0 section.)
Line 86  matching versions. Line 88  matching versions.
 Versions available in pkgsrc:  Versions available in pkgsrc:
   
 [[!table data="""  [[!table data="""
 Xen Version     |Package Name   |Xen CPU Support        |xm?    |EOL'ed By Upstream  Xen Version     |Package Name   |Xen CPU Support        |EOL'ed By Upstream
 4.11            |xenkernel411   |x86_64                 |       |No  4.11            |xenkernel411   |x86_64                 |No
 4.13            |xenkernel413   |x86_64                 |       |No  4.13            |xenkernel413   |x86_64                 |No
 """]]  """]]
   
 See also the [Xen Security Advisory page](http://xenbits.xen.org/xsa/).  See also the [Xen Security Advisory page](http://xenbits.xen.org/xsa/).
   
 Multiprocessor (SMP) support in NetBSD differs depending on the domain:  Older Xen had a python-based management tool called xm, now replaced
   by xl.
   
 [[!table data="""  ## NetBSD versions
 Domain          |Supports SMP  
 dom0            |No  Xen has been supported in NetBSD for a long time, at least since 2005.
 domU            |Yes  Initially Xen was PV only.
 """]]  
   NetBSD 8 and up support PV and HVM modes.
   
   Support for PVHVM and PVH is available only in NetBSD-current.
   
   NetBSD as a dom0 does not run SMP, because some drivers are not yet
   safe for this.  \todo Link to more information about what needs work.
   
   NetBSD, when run as a domU, can and does typically run SMP.
   
 Note: NetBSD support is called XEN3.  However, it does support Xen 4,  Note: NetBSD support is called XEN3.  However, it does support Xen 4,
 because the hypercall interface has remained identical.  because the hypercall interface has remained identical.
   
 Older Xen had a python-based management tool called xm, now replaced  
 by xl.  
   
 # Creating a dom0  # Creating a dom0
   
 In order to install a NetBSD as a dom0, one must first install a normal  In order to install a NetBSD as a dom0, one must first install a normal
Line 121  In 2018-05, trouble booting a dom0 was r Line 129  In 2018-05, trouble booting a dom0 was r
   
 [Install NetBSD/amd64](/guide/inst/)  [Install NetBSD/amd64](/guide/inst/)
 just as you would if you were not using Xen.  just as you would if you were not using Xen.
   Therefore, use the most recent release, or a build from the most recent stable branch.
   
 ## Installation of Xen  ## Installation of Xen
   
 We will consider that you chose to use Xen 4.13, with NetBSD/amd64 as  Use the most recent version of Xen in pkgsrc, unless the DESCR says that it ss not suitable.
 dom0. In the dom0, install xenkernel48 and xentools48 from pkgsrc.  Therefore, choose 4.13.
   In the dom0, install xenkernel413 and xentools413 from pkgsrc.
   
 Once this is done, install the Xen kernel itself:  Once this is done, copy the Xen kernel from where pkgsrc puts it to
   where the boot process will be able to find it:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
 # cp /usr/pkg/xen48-kernel/xen.gz /  # cp -p /usr/pkg/xen413-kernel/xen.gz /
 """]]  """]]
   
 Then, place a NetBSD XEN3_DOM0 kernel in the `/` directory. Such kernel  Then, place a NetBSD XEN3_DOM0 kernel in the `/` directory. Such kernel
Line 138  can either be compiled manually, or down Line 149  can either be compiled manually, or down
 example at:  example at:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
 ftp.netbsd.org/pub/NetBSD/NetBSD-8.0/amd64/binary/kernel/netbsd-XEN3_DOM0.gz  ftp.netbsd.org/pub/NetBSD/NetBSD-9.1/amd64/binary/kernel/netbsd-XEN3_DOM0.gz
 """]]  """]]
   
 Add a line to /boot.cfg to boot Xen:  Add a line to /boot.cfg to boot Xen:
Line 168  more) and to pin that vcpu to a physical Line 179  more) and to pin that vcpu to a physical
 and other than dom0 memory and max_vcpus, they are generally not  and other than dom0 memory and max_vcpus, they are generally not
 necessary.  necessary.
   
 Copy the boot scripts into `/etc/rc.d`:  Ensure that the boot scripts installed in
   `/usr/pkg/share/examples/rc.d` are in `/etc/rc.d`, either because you
 [[!template id=programlisting text="""  have `PKG_RCD_SCRIPTS=yes`, or manually.  (This is not special to Xen,
 # cp /usr/pkg/share/examples/rc.d/xen* /etc/rc.d/  but a normal part of pkgsrc usage.)
 """]]  
   
 Enable `xencommons`:  Set `xencommons=YES` in rc.conf:
   
 [[!template id=filecontent name="/etc/rc.conf" text="""  [[!template id=filecontent name="/etc/rc.conf" text="""
 xencommons=YES  xencommons=YES
Line 506  It is also desirable to add Line 516  It is also desirable to add
         powerd=YES          powerd=YES
   
 in rc.conf. This way, the domain will be properly shut down if  in rc.conf. This way, the domain will be properly shut down if
 `xm shutdown -R` or `xm shutdown -H` is used on the dom0.  `xl shutdown -R` or `xl shutdown -H` is used on the dom0.
   \todo Check the translation to xl.
   
 It is not strictly necessary to have a kernel (as /netbsd) in the domU  It is not strictly necessary to have a kernel (as /netbsd) in the domU
 file system.  However, various programs (e.g. netstat) will use that  file system.  However, various programs (e.g. netstat) will use that

Removed from v.1.182  
changed lines
  Added in v.1.186


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb