Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Integrating Xen 4.2 with Systemd.
Integrating Xen 4.2 AUR with Systemd.
I tested the AUR package with a fresh installation of Arch of x86_64. Only
packages 'base', 'base-devel'and the dependencies mentioned on the site
were installed.
* package build also requires dev86
* dev86 is in multilib, x86_64 users need to enable multilib in /etc/pacman.conf
* users need to add a new entry to their bootloader config file (mentioned)
* users need to set up a network bridge or alternative for dom0 (not mentioned)
The following are what was needed to make systemd work successfully with the AUR package
(and the installation from source).
* Need to include the following line in /etc/fstab:
none /proc/xen xenfs defaults 0 0
* Need to place the file 'xendomains' (created in init.d) somewhere useful.
Fedora use /usr/libexec which Arch does not have. It's a script so maybe
/etc/xen/scripts/ ?
* Error messages about 'failed to execute /usr/lib/.... xend/udev_event'
(lots of them) are caused by /etc/udev/rules.d/xend.rules
As xend is (a) deprecated and (b) not used, it is safe to remove xend.rules
I was able to remove /etc/udev/xen-backend rules without any (apparent) effect.
* The AUR build creates both oxenstored and censtored. oxenstored is more
efficient according to so oxenstored.service is provided.
* The following files integrate Xen 4.2 with systemd 195. They replace xencommons
which loads startup modules then starts oxenstored, xenconsoled and xendomains.
To start the services at startup, issue:
systemctl enable oxenstored.service
systemctl enable xenconsoled.service
systemctl enable xendomains.service
# The following were included in xencommons, but were not inserted by systemd
# evtchn
# gntdev
# netbk
# blkbk
# xen-scsibk
# usbbk
# pciback
# blktap2
# blktap
#### end of xen.conf
Description=Xenstored - daemon managing xenstore file system
Before=libvirtd.service libvirt-guests.service
ExecStart=/usr/sbin/xenstored --pid-file /var/run/ $XENSTORED_ARGS
#### end of xenstored.service
Description=Xenconsoled - handles logging from guest consoles and hypervisor
#### end of xencommons.service
Description=Xendomains - start and stop guests on boot and shutdown
Requires=proc-xen.mount xenstored.service
After=proc-xen.mount xenstored.service xenconsoled.service
ExecStartPre=/usr/bin/grep -q control_d /proc/xen/capabilities
ExecStart=/etc/xen/scripts/xendomains start
ExecStop=/etc/xen/scripts/xendomains stop
#### end of xendomains.service
xen.conf paleo9
oxenstored.service xenconsoled.service xendomains.service
based on Fedora 17, modified for the Arch system by paleo9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.