--- wikisrc/ports/xen/howto.mdwn 2018/07/26 11:44:17 1.152 +++ wikisrc/ports/xen/howto.mdwn 2018/07/26 12:21:24 1.153 @@ -260,10 +260,8 @@ to DIAGNOSTIC and DEBUG in NetBSD. xen- useful with a serial console. Then, place a NetBSD XEN3_DOM0 kernel in /, copied from releasedir/amd64/binary/kernel/netbsd-XEN3_DOM0.gz of a NetBSD build. If using i386, use -releasedir/i386/binary/kernel/netbsd-XEN3PAE_DOM0.gz. (If using Xen -3.1 and i386, you may use XEN3_DOM0 with the non-PAE Xen. But you -should not use Xen 3.1.) Both xen and the NetBSD kernel may be (and -typically are) left compressed. +releasedir/i386/binary/kernel/netbsd-XEN3PAE_DOM0.gz. Both xen and +the NetBSD kernel may be (and typically are) left compressed. In a dom0, kernfs is mandatory for xend to communicate with the kernel, so ensure that /kern is in fstab. (A standard NetBSD install @@ -316,9 +314,6 @@ sure /netbsd is ok). Consider also a li of Xen and the dom0 kernel, but note that non-Xen NetBSD can be used to resolve Xen booting issues. -Probably you want a default=N line to choose Xen in the absence of -intervention. - Now, reboot so that you are running a DOM0 kernel under Xen, rather than GENERIC without Xen. @@ -339,8 +334,6 @@ described above.) Configuring Xen --------------- -Xen logs will be in /var/log/xen. - Now, you have a system that will boot Xen and the dom0 kernel, but not do anything else special. Make sure that you have rebooted into Xen. There will be no domUs, and none can be started because you still have @@ -366,13 +359,17 @@ After you have configured the daemons an order given) or rebooted, use xm or xl to inspect Xen's boot messages, available resources, and running domains. An example with xl follows: - # xl dmesg - [xen's boot info] - # xl info - [available memory, etc.] - # xl list - Name Id Mem(MB) CPU State Time(s) Console - Domain-0 0 64 0 r---- 58.1 +[[!template id=programlisting text=""" +# xl dmesg +... xen's boot info ... +# xl info +... available memory, etc ... +# xl list +Name Id Mem(MB) CPU State Time(s) Console +Domain-0 0 64 0 r---- 58.1 +"""]] + +Xen logs will be in /var/log/xen. ### Issues with xencommons @@ -391,7 +388,9 @@ this will get fixed any time soon. The installation of NetBSD should already have created devices for xen (xencons, xenevt, xsd_kva), but if they are not present, create them: - cd /dev && sh MAKEDEV xen +[[!template id=programlisting text=""" +cd /dev && sh MAKEDEV xen +"""]] anita (for testing NetBSD) -------------------------- @@ -400,7 +399,9 @@ With the setup so far (assuming 4.2/xl), anita (see pkgsrc/misc/py-anita) to test NetBSD releases, by doing (as root, because anita must create a domU): - anita --vmm=xl test file:///usr/obj/i386/ +[[!template id=programlisting text=""" +anita --vmm=xl test file:///usr/obj/i386/ +"""]] Alternatively, one can use --vmm=xm to use xm-based domU creation instead (and must, on Xen <= 4.1). TODO: confirm that anita xl really works. @@ -489,46 +490,6 @@ Specifically, for 4.x remove autorestart are specified with numbers as the second argument, as the examples above show, and not NetBSD device names. -Hardware known to work ----------------------- - -Arguably, this section is misplaced, and there should be a page of -hardware that runs NetBSD/amd64 well, with the mostly-well-founded -assumption that NetBSD/xen runs fine on any modern hardware that -NetBSD/amd64 runs well on. Until then, we give motherboard/CPU (and -sometimes RAM) pairs/triples to aid those choosing a motherboard. -Note that Xen systems usually do not run X, so a listing here does not -imply that X works at all. - - Supermicro X9SRL-F, Xeon E5-1650 v2, 96 GiB ECC - Supermicro ??, Atom C2758 (8 core), 32 GiB ECC - ASUS M5A78L-M/USB3 AM3+ microATX, AMD Piledriver X8 4000MHz, 16 GiB ECC - -Older hardware: - - Intel D915GEV, Pentium4 CPU 3.40GHz, 4GB 533MHz Synchronous DDR2 - INTEL DG33FB, "Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz" - INTEL DG33FB, "Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz" - -Running Xen under qemu ----------------------- - -The astute reader will note that this section is somewhat twisted. -However, it can be useful to run Xen under qemu either because the -version of NetBSD as a dom0 does not run on the hardware in use, or to -generate automated test cases involving Xen. - -In 2015-01, the following combination was reported to mostly work: - - host OS: NetBSD/amd64 6.1.4 - qemu: 2.2.0 from pkgsrc - Xen kernel: xenkernel42-4.2.5nb1 from pkgsrc - dom0 kernel: NetBSD/amd64 6.1.5 - Xen tools: xentools42-4.2.5 from pkgsrc - -See [PR 47720](https://gnats.netbsd.org/47720) for a problem with dom0 -shutdown. - Unprivileged domains (domU) ===========================