nyuuzyou/wikis huggingface dataset:
TMEM

== Enabling Transcendent Memory (tops Linux v5.2) ==
Update: TMEM has been removed. The latest upstream version containing it seems to be 5.2, namely revision 5.2.21.
Tested with Xen version 4.11.0 and Linux dom0 & domU 4.18.16 & 5.2.14.
TMEM enables dynamic memory allocation for the guests, and the shrinking is quite fast. In less that 3 minutes, it goes from 5GB to approx 900MB. And after quite a while, I even goes down to less than 700MB on idling guests. And this takes into account guests' buff/cache that is still allowed to live, which saves lots of disk I/O hence increases performance, a lot.
Among others Linux kernel settings for the domU, provided by default with x86_64_defconfig and xenconfig, you need to enabled those,
CONFIG_XEN_SELFBALLOONING=y
CONFIG_XEN_TMEM=m
Since TMEM refuses to be built-in, but only as a module, you will have to deliver /lib/modules/kernel-ver onto the PV guests anyways. And make sure depmod -a gets executed at some point with the newly running kernel.
Enabling a swap space onto the guest is not mandatory. It works without swap. Also the additional tmem kernel argument at boot time is not required. You just need to load the module once the guest is up and running, either manually,
modprobe tmem
or by enabling it at startup e.g. on Debian/Ubuntu,
echo tmem >> /etc/modules
You should see this from the system logs,
[ 37.471390] xen:tmem: frontswap enabled, RAM provided by Xen Transcendent Memory
[ 37.471410] xen:tmem: cleancache enabled, RAM provided by Xen Transcendent Memory
[ 37.471423] xen_selfballoon: Initializing Xen selfballooning driver
[ 37.471425] xen_selfballoon: Initializing frontswap selfshrinking driver
And magic happens, its xentop MAXMEM(k) starts decreasing, and free -m within the guest also reports decreasing memory.
Note. It seems that for TMEM, only the memory= guest setting matters and that the maxmem= setting actually disables it: it shows static values on xentop output.
This feature has been provided by Dan Magenheimer at Oracle.
Table Style Examples

