/*
- * Mark the running VM config as transient. Ensures transient hotplug
+ * Mark the current VM config as transient. Ensures transient hotplug
* operations do not persist past shutdown.
*
* @param caps pointer to capabilities info
* @param xmlopt pointer to XML parser configuration object
* @param domain domain object pointer
- * @param live if true, run this operation even for an inactive domain.
- * this allows freely updated domain->def with runtime defaults before
- * starting the VM, which will be discarded on VM shutdown. Any cleanup
- * paths need to be sure to handle newDef if the domain is never started.
* @return 0 on success, -1 on failure
*/
int
virDomainObjSetDefTransient(virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- virDomainObjPtr domain,
- bool live)
+ virDomainObjPtr domain)
{
int ret = -1;
- if (!virDomainObjIsActive(domain) && !live)
- return 0;
-
if (!domain->persistent)
return 0;
virDomainObjPtr domain)
{
if (virDomainObjIsActive(domain) &&
- virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0)
+ virDomainObjSetDefTransient(caps, xmlopt, domain) < 0)
return NULL;
if (domain->newDef)
virDomainDefPtr *oldDef);
int virDomainObjSetDefTransient(virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- virDomainObjPtr domain,
- bool live);
+ virDomainObjPtr domain);
virDomainDefPtr
virDomainObjGetPersistentDef(virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
VIR_FREE(managed_save_path);
}
- if (virDomainObjSetDefTransient(cfg->caps, driver->xmlopt,
- vm, true) < 0)
+ if (virDomainObjSetDefTransient(cfg->caps, driver->xmlopt, vm) < 0)
goto cleanup;
if (virDomainLockProcessStart(driver->lockManager,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, true) < 0)
+ if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm) < 0)
goto cleanup;
/* Run an early hook to set-up missing devices */
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, true) < 0)
+ if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm) < 0)
goto stop;
if (!(flags & VIR_QEMU_PROCESS_START_PRETEND)) {
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, true) < 0)
+ if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm) < 0)
goto error;
vm->def->id = qemuDriverAllocateID(driver);
if (virDomainObjSetDefTransient(privconn->caps,
privconn->xmlopt,
- dom, false) < 0) {
+ dom) < 0) {
goto cleanup;
}
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(driver->caps, driver->xmlopt,
- vm, true) < 0) {
+ if (virDomainObjSetDefTransient(driver->caps, driver->xmlopt, vm) < 0) {
VIR_FORCE_CLOSE(logfd);
return -1;
}