Skip to contentSkip to conversation

xen-image-minimal: enable runqemu for x86-64

PATCH In review Christopher Clark 2 participants 2 messages Feb 27, 2020 – Mar 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-image-minimal: enable runqemu for x86-64

From: Christopher Clark <[email protected]>

Booting this Xen image with QEMU works when launching from the wic-generated pcbios disk image with the directdisk-xen.wks kickstart file, so add the variable settings to make doing it simple -- eg:

runqemu xen-image-minimal nographic slirp

Tested with MACHINEs: qemux86-64 and genericx86-64

Memory allocated to qemu is increased slightly over the default to allow for running Xen and the Linux dom0 and guest VMs.

---

This patch requires the recently-submitted Xen patch series to be applied first. ( https://lists.yoctoproject.org/g/meta-virtualization/message/5133 )

 recipes-extended/images/xen-image-minimal.bb | 13 +++++++++++++
 1 file changed, 13 insertions(+)
recipes-extended/images/xen-image-minimal.bb +13 -0
index dcdc864..c965f22 100644
@@ -72,3 +72,16 @@ build_syslinux_cfg () {
 	echo "  APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUX_CFG}
 }
 
+# Enable runqemu. eg: runqemu xen-image-minimal nographic slirp
+WKS_FILE_x86-64 = "directdisk-xen.wks"
+QB_MEM = "-m 400"
+QB_DEFAULT_KERNEL = ""
+QB_DEFAULT_FSTYPE = "wic"
+QB_FSINFO = "wic:kernel-in-fs"
+# qemux86-64 machine does not include 'wic' in IMAGE_FSTYPES, which is needed
+# to boot this image, so add it here:
+IMAGE_FSTYPES_qemux86-64 += "wic"
+# Networking: the qemuboot.bbclass default virtio network device works ok
+# and so does the emulated e1000 -- choose according to the network device
+# drivers that are present in your dom0 Linux kernel. To switch to e1000:
+# QB_NETWORK_DEVICE = "-device e1000,netdev=net0,mac=@MAC@"
Signature · 1 line
2.17.1
#1 lore raw

merged

Bruce

Quoted 48 lines · On Thu, Feb 27, 2020 at 5:01 PM <[email protected]> wrote:

From: Christopher Clark <[email protected]>

Booting this Xen image with QEMU works when launching from the wic-generated pcbios disk image with the directdisk-xen.wks kickstart file, so add the variable settings to make doing it simple -- eg:

runqemu xen-image-minimal nographic slirp

Tested with MACHINEs: qemux86-64 and genericx86-64

Memory allocated to qemu is increased slightly over the default to allow for running Xen and the Linux dom0 and guest VMs.

---

This patch requires the recently-submitted Xen patch series to be applied first. ( https://lists.yoctoproject.org/g/meta-virtualization/message/5133 )

 recipes-extended/images/xen-image-minimal.bb | 13 +++++++++++++
 1 file changed, 13 insertions(+)
recipes-extended/images/xen-image-minimal.bb +13 -1
index dcdc864..c965f22 100644
@@ -72,3 +72,16 @@ build_syslinux_cfg () {
        echo "  APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUX_CFG}
 }
 
+# Enable runqemu. eg: runqemu xen-image-minimal nographic slirp
+WKS_FILE_x86-64 = "directdisk-xen.wks"
+QB_MEM = "-m 400"
+QB_DEFAULT_KERNEL = ""
+QB_DEFAULT_FSTYPE = "wic"
+QB_FSINFO = "wic:kernel-in-fs"
+# qemux86-64 machine does not include 'wic' in IMAGE_FSTYPES, which is needed
+# to boot this image, so add it here:
+IMAGE_FSTYPES_qemux86-64 += "wic"
+# Networking: the qemuboot.bbclass default virtio network device works ok
+# and so does the emulated e1000 -- choose according to the network device
+# drivers that are present in your dom0 Linux kernel. To switch to e1000:
+# QB_NETWORK_DEVICE = "-device e1000,netdev=net0,mac=@MAC@"
--

2.17.1

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II