summaryrefslogtreecommitdiff
path: root/pcr/xen/xen.install
blob: 2a053c9f72a390df90b87bfe5e9cb9cb7623bb4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
install_msg() {
	cat << __EOF__
   Bunch of Xen Notes: https://wiki.archlinux.org/index.php/Xen

   If booting via efi, copy the example /etc/xen/efi-xen.cfg to /boot/xen.cfg
   and edit the contents to match the settings you need.

   To make dom0 go: 

    systemctl enable xen-qemu-dom0-disk-backend.service
    systemctl enable xen-init-dom0.service
    systemctl enable xenconsoled.service

   Optional services are:
    systemctl enable xen-watchdog.service

   To start domains on boot:
    systemctl enable xendomains.service


__EOF__


}


post_install() {
	install_msg
	systemd-tmpfiles --create
	/usr/share/libalpm/scripts/xen-ucode-extract.sh
}

post_upgrade() {
	systemd-tmpfiles --create
	/usr/share/libalpm/scripts/xen-ucode-extract.sh
}

pre_remove() {
	systemctl stop xendomains.service
	systemctl stop xen-watchdog.service
	systemctl stop xenconsoled.service
	systemctl stop xen-init-dom0.service
	systemctl stop xen-qemu-dom0-disk-backend.service

	systemctl disable xendomains.service
	systemctl disable xen-watchdog.service
	systemctl disable xenconsoled.service
	systemctl disable xen-init-dom0.service
	systemctl disable xen-qemu-dom0-disk-backend.service

	echo "Be sure to check boot for auto-generated microcode files."
}

post_remove() {
	cat << __EOF__

In order to finish removing Xen, you will need to modify
your bootloader configuration files to load your Linux
kernel instead of Xen kernel.
__EOF__
}