summaryrefslogtreecommitdiffstats
path: root/wic
diff options
context:
space:
mode:
authorChristopher Clark <christopher.w.clark@gmail.com>2020-02-25 16:15:50 -0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-02-27 16:59:22 -0500
commitc66da6821f38a9db3422990bd4068ab691169803 (patch)
tree91af09706dd5a7cf37cec6ed123e4c56fc8c1f1f /wic
parente0884db20be8582f8ecf161a5dc1a84c620e68dd (diff)
downloadmeta-virtualization-c66da6821f38a9db3422990bd4068ab691169803.tar.gz
wic: add support for bootable pcbios partition with Xen hypervisor
New bootimg-biosxen wic plugin to populate a boot partition for launching Xen and dom0. Includes example kickstart wks files to generate disk images to boot into Xen from PC BIOS. eg: wic create directdisk-xen -e xen-image-minimal and write the resulting image file to a disk for boot. Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'wic')
-rw-r--r--wic/directdisk-bootloader-xen.cfg17
-rw-r--r--wic/directdisk-bootloader-xen.wks12
-rw-r--r--wic/directdisk-xen.wks10
3 files changed, 39 insertions, 0 deletions
diff --git a/wic/directdisk-bootloader-xen.cfg b/wic/directdisk-bootloader-xen.cfg
new file mode 100644
index 00000000..3ad76d6c
--- /dev/null
+++ b/wic/directdisk-bootloader-xen.cfg
@@ -0,0 +1,17 @@
1ALLOWOPTIONS 1
2DEFAULT boot
3TIMEOUT 10
4PROMPT 1
5SERIAL 0 115200
6
7UI vesamenu.c32
8menu title Select boot options
9menu tabmsg Press [Tab] to edit, [Return] to select
10
11LABEL boot
12 KERNEL mboot.c32
13 APPEND /xen.gz console=com1,vga com1=115200,8n1 --- /vmlinuz quiet console=hvc0 root=LABEL=root rw rootwait panic=10
14
15LABEL verbose
16 KERNEL mboot.c32
17 APPEND /xen.gz console=com1,vga com1=115200,8n1 loglvl=all guest_loglvl=all --- /vmlinuz quiet console=hvc0 earlyprintk=xen root=LABEL=root rw rootwait panic=10
diff --git a/wic/directdisk-bootloader-xen.wks b/wic/directdisk-bootloader-xen.wks
new file mode 100644
index 00000000..c34120a5
--- /dev/null
+++ b/wic/directdisk-bootloader-xen.wks
@@ -0,0 +1,12 @@
1# short-description: Create a 'pcbios' direct disk image with Xen hypervisor and bootloader config
2# long-description: Creates a partitioned legacy BIOS disk image to boot Xen
3# with a bootloader config that the user can directly dd to boot media.
4# Boot files are located on the first vfat partition.
5
6part /boot --source bootimg-biosxen --ondisk sda --label boot --active --align 1024
7
8# For the main partition, it can be useful to add additional space for VMs;
9# eg. increase partition size by appending: --size 10G
10part / --source rootfs --ondisk sda --use-uuid --fstype=ext4 --label root --align 1024
11
12bootloader --configfile="directdisk-bootloader-xen.cfg"
diff --git a/wic/directdisk-xen.wks b/wic/directdisk-xen.wks
new file mode 100644
index 00000000..d6ca46a4
--- /dev/null
+++ b/wic/directdisk-xen.wks
@@ -0,0 +1,10 @@
1# short-description: Create a 'pcbios' direct disk image with Xen hypervisor
2# long-description: Creates a partitioned legacy BIOS disk image to boot Xen
3# that the user can directly dd to boot media. Boot files are located on the
4# first vfat partition.
5
6part /boot --source bootimg-biosxen --ondisk sda --label boot --active --align 1024
7
8# For the main partition, it can be useful to add additional space for VMs:
9# eg. increase partition size by appending: --size 10G
10part / --source rootfs --ondisk sda --use-uuid --fstype=ext4 --label root --align 1024