Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
libvirt.10484
1fc90ae9-libxl-mig-persist.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1fc90ae9-libxl-mig-persist.patch of Package libvirt.10484
commit 1fc90ae934b8b05e02ffc47cb79f181d9e5ece69 Author: Jim Fehlig <jfehlig@suse.com> Date: Mon Sep 19 11:34:34 2016 -0600 libxl: support VIR_MIGRATE_PERSIST_DEST migration flag By default, virt-manager (and likely other libvirt-based apps) sets the VIR_MIGRATE_PERSIST_DEST flag when invoking the migrate API, which fails in a Xen setup since the libxl driver does not support the flag. Persisting a domain is a trivial task in the grand scheme of migration, so be nice to libvirt apps and add support for VIR_MIGRATE_PERSIST_DEST in the libxl driver. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Index: libvirt-1.2.18.4/src/libxl/libxl_migration.c =================================================================== --- libvirt-1.2.18.4.orig/src/libxl/libxl_migration.c +++ libvirt-1.2.18.4/src/libxl/libxl_migration.c @@ -564,6 +564,29 @@ libxlDomainMigrationFinish(virConnectPtr event = NULL; } + if (flags & VIR_MIGRATE_PERSIST_DEST) { + unsigned int oldPersist = vm->persistent; + virDomainDefPtr vmdef; + + vm->persistent = 1; + if (!(vmdef = virDomainObjGetPersistentDef(cfg->caps, + driver->xmlopt, vm))) + goto cleanup; + + if (virDomainSaveConfig(cfg->configDir, vmdef) < 0) + goto cleanup; + + event = virDomainEventLifecycleNewFromObj(vm, + VIR_DOMAIN_EVENT_DEFINED, + oldPersist ? + VIR_DOMAIN_EVENT_DEFINED_UPDATED : + VIR_DOMAIN_EVENT_DEFINED_ADDED); + if (event) { + libxlDomainEventQueue(driver, event); + event = NULL; + } + } + if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) goto cleanup; Index: libvirt-1.2.18.4/src/libxl/libxl_migration.h =================================================================== --- libvirt-1.2.18.4.orig/src/libxl/libxl_migration.h +++ libvirt-1.2.18.4/src/libxl/libxl_migration.h @@ -28,6 +28,7 @@ # define LIBXL_MIGRATION_FLAGS \ (VIR_MIGRATE_LIVE | \ + VIR_MIGRATE_PERSIST_DEST | \ VIR_MIGRATE_UNDEFINE_SOURCE | \ VIR_MIGRATE_PAUSED)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor