oem-xendom0: experimental OEM for testing Xen under QEMU

For use with the `qemu_xen` vm type. The base image's packages must be
built with the `USE=vm-testing` flag set in order to include Xen.
This commit is contained in:
Michael Marineau 2014-11-29 17:51:16 -08:00
parent b93f7aa695
commit 61e08f49e3
3 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#cloud-config
coreos:
units:
- name: xenstored.service
command: start
runtime: yes
content: |
[Unit]
RequiresMountsFor=/proc/xen
[Service]
ExecStartPre=/usr/sbin/modprobe xen-evtchn
ExecStart=/usr/sbin/xenstored --no-fork
ExecStartPost=/usr/bin/xenstore write /local/domain/0/name Domain-0
ExecStartPost=/usr/bin/xenstore write /local/domain/0/domid 0
- name: xenconsoled.service
command: start
runtime: yes
content: |
[Unit]
Requires=xenstored.service
After=xenstored.service
[Service]
ExecStart=/usr/sbin/xenconsoled
oem:
id: xendom0
name: Xen Domain0 for Testing
version-id: @@OEM_VERSION_ID@@
home-url: https://coreos.com
bug-report-url: https://github.com/coreos/bugs/issues

View File

@ -0,0 +1,15 @@
# Boot CoreOS as Xen Domain0
set default=coreos-xen
set xen_console="console=vga,com1 com1=115200,8n1"
set linux_console="console=hvc0 console=tty0"
serial com0 --speed=115200 --word=8 --parity=no
terminal_input console serial_com0
terminal_output console serial_com0
menuentry "CoreOS on Xen" --id=coreos-xen {
multiboot /xen-@@XEN_VERSION@@.gz $xen_console noreboot
gptprio.next -d root -u usr_uuid
module /boot/vmlinuz $linux_console $linux_root usr=PARTUUID=$usr_uuid
}

View File

@ -0,0 +1,29 @@
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="OEM suite for Xen testing"
HOMEPAGE=""
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64"
IUSE=""
# no source directory
S="${WORKDIR}"
src_prepare() {
sed -e "s%@@OEM_VERSION_ID@@%${PVR}%g" \
${FILESDIR}/cloud-config.yml > ${T}/cloud-config.yml || die
sed -e "s%@@XEN_VERSION@@%${PV}%g" \
${FILESDIR}/grub.cfg > ${T}/grub.cfg || die
}
src_install() {
insinto "/usr/share/oem"
doins ${T}/cloud-config.yml
doins ${T}/grub.cfg
}