diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass
index d1794c7899..1ced9b9b73 100644
--- a/meta/classes-recipe/qemuboot.bbclass
+++ b/meta/classes-recipe/qemuboot.bbclass
@@ -126,6 +126,11 @@ QB_DRIVE_TYPE ?= "/dev/sd"
 
 inherit image-artifact-names
 
+# Dedicated deploy directory for the qemuboot config, separate from IMGDEPLOYDIR
+# so that do_write_qemuboot_conf can be its own sstate task and deploy its
+# output to DEPLOY_DIR_IMAGE independently of do_image_complete.
+QEMUBOOTCONFDEPLOYDIR = "${WORKDIR}/deploy-${PN}-qemubootconf"
+
 # Create qemuboot.conf
 addtask do_write_qemuboot_conf after do_rootfs before do_image
 do_write_qemuboot_conf[depends] += "${@ '' if bb.utils.to_boolean(d.getVar('INITRAMFS_IMAGE_BUNDLE')) else (d.getVar('KERNEL_DEPLOY_DEPEND') or '')}"
@@ -140,12 +145,22 @@ def qemuboot_vars(d):
 
 do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
 do_write_qemuboot_conf[vardepsexclude] += "TOPDIR"
+do_write_qemuboot_conf[dirs] = "${QEMUBOOTCONFDEPLOYDIR}"
+do_write_qemuboot_conf[cleandirs] = "${QEMUBOOTCONFDEPLOYDIR}"
+do_write_qemuboot_conf[stamp-extra-info] = "${MACHINE_ARCH}"
+SSTATETASKS += "do_write_qemuboot_conf"
+do_write_qemuboot_conf[sstate-inputdirs] = "${QEMUBOOTCONFDEPLOYDIR}"
+do_write_qemuboot_conf[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
+python do_write_qemuboot_conf_setscene () {
+    sstate_setscene(d)
+}
+addtask do_write_qemuboot_conf_setscene
 python do_write_qemuboot_conf() {
     import configparser
 
-    qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME'))
+    qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('QEMUBOOTCONFDEPLOYDIR'), d.getVar('IMAGE_NAME'))
     if d.getVar('IMAGE_LINK_NAME'):
-        qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'))
+        qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('QEMUBOOTCONFDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'))
     else:
         qemuboot_link = ""
     finalpath = d.getVar("DEPLOY_DIR_IMAGE")
