mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-20 05:51:18 +02:00
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:
parent
b93f7aa695
commit
61e08f49e3
32
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-xendom0/files/cloud-config.yml
vendored
Normal file
32
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-xendom0/files/cloud-config.yml
vendored
Normal 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
|
15
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-xendom0/files/grub.cfg
vendored
Normal file
15
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-xendom0/files/grub.cfg
vendored
Normal 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
|
||||||
|
}
|
29
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-xendom0/oem-xendom0-4.4.1.ebuild
vendored
Normal file
29
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-xendom0/oem-xendom0-4.4.1.ebuild
vendored
Normal 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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user