====== Gentoo Xen ======
* [[Xen]]
* [[xl]]
* [[https://wiki.gentoo.org/wiki/Xen|Gentoo Wiki: Xen]]
Kernel configuration for Xen domain0:
Processor type and features --->
[*] Linux guest support --->
[*] Enable paravirtualization code
[*] Xen guest support
[*] Support for running as a PVH guest
[*] Paravirtualization layer for spinlocks
Power management and ACPI options --->
[*] ACPI (Advanced Configuration and Power Interface) Support --->
Bus options (PCI etc.) --->
<*> Xen PCI Frontend
[*] Networking support --->
Networking options --->
<*> 802.1d Ethernet Bridging
[*] Network packet filtering framework (Netfilter) --->
[*] Advanced netfilter configuration
[*] Bridged IP/ARP packets filtering
Device Drivers --->
Character devices --->
[*] Xen Hypervisor Console support
[*] Xen Hypervisor Multiple Consoles support
Device Drivers --->
[*] Block devices --->
<*> Xen virtual block device support
<*> Xen block-device backend driver
Device Drivers --->
Input device support --->
[*] Miscellaneous devices --->
<*> Xen virtual keyboard and mouse support
Device Drivers --->
[*] Network device support --->
<*> Xen network device frontend driver
<*> Xen backend network device
Device Drivers --->
Graphics support --->
Frame buffer Devices --->
<*> Xen virtual frame buffer support
Device Drivers --->
Xen driver support --->
[*] Xen memory balloon driver
[*] Scrub pages before returning them to system
<*> Xen /dev/xen/evtchn device
[*] Backend driver support
<*> Xen filesystem
[*] Create compatibility mount point /proc/xen
[*] Create xen entries under /sys/hypervisor
<*> userspace grant access device driver
<*> User-space grant reference allocator driver
<*> Xen PCI-device backend driver
<*> Xen ACPI processor
[*] Xen platform mcelog
[*] Xen symbols
You can install ''pygrub'' with the USE flag on the xen-tools package, which is a python wrapper to the old GRUB installs. Alternatively, you can use the newer ''pvgrub'' instead.
emerge xen-pvgrub xen-tools xen
Once you've emerged the packages, there will be a ''xen.gz'' kernel located in ''/boot''. You'll need to update your bootloader to use that as the kernel. Your original kernel is passed in as a module.
A sample GRUB legacy configuration:
title Xen Gentoo Linux 4.1.12
root (hd0,0)
kernel /boot/xen.gz
module /boot/vmlinuz-4.1.12-gentoo root=/dev/sda3
Update the Xen services to start on boot:
rc-update add xencommons default
rc-update add xenconsoled default
rc-update add xenstored default
If you want Xen domains to start on boot, put the configuration files in ''/etc/xen/auto'', and add ''xendomains'' to the startup sequence:
ln -s /etc/xen/configs/openbsd-5.9_amd64 /etc/xen/configs/auto/
rc-update add xendomains default
Update ''/etc/inittab'':
c0:2345:respawn:/sbin/agetty 38400 hvc0 linux
Reload your new inittab:
telinit q