This page contains examples of our table styles 
= Base Styles = 
== class prettytable ==
Shopping List 	Shopping List	Shopping List	Shopping List	Shopping List	Shopping List
Bread & Butter	Pie 	Buns 	Danish 	Croissant 	Croissant
Bread & Butter	Cheese 	Ice cream 	Ice cream 	Butter 	Yogurt
Fruit 	Price
Pears 	£1.15
Apples 	£0.95
Oranges	£0.85
== class shadedtable ==
Shopping List 	Shopping List	Shopping List	Shopping List	Shopping List	Shopping List
Bread & Butter	Pie 	Buns 	Danish 	Croissant 	Croissant
Bread & Butter	Cheese 	Ice cream 	Ice cream 	Butter 	Yogurt
Fruit 	Price
Pears 	£1.15
Apples 	£0.95
Oranges	£0.85
== class shadedtable2 ==
Shopping List 	Shopping List	Shopping List	Shopping List	Shopping List	Shopping List
Bread & Butter	Pie 	Buns 	Danish 	Croissant 	Croissant
Bread & Butter	Cheese 	Ice cream 	Ice cream 	Butter 	Yogurt
Fruit 	Price
Pears 	£1.15
Apples 	£0.95
Oranges	£0.85
== class wikitable ==
Shopping List 	Shopping List	Shopping List	Shopping List	Shopping List	Shopping List
Bread & Butter	Pie 	Buns 	Danish 	Croissant 	Croissant
Bread & Butter	Cheese 	Ice cream 	Ice cream 	Butter 	Yogurt
Fruit 	Price
Pears 	£1.15
Apples 	£0.95
Oranges	£0.85
== class zebra ==
Shopping List 	Shopping List	Shopping List	Shopping List	Shopping List	Shopping List
Bread & Butter	Pie 	Buns 	Danish 	Croissant 	Croissant
Bread & Butter	Cheese 	Ice cream 	Ice cream 	Butter 	Yogurt
Fruit 	Price
Pears 	£1.15
Apples 	£0.95
Oranges	£0.85
= Modifiers = 
These are table classes that modify an existing table classes behavior. 
== class fullwidth ==
Make a table the size of the page.
{| class="zebra fullwidth"
...
Example:
Fruit 	Price
Apples	£0.95
== class sortable ==
Make a table sortable by clicking on the header.
{| class="prettytable sortable"
...
Note that in order for the icon to be shown, you need to add 
{| class="prettytable sortable"
|-
! Fruit {{Sortable}} !! Price {{Sortable}} 
Example:
Fruit 	Price
Pears 	£1.15
Apples 	£0.95
Oranges	£0.85
Category:Wiki Management
Test page

= Xen as Static Partitioning Hypervisor for Embedded and Automotive =
You might already know that Xen powers some of the largest clouds in production today, but did you know that Xen is also an excellent static partitioning hypervisor for embedded applications?
Xen can be configured for embedded static partitioning using Dom0less and the null scheduler.
Dom0less enables Xen to create multiple VMs in parallel at boot without any Dom0 interactions.
Boot times become much shorter, making it easy to achieve sub-second boot times for an RTOS on top of Xen. Dom0 becomes just optional: it could be removed entirely, or a small RTOS could be used as Dom0 just for monitoring the system. For a quick way to setup Dom0less, refer to ImageBuilder.
The null scheduler is hard real-time scheduler that statically assign physical CPUs to virtual CPUs. With the null scheduler, there are no context switches and you get the best possible interrupt latency. Enabling the null scheduler is as easy as adding sched=null to the Xen command line, which ImageBuilder does automatically for you.
Use Dom0less and the null scheduler together to achieve a true static partitioning configuration.
= Cache Coloring and Deterministic Interrupt Latency =
If you need fully deterministic interrupt latency and hard real-time, a shared L2 cache across CPU cores can be a vehicle for interference. Xen solves the problem by splitting the L2 cache in software using a technology called "Cache Coloring". Xen with Cache Coloring has a deterministic interrupt latency of 4 microseconds on Xilinx Ultrascale+, even under heavy interference from multiple sources.
Checkout the original Cache Coloring presentation for more details.
= Xen Safety-Certifications =
Multiple safety assessors from well-known companies in the safety industry have evaluated Xen and deemed it safety-certifiable.
If you are interested in safety certifications, join the Xen FuSa Special Interest Group or watch one of the latest presentations.
The Xen FuSa SIG has the specific goal of making upstream Xen releases easier to safety certify. The working group is active in a number of areas, from documentation to testing and traceability. Specific examples of Xen FuSa SIG activities are MISRA C compatibility improvements and the introduction of more tests to validate Xen external interfaces.
Testing FreeBSD PVHVM

This guide will explain how to setup a FreeBSD PVHVM for testing purposes. It is assumed that the user has a working Dom0 with the xl toolstack.
===Setting up a FreeBSD HVM===
To speed things, we will use a FreeBSD-HEAD snapshot ISO to install the guest, since the changes are based on FreeBSD-HEAD, this will prevent us from setting a stable version and then doing a full update to HEAD. First grab a FreeBSD-HEAD ISO, they can be found in FreeBSD ftp servers under the path snapshots/ISO-IMAGES/amd64/10.0/ (replace amd64 with i386 if you wish to test 32bit support). Fetch and save one of this ISOs.
Now we need to setup the guest config file, here is an example:
boot="cd"
disk = [
	'phy:/dev/guests/freebsd,hda,w',
	'file:/root/freebsd-10.iso,hdc:cdrom,r',
	]
vif = ['mac=00:AA:BB:CC:DD:EE,bridge=bridge0']
memory=4096
vcpus=7
name = "freebsd"
xen_platform_pci=1
builder='hvm'
vnc=1
vnclisten="0.0.0.0"
serial='pty'
Setting serial='pty' is most critical to make the serial console access work!
Change the disk and vif options to match your paths. 
Once done, the guest can be launched:
# xl create freebsd.cfg
Connect to the guest using a vnc client and follow the installation process. Once finished, we will configure FreeBSD to use the serial console, so we no longer need to use a vnc client. This process is detailed in The FreeBSD Handbook, we have to edit /boot/loader.conf and add the following lines:
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"
This will allow us to get the boot output to the serial console, now we need to setup the seria tty, to do so edit /etc/ttys and search for the line that starts with:
ttyu0 "/usr/libexec/getty std.115200" dialup on secure
Set it to "on" as shown above and change the baudrate. We are done with the setup, on next reboot of the guest you should be able to get the boot output and a terminal using "xl console freebsd".
===Fetching the sources and installing the PVHVM kernel===
In order to test the new code, you will need git to fetch the sources, this can be installed using ports:
# cd /usr/ports/devel/git
# make config-recursive install clean clean-depends
Once git is installed, you can fetch the source:
# git clone git://xenbits.xen.org/people/royger/freebsd.git
# cd freebsd
# git checkout pvhvm_v10
It is recommended to add the option "ALT_BREAK_TO_DEBUGGER" to the XENHVM config file, so you can easily break to KDB from the serial console. We can proceed with the kernel compilation and install now:
# make kernel-toolchain && make buildkernel KERNCONF=XENHVM && make installkernel KERNCONF=XENHVM
Before rebooting into the new XENHVM kernel, you should add the following line to /etc/rc.conf:
# echo ifconfig_xn0="DHCP" >> /etc/rc.conf
With this changes you can now reboot into the FreeBSD PVHVM, happy testing!
Type Config Option

In Xen Project 4.10 we have made significant changes to the user interface. 
Guest types are now selected using the type option in the configuration file, where users can select a pv, pvh or hvm guest. 
The builder option is being deprecated in favour of the type option. The pvh option has been removed in Xen 4.9 (it will still work, but will create a PV guest). 
A set of PVH specific options have been added.
Guest type 	Xen 4.10 or later	Xen 4.9 or before 	
x86 Guests 	x86 Guests 	x86 Guests 	
PV domain 	type="pv" 	builder="generic" 	
HVM domain (includes PVHVM) 	type="hvm" 	builder="hvm" 	
PVH domain 	type="pvh" 	builder="generic" and pvh=1(from 4.4 - 4.8)
In Xen 4.9 pvh=1 is ignored and a PV guest is run	
ARM Guests 	ARM Guests 	ARM Guests 	
N/A (only one Guest Type specific to ARM)	Do not use type 	Do not use builder	
Category:Users
Category:Xen 4.9
Category:Xen 4.10
Ubuntu 10.04 domU

== Installing Ubuntu 10.04 LTS (Lucid Lynx) Xen PV guest using the Ubuntu text installer ==
Ubuntu 10.04 can be installed as Xen PV guest using the default text-based installer included in the Ubuntu distribution.
First create a new LVM volume to store the guest virtual disk:
[root@f13 ~]# lvcreate -nubuntu01 -L20G /dev/vg_f13
 Logical volume "ubuntu01" created
Then download the official Ubuntu Xen guest configuration file:
[root@f13 ubuntu]# wget http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
--2010-09-05 01:53:38-- http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
Resolving fi.archive.ubuntu.com... 130.230.54.102, 2001:708:310:54::102
Connecting to fi.archive.ubuntu.com|130.230.54.102|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7618 (7.4K) [text/plain]
Saving to: â€œxm-debian.cfgâ€
100%[======================================>] 7,618 --.-K/s in 0.008s
2010-09-05 01:53:38 (911 KB/s) - â€œxm-debian.cfgâ€ saved [7618/7618]
And rename it to "ubuntu01.cfg":
[root@f13 ubuntu]# mv xm-debian.cfg ubuntu01.cfg
[root@f13 ubuntu]#
Then edit "ubuntu01.cfg" with your favourite text editor and make it look like this (among other stuff in it):
memory = 1024
name = "ubuntu01"
vcpus = 1
vif = ['mac=00:16:36:64:3d:f3,bridge=virbr0']
disk = ['phy:vg_f13/ubuntu01,xvda,w']
Modify the mac address to be unique.
Then find a line in "ubuntu01.cfg" that says "bootloader=pygrub" and add proper path ("/usr/bin/pygrub") to it:
if not xm_vars.env.get('install'):
 bootloader="/usr/bin/pygrub"
else:
Already modified configuration file is available as a reference from: http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.cfg .
Then start the Ubuntu installer:
xm create -f ubuntu01.cfg -c install=true
install-kernel="http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/vmlinuz"
install-ramdisk="http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/initrd.gz"
install-mirror="http://fi.archive.ubuntu.com/ubuntu"
All of the above command needs to be on a single line. Replace the mirror site URLs with your local mirror.
Ubuntu 10.04 text installer starts:
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.png
Install as usual. Choose DHCP for networking.
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu02.png
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu03.png
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu04.png
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu05.png
When the installation finishes the Ubuntu guest VM will shut down.
After installation you can start the Ubuntu guest like this:
xm create -f ubuntu01.cfg -c
First you'll see the pygrub menu which allows you to choose which Ubuntu kernel to boot, and then you'll get to the normal Xen PV guest text console and see the Ubuntu kernel booting. You can exit from the console by pressing ctrl+] or ctrl+5.
Category:Beginners
Category:Tutorial
Category:Ubuntu
Category:Guest Install
Ubuntu 12.04 Virtual Machine installation on XCP

See: Ubuntu 12.04 VM (32 bit) automated (preseed) installation on XCP
See: Ubuntu 12.04 VM (64 bit) automated (preseed) installation on XCP
See: Ubuntu 12.04 VM (64 bit) automated (kickstart) installation on XCP
Category:XCP
Category:Users
Category:Beginners
Category:HowTo
Category:Guest Install
Category:RefToExternalArticle
Category:Ubuntu
Ubuntu Q-series Xen Spec

Category:Xen
Category:Ubuntu
Category:Specifications
=Summary=
We would like to improve the user experience for Xen and an Ubuntu dom0. The format of this sprint will be a brainstorming session, with final ideas ranked and owners assigned.
=Rationale=
=User stories=
=Assumptions=
None at the moment.
=Design=
=Implementation=
=Test/Demo Plan=
=Unresolved issues=
=BoF agenda and discussion=
=Release Note=
TBD
Ubuntu R-series Xen Spec

Category:Xen
Category:Ubuntu
Category:Specifications
=Summary=
We would like to improve the user experience for Xen and an Ubuntu dom0. The format of this sprint will be a brainstorming session, with final ideas ranked and owners assigned.
=Rationale=
=User stories=
=Assumptions=
None at the moment.
=Design=
=Implementation=
=Test/Demo Plan=
=Unresolved issues=
=BoF agenda and discussion=
=Release Note=
TBD
Ubuntu Xen Install Option Spec

Category:Xen
Category:Ubuntu
Category:Specifications
=Summary=
This is a placeholder. Full spec coming soon!
=Rationale=
=User stories=
=Assumptions=
None at the moment.
=Design=
=Implementation=
=Test/Demo Plan=
=Unresolved issues=
=BoF agenda and discussion=
=Release Note=
TBD
Unikraft

Unikernels are famous for providing excellent performance in terms of boot times, throughput and memory consumption, to name a few metrics. However, they are infamous for making it hard and extremely time consuming to extract such performance, and for needing significant engineering effort in order to port applications to them. 
Unikraft is a novel micro-library OS that (1) fully modularizes OS primitives so that it is easy to customize the unikernel and include only relevant components and (2) exposes a set of composable, performance-oriented APIs in order to make it easy for developers to obtain high performance.
One of Unikraft's explicit goals is to be close to POSIX compatible to be able to run standard, off-the-shelf applications. Our evaluation using such applications like nginx, SQLite, and Redis shows that running them on Unikraft results in a 1.7x-2.7x performance improvement compared to Linux guests. In addition, Unikraft images for these apps are around 1MB, require less than 10MB of RAM to run, and boot in around 1ms on top of the VMM time (total boot time 3ms-40ms).
Unikraft is an official Xen Project and Linux Foundation project, and its code is released under a BSD license.
==Resources==
* Website .
* Source code on Github 
* Eurosys 2021 best paper award 
Category:Unikernels
Upstream QEMU stubdom

These are the TODO items. They don't need to be finished in that order. To make QEMU stubdom works we need to finish all of them.
== Bootstrap guest to specific network topology ==
Every virtual network device in QEMU requires a tap device. All interface should be bridged to the real network interface. 
 
It would be good if there a way to run a sequence of commands like 
 ifconfig tap0 create 
 ifconfig bridge0 create 
 brconfig add tap0 bridge0 
 brconfig add xenif0 bridge0 
 ... 
 
Or at least provide an entry point for user to program rump kernel as stop-gap solution. 
 
== Use stable rumprun interface to interact with toolstack (libxl) ==
I need stable rumprun command line options to specify network topology as mentioned before. Xen toolstack will just call rumprun to launch QEMU stubdom. 
 
It's OK for rumprun to evolve over time and have better syntax for things it does. We only need backward compatibility support. It's also OK to deprecate old command line options over time, just give downstream time to adjust (preferably a few releases). 
 
== Expose a host disk device as a guest disk device ==
Looks like ETFS is sufficient. It's a matter of passing the right options to rumprun. Performance is tied to underlying mini-os blkfront. 
 
== Communication channel between toolstack and rump kernel QEMU ==
The goal is to provide a channel for monitoring machinary to communicate with Xen toolstack. 
 
According to QEMU manual, monitor can be piped to a character device (chardev). A chardev can be piped to a TCP socket. Rump kernel has TCP socket support, so for the moment we have a solution, it is just a matter of plumbing through the right options to QEMU, which is quite easy. 
 
Martin mentioned that he is going to look into implementing libvchan in rump kernel. QEMU stubdom can switch to use that when it's ready.
Using GlusterFS for VM images

WARNING: The instructions on this wiki page are based on advice but haven't been tested. You can help by testing them (and then improving them and removing this warning).
== Overview ==
The recommended way to use GlusterFS with upstream Xen is to mount glusterfs as your filesystem, and store the VM images as files inside it (similar to what one might do for NFS).
== Prerequisites ==
* To begin with, you need a Gluster volume set up. Doing so is beyond the scope of this document; please see the [Gluster documentation http://gluster.readthedocs.io/en/latest/] for more details.
* On your Xen host, you will need the Gluster client installed.
== Directions ==
* Mount the GlusterFS volume
Say you have your gluster server at location server, volume vm-images, and you want to mount it at /images:
 mount -t glusterfs server:vm-images /images
* Create your disk image
There are some examples of how to create disk images on The HowTo page 
* Use your xl.cfg normally, with files from within the mounted filesystem:
 disk = [ 'vdev=hda,format=raw,target=/images/c6-01.raw' ]
Category:Xen
Category:Users
Using XAPI - preparing the toolstack

Ensure that xapi is running with "service xcp-xapi status". If you don't get the response "* xapi is running", you will need to run "service xcp-xapi start". 
Set up your path:
export PATH=$PATH:/usr/lib/xen-common/xapi/bin
Set up a storage repository. For now, we recommend NFS, or EXT if you have an unused block device. For example:
SR=`xe sr-create type=nfs name-label=nfs device-config:server=<nfs server> device-config:serverpath=<path on server>`
or
Note: DANGER!!! The partition selected will be formatted, and all data on it wiped. Ensure that you select the device correctly and that you have backed up any existing information on this partition.
SR=`xe sr-create type=ext device-config:device=/dev/sda3 name-label=ext` 
Set this as pool default SR:
POOL=`xe pool-list --minimal`
xe pool-param-set uuid=$POOL default-SR=$SR
==Memory and Dom0==
There is a bug within the 3.0 series kernel that is shipped with Oneiric, but is fixed in the 3.2 kernel which should be shipped with Precious, where mis-reporting of memory leads xapi and squeezed to reduce (sometimes significantly!) the amount of memory available to Dom0.
Note: certain versions of the package which installed squeezed failed to set the relevant scripts to start it at boot. Ensure that you have the latest release, and that you have checked that squeezed is running -
ps ax | grep squeezed
- before completing the steps below.
Your Dom0 should never be set to consume all of your physical memory (otherwise - where would guest VMs run?), but if, on initially running xapi, you notice that performance has suddenly dropped significantly, check the amount of memory available via cat /proc/meminfo (MemTotal, quoted in bytes). If this seems ridiculously low, then you will need to set hard parameters for the amount of memory assigned to Dom0. First you need to find the uuid of Dom0 thus:
xe vm-list
The first entry should look at little like this:
uuid ( RO) : f5d0039b-1138-4635-c153-6203bfdc330f
 name-label ( RW): Control domain on host: piggy
 power-state ( RO): running
We will use this as an example. 
Next, you need to decide how much memory to give Dom0. In our example, we are going to give it 2 GiB. Run the following commands, substituting the correct uuid and memory parameters:
xe vm-param-set uuid=f5d0039b-1138-4635-c153-6203bfdc330f memory-dynamic-max=2GiB
xe vm-param-set uuid=f5d0039b-1138-4635-c153-6203bfdc330f memory-dynamic-min=2GiB
Note that this will work around the problem, but will not allow Xen to adjust the amount of memory available to Dom0 automatically. Reboot your machine (start squeezed manually if required), and check meminfo again. Note that you will not see the entire amount of memory assigned - some will be used - but you can now balance this correctly.
Category:Developers
Category:XAPI
Using Xen PV Drivers on HVM Guest

This article describes how to use Xen Project para-virtualized drivers on HVM guest.
* Host: Oracle VM Server 2.1.2
* Guest: Oracle Enterprise Linux 5 (kernel 2.6.18)
= Virtual Storage Devices =
If the Linux guest initialized the qemu-dm emulated IDE/SCSI device, then Xen Project para-virtualized storage driver cannot initialize it. So we should first prevent the guest from initial the emulated devices.
If you are specifying the disk as: 
disk = [ 'file:/system.img,hda,w', 'file:/disk1.img,sda,w', 'file:/disk2.img,xvda,w', ]
Then:
* hda will be emulated as an IDE device, which will be initialized by the ide driver of the Linux guest. The ide driver is often built into the Linux kernel. You can add the following kernel command line to prevent the kernel from initializing the device: 
ide0=noprobe
;Note: for Linux kernel v2.6.25+, use "ide_core.noprobe=x.y" instead. "hdx=noprobe" and "idex=noprobe" have been removed.
* sda will be emulated as a SCSI device, which will be initialized by the sym53c8xx driver. The sym53c8xx driver is often build as a kernel module. You can add the following line to /etc/modprobe.conf to prevent the module from auto-loading: 
alias sym53c8xx off
;Note: if it doesn't work, you can get it by move the module out from /lib/modules/`uname -r`/.
* xvda will never be emulated by qemu-dm. So no extra actions is needed. xvd device is always the best choice to use if you want use a PV driver. Note: as in http://www.lanana.org/docs/device-list/devices-2.6+.txt: 
202 block	Xen Virtual Block Device
		 0 = /dev/xvda First Xen VBD whole disk
		 16 = /dev/xvdb Second Xen VBD whole disk
		 32 = /dev/xvdc Third Xen VBD whole disk
		 ...
		 240 = /dev/xvdp Sixteenth Xen VBD whole disk
 Partitions are handled in the same way as for IDE
 disks (see major number 3) except that the limit on
 partitions is 15.
The Xen Project VBD disk will always be xvdX under Linux.
= Reference =
* Howto: Prevent a Linux kernel module from auto loading
* Red Hat Enterprise Linux Para-virtualized Drivers Guide
Category:Xen
Category:Users
Category:Beginners
Category:HowTo
Category:Drivers