]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Remove 'allowReboot' field
authorPeter Krempa <pkrempa@redhat.com>
Mon, 20 Jul 2026 11:35:07 +0000 (13:35 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Jul 2026 11:38:37 +0000 (13:38 +0200)
The value is no longer used. Remove it including the status XML
handling.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
16 files changed:
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
tests/qemustatusxml2xmldata/backup-pull-in.xml
tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
tests/qemustatusxml2xmldata/blockjob-mirror-in.xml
tests/qemustatusxml2xmldata/memory-backing-dir-in.xml
tests/qemustatusxml2xmldata/migration-in-params-in.xml
tests/qemustatusxml2xmldata/migration-out-nbd-bitmaps-in.xml
tests/qemustatusxml2xmldata/migration-out-nbd-out.xml
tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml
tests/qemustatusxml2xmldata/migration-out-params-in.xml
tests/qemustatusxml2xmldata/modern-in.xml
tests/qemustatusxml2xmldata/qcow2-data-file-in.xml
tests/qemustatusxml2xmldata/throttlefilter-out.xml
tests/qemustatusxml2xmldata/upgrade-out.xml
tests/qemustatusxml2xmldata/vcpus-multi-in.xml

index e1b805d90626f7ef09501b4b081b401bd565d94c..a4e5f928401fe74504e3ceab658fcaccbb7c77ec 100644 (file)
@@ -1946,8 +1946,6 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv)
 
     priv->rememberOwner = false;
 
-    priv->allowReboot = VIR_TRISTATE_BOOL_ABSENT;
-
     g_clear_pointer(&priv->migrationCaps, virBitmapFree);
 
     virHashRemoveAll(priv->blockjobs);
@@ -2621,17 +2619,6 @@ qemuDomainObjPrivateXMLFormatBackups(virBuffer *buf,
 }
 
 
-void
-qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf,
-                                         virTristateBool allowReboot)
-{
-    if (allowReboot) {
-        virBufferAsprintf(buf, "<allowReboot value='%s'/>\n",
-                          virTristateBoolTypeToString(allowReboot));
-    }
-}
-
-
 static void
 qemuDomainObjPrivateXMLFormatPR(virBuffer *buf,
                                 qemuDomainObjPrivate *priv)
@@ -2812,8 +2799,6 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf,
     if (priv->rememberOwner)
         virBufferAddLit(buf, "<rememberOwner/>\n");
 
-    qemuDomainObjPrivateXMLFormatAllowReboot(buf, priv->allowReboot);
-
     qemuDomainObjPrivateXMLFormatPR(buf, priv);
 
     virBufferAsprintf(buf, "<nodename index='%llu'/>\n", priv->nodenameindex);
@@ -3302,21 +3287,6 @@ qemuDomainObjPrivateXMLParseBackups(qemuDomainObjPrivate *priv,
 }
 
 
-int
-qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt,
-                                        virTristateBool *allowReboot)
-{
-    xmlNodePtr node = virXPathNode("./allowReboot", ctxt);
-
-    /* Allow value='default' as the input here, because old versions
-     * of libvirt produced that output and we need to be able to read
-     * it back to correctly handle running guests on daemon upgrade */
-    return virXMLPropTristateBoolAllowDefault(node, "value",
-                                              VIR_XML_PROP_NONE,
-                                              allowReboot);
-}
-
-
 static void
 qemuDomainObjPrivateXMLParsePR(xmlXPathContextPtr ctxt,
                                bool *prDaemonRunning)
@@ -3548,9 +3518,6 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
     priv->chardevStdioLogd = virXPathBoolean("boolean(./chardevStdioLogd)",
                                              ctxt) == 1;
 
-    if (qemuDomainObjPrivateXMLParseAllowReboot(ctxt, &priv->allowReboot) < 0)
-        return -1;
-
     qemuDomainObjPrivateXMLParsePR(ctxt, &priv->prDaemonRunning);
 
     if (qemuDomainObjPrivateXMLParseBlockjobs(vm, priv, ctxt) < 0)
