summaryrefslogtreecommitdiffstats
path: root/recipes-extended/images
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-02-19 19:14:00 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-26 01:05:01 +0000
commit1e88a57bfa40ec640962a8aaea6c1db6da990500 (patch)
tree4b06dd10726dec3c1097fa07758c63c36b106272 /recipes-extended/images
parent7e8293ee986031f437a29d19533e3d59a8aeda74 (diff)
downloadmeta-virtualization-1e88a57bfa40ec640962a8aaea6c1db6da990500.tar.gz
xen: add guest bundling infrastructure with cross-install class
Add xen-guest-cross-install.bbclass for bundling Xen guest images into Dom0 host images at build time. Supports per-guest configuration via varflags (memory, vcpus, vif, kernel extra), custom config files, external/pre-built guests, and autostart via /etc/xen/auto/ symlinks. Also add example-xen-guest-bundle recipe as a template, and simplify xen-guest-image-minimal by removing the old XEN_GUEST_AUTO_BUNDLE do_deploy mechanism in favor of the new class-based approach. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/images')
-rw-r--r--recipes-extended/images/xen-guest-image-minimal.bb26
1 files changed, 1 insertions, 25 deletions
diff --git a/recipes-extended/images/xen-guest-image-minimal.bb b/recipes-extended/images/xen-guest-image-minimal.bb
index 76f320e4..1afc4219 100644
--- a/recipes-extended/images/xen-guest-image-minimal.bb
+++ b/recipes-extended/images/xen-guest-image-minimal.bb
@@ -1,7 +1,6 @@
1DESCRIPTION = "A Xen guest image." 1DESCRIPTION = "A Xen guest image."
2 2
3inherit core-image features_check deploy 3inherit core-image features_check
4inherit kernel-artifact-names
5 4
6IMAGE_INSTALL += " \ 5IMAGE_INSTALL += " \
7 packagegroup-core-boot \ 6 packagegroup-core-boot \
@@ -26,26 +25,3 @@ LICENSE = "MIT"
26APPEND += "console=hvc0" 25APPEND += "console=hvc0"
27 26
28IMAGE_FSTYPES = "tar.bz2 ext4 ext4.qcow2" 27IMAGE_FSTYPES = "tar.bz2 ext4 ext4.qcow2"
29
30XEN_GUEST_AUTO_BUNDLE ?= ""
31
32# When a xen-guest-image-minimal is built with the
33# XEN_GUEST_AUTO_BUNDLE varaible set to True, a configuration file for
34# automatic guest bundling will be generated and the guest bundled
35# automatically when a xen host image is built.
36do_deploy() {
37 if [ -n "${XEN_GUEST_AUTO_BUNDLE}" ]; then
38 outname="xen-guest-bundle-${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}-${IMAGE_VERSION_SUFFIX}.cfg"
39cat <<EOF >>${DEPLOYDIR}/$outname
40name = "xen-guest"
41memory = 512
42vcpus = 1
43disk = ['file:${IMAGE_LINK_NAME}.ext4,xvda,rw']
44vif = ['bridge=xenbr0']
45kernel = "${KERNEL_IMAGETYPE}"
46extra = "root=/dev/xvda ro ip=dhcp"
47EOF
48 fi
49}
50
51addtask deploy after do_compile