]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
API: Clarify behaviour of autostart vs autostart once
authorPeter Krempa <pkrempa@redhat.com>
Mon, 5 May 2025 14:33:32 +0000 (16:33 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 15 May 2025 06:27:27 +0000 (08:27 +0200)
If either of the autostart settings is enabled the VM will be
autostarted. Attempt to clarify that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libvirt-domain.c

index f788fa9a586b2065e731f92fd389d225a0216d71..93e8f5b8539f7bf9a412a60e9741d347134146a5 100644 (file)
@@ -7322,9 +7322,8 @@ virDomainCreateWithFiles(virDomainPtr domain, unsigned int nfiles,
  * @domain: a domain object
  * @autostart: the value returned
  *
- * Provides a boolean value indicating whether the domain
- * configured to be automatically started when the host
- * machine boots.
+ * Provides a boolean value indicating whether the domain is configured to be
+ * automatically started each time when the host machine boots.
  *
  * Returns -1 in case of error, 0 in case of success
  *
@@ -7366,8 +7365,8 @@ virDomainGetAutostart(virDomainPtr domain,
  * @domain: a domain object
  * @autostart: whether the domain should be automatically started 0 or 1
  *
- * Configure the domain to be automatically started
- * when the host machine boots.
+ * Configure the domain to be automatically started each time when the host
+ * machine boots.
  *
  * Returns -1 in case of error, 0 in case of success
  *
@@ -7409,9 +7408,12 @@ virDomainSetAutostart(virDomainPtr domain,
  * @domain: a domain object
  * @autostart: the value returned
  *
- * Provides a boolean value indicating whether the domain
- * is configured to be automatically started the next time
- * the host machine boots only.
+ * Provides a boolean value indicating whether the domain is configured to be
+ * automatically started next time when the host machine boots.
+ *
+ * Note that autostart configured via the virDomain[Set|Get]AutostartOnce APIs
+ * is independent from the autostart configured via virDomain[Set|Get]Autostart.
+ * Enabling either of them will cause the VM to be started on the next boot.
  *
  * Returns -1 in case of error, 0 in case of success
  *
@@ -7453,8 +7455,12 @@ virDomainGetAutostartOnce(virDomainPtr domain,
  * @domain: a domain object
  * @autostart: whether the domain should be automatically started 0 or 1
  *
- * Configure the domain to be automatically started
- * the next time the host machine boots only.
+ * Configure the domain to be automatically started the next when the host
+ * machine boots.
+ *
+ * Note that autostart configured via the virDomain[Set|Get]AutostartOnce APIs
+ * is independent from the autostart configured via virDomain[Set|Get]Autostart.
+ * Enabling either of them will cause the VM to be started on the next boot.
  *
  * Returns -1 in case of error, 0 in case of success
  *