index 50ab492023ee3bbf516ef20bb1edf329a3454f59..23e99dc68cb296dbda9763fdb9c3543dad3cd228 100644 (file)
@@ -134,15 +134,6 @@ struct _qemuDomainObjPrivate {
     bool fakeReboot;
     bool fakeReset;
     bool pausedShutdown;
-    /* allowReboot:
-     *
-     * Unused with new QEMU versions which have QEMU_CAPS_SET_ACTION.
-     *
-     * Otherwise if it's set to VIR_TRISTATE_BOOL_YES, QEMU was started with
-     * -no-shutdown, and if set to VIR_TRISTATE_BOOL_NO qemu was started with
-     * -no-reboot instead.
-     */
-    virTristateBool allowReboot;
 
     unsigned long migMaxBandwidth;
     char *origname;
@@ -1010,14 +1001,6 @@ qemuDomainFixupCPUs(virDomainObj *vm,
 char *
 qemuDomainGetMachineName(virDomainObj *vm);
 
-void
-qemuDomainObjPrivateXMLFormatAllowReboot(virBuffer *buf,
-                                         virTristateBool allowReboot);
-
-int
-qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt,
-                                        virTristateBool *allowReboot);
-
 void
 qemuDomainPrepareDiskSourceData(virDomainDiskDef *disk,
                                 virStorageSource *src);
index 2cedcc3cf227f3efaf6d8ece06900c7c534a310b..fcaff2e38a711d7af989e7d4b3136b98fde550c3 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='yes'>
index 1c45fad370c445d660d5ce4180721440727b331c..58afae41687f58c10f78de49fed4d3f1595a9d56 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='yes'>
index df11e83cedb51ba6d2f25d7eeb67d87b62edd095..be85202c0227787432563bd1d34c46d3b72be4e6 100644 (file)
@@ -22,7 +22,6 @@
   <libDir path='/tmp'/>
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-QEMUGuest1'/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='yes'/>
index eea671a41c0d26643ea78627f2ee7d86e07ca4de..a1a184549539568b3ac33f9fe43dae2c4e7172df 100644 (file)
@@ -22,7 +22,6 @@
   <libDir path='/tmp'/>
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
   <memoryBackingDir path='/some/random/path/1-QEMUGuest1'/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index 861d8eeadb92a64d41c6ab467597a6a991b8fc9b..986e5455aa58411104351c691205eb16ef6a3299 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-nest'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-nest'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index 5d76545513cc3fe03db664fb28da1a0a258bac54..4f1fb07c1bc779e4c960e0ed808286cb076a7192 100644 (file)
   </cpu>
   <chardevStdioLogd/>
   <rememberOwner/>
-  <allowReboot value='yes'/>
   <nodename index='3'/>
   <fdset index='0'/>
   <blockjobs active='yes'>
index 581cf28286051e8a663d197e88555aacc275d395..a69d1c45908c29b1739f5f57a2e52336ff598ad5 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-upstream'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-upstream'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index dacaa3e42f42a1b106b4f0a2139a6f5664da9508..86a7fbc187b62af5ed9073e6ceec7ffc897b9d51 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-3-upstream'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/3-upstream'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index b914236b62fca6d479611b95cbaf00c2d7acbee6..f4e921ab38d811a474efd9ff59707684e8238c9c 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-7-nest'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/7-nest'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index 050669f554a051401a8acf5b990a46a31620aac1..422a04f3ca312800581b65e4a816d2c00c620e52 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-upstream'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='123'/>
   <fdset index='321'/>
   <blockjobs active='no'/>
index 2675214417997ebf0af80b8154f31ca04c563bb6..951b4abfbe65b4f69385c198b4bede3574c3f40b 100644 (file)
@@ -22,7 +22,6 @@
   <libDir path='/tmp'/>
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-QEMUGuest1'/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index 8751a42cce01d57ee9b0cd17f8d0d3ee7be21026..eee01c79b1ad6c55a12d607a2a25cda27c8ea8f2 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-copy'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/4-copy'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index c7bc7128df60fccf7c3b9dcbacfc7d3b8e52dad4..fd1c174200f4750fb4adb7ca29a2e8e4537c5894 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1-upstream'/>
   <chardevStdioLogd/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
index 6ee688ce037d5c7f1c59d89b612c70d0ba0c6318..1d5b34c2b68338f2920c9f8271a98497210bf3a9 100644 (file)
   <libDir path='/tmp'/>
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target'/>
   <memoryBackingDir path='/var/lib/libvirt/qemu/ram/1729-QEMUGuest1'/>
-  <allowReboot value='yes'/>
   <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>