From 5a72ff014a2b8c4ee0dfabbf44a469d7b7915bb619d7b9cb88e545c2c67211aa Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 26 Sep 2011 03:28:30 +0000 Subject: [PATCH] update to libvirt 0.9.6 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=162 --- 0257ba8f-mig-speed-7.patch | 50 ----- 1282bd80-mig-speed-2.patch | 80 -------- 32620dab-fix-xen-err-msg.patch | 47 ----- 57c95175-xend-buff-size.patch | 24 --- 6f84e110-mig-speed-3.patch | 47 ----- 6ff9fc26-quiet-libxl-logging.patch | 41 ---- 7e5f6a51-rpc-generator.patch | 73 -------- 7f2498ef-no-log-invalid.patch | 30 --- 829bce17-mig-speed-4.patch | 59 ------ 8fc40c51-mig-speed-5.patch | 65 ------- 9e093f0b-libvirtd-sighup.patch | 46 ----- b12354be-mig-speed-1.patch | 292 ----------------------------- clone.patch | 8 +- ef1065cf-mig-speed-6.patch | 55 ------ f84aedad-revert.patch | 277 +++++++++++++++++++++++++++ libvirt-0.9.4.tar.bz2 | 3 - libvirt-0.9.6.tar.bz2 | 3 + libvirt-suse-netcontrol.patch | 50 ++--- libvirt.changes | 25 +++ libvirt.spec | 65 +++---- libvirtd-defaults.patch | 16 +- xen-name-for-devid.patch | 18 +- 22 files changed, 379 insertions(+), 995 deletions(-) delete mode 100644 0257ba8f-mig-speed-7.patch delete mode 100644 1282bd80-mig-speed-2.patch delete mode 100644 32620dab-fix-xen-err-msg.patch delete mode 100644 57c95175-xend-buff-size.patch delete mode 100644 6f84e110-mig-speed-3.patch delete mode 100644 6ff9fc26-quiet-libxl-logging.patch delete mode 100644 7e5f6a51-rpc-generator.patch delete mode 100644 7f2498ef-no-log-invalid.patch delete mode 100644 829bce17-mig-speed-4.patch delete mode 100644 8fc40c51-mig-speed-5.patch delete mode 100644 9e093f0b-libvirtd-sighup.patch delete mode 100644 b12354be-mig-speed-1.patch delete mode 100644 ef1065cf-mig-speed-6.patch create mode 100644 f84aedad-revert.patch delete mode 100644 libvirt-0.9.4.tar.bz2 create mode 100644 libvirt-0.9.6.tar.bz2 diff --git a/0257ba8f-mig-speed-7.patch b/0257ba8f-mig-speed-7.patch deleted file mode 100644 index b561159..0000000 --- a/0257ba8f-mig-speed-7.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit 0257ba8f9f4bf522a106aa2bbb4756e391a3dd42 -Author: Jim Fehlig -Date: Fri Aug 26 12:10:27 2011 -0600 - - Use max bandwidth from qemuDomainObjPrivate struct when migrating - - Adjust qemuMigrationRun() to use migMaxBandwidth in qemuDomainObjPrivate - structure when setting qemu migration speed. Caller-specified 'resource' - parameter overrides migMaxBandwidth. - -Index: libvirt-0.9.4/src/qemu/qemu_migration.c -=================================================================== ---- libvirt-0.9.4.orig/src/qemu/qemu_migration.c -+++ libvirt-0.9.4/src/qemu/qemu_migration.c -@@ -1284,6 +1284,7 @@ static int doNativeMigrate(struct qemud_ - qemuDomainObjPrivatePtr priv = vm->privateData; - unsigned int background_flags = QEMU_MONITOR_MIGRATE_BACKGROUND; - qemuMigrationCookiePtr mig = NULL; -+ unsigned long migrate_speed = resource ? resource : priv->migMaxBandwidth; - VIR_DEBUG("driver=%p, vm=%p, uri=%s, cookiein=%s, cookieinlen=%d, " - "cookieout=%p, cookieoutlen=%p, flags=%x, dname=%s, resource=%lu", - driver, vm, uri, NULLSTR(cookiein), cookieinlen, -@@ -1334,8 +1335,7 @@ static int doNativeMigrate(struct qemud_ - QEMU_ASYNC_JOB_MIGRATION_OUT) < 0) - goto cleanup; - -- if (resource > 0 && -- qemuMonitorSetMigrationSpeed(priv->mon, resource) < 0) { -+ if (qemuMonitorSetMigrationSpeed(priv->mon, migrate_speed) < 0) { - qemuDomainObjExitMonitorWithDriver(driver, vm); - goto cleanup; - } -@@ -1506,6 +1506,7 @@ static int doTunnelMigrate(struct qemud_ - int ret = -1; - qemuMigrationCookiePtr mig = NULL; - qemuMigrationIOThreadPtr iothread = NULL; -+ unsigned long migrate_speed = resource ? resource : priv->migMaxBandwidth; - VIR_DEBUG("driver=%p, vm=%p, st=%p, cookiein=%s, cookieinlen=%d, " - "cookieout=%p, cookieoutlen=%p, flags=%lx, resource=%lu", - driver, vm, st, NULLSTR(cookiein), cookieinlen, -@@ -1597,8 +1598,7 @@ static int doTunnelMigrate(struct qemud_ - QEMU_ASYNC_JOB_MIGRATION_OUT) < 0) - goto cleanup; - -- if (resource > 0 && -- qemuMonitorSetMigrationSpeed(priv->mon, resource) < 0) { -+ if (qemuMonitorSetMigrationSpeed(priv->mon, migrate_speed) < 0) { - qemuDomainObjExitMonitorWithDriver(driver, vm); - goto cleanup; - } diff --git a/1282bd80-mig-speed-2.patch b/1282bd80-mig-speed-2.patch deleted file mode 100644 index e108366..0000000 --- a/1282bd80-mig-speed-2.patch +++ /dev/null @@ -1,80 +0,0 @@ -commit 1282bd80f752b1b11e031881b7b64dea214a2461 -Author: Jim Fehlig -Date: Fri Aug 26 12:10:24 2011 -0600 - - virsh: Expose virDomainMigrateGetMaxSpeed API - -Index: libvirt-0.9.4/tools/virsh.c -=================================================================== ---- libvirt-0.9.4.orig/tools/virsh.c -+++ libvirt-0.9.4/tools/virsh.c -@@ -5200,6 +5200,45 @@ done: - return ret; - } - -+/* -+ * "migrate-getspeed" command -+ */ -+static const vshCmdInfo info_migrate_getspeed[] = { -+ {"help", N_("Get the maximum migration bandwidth")}, -+ {"desc", N_("Get the maximum migration bandwidth (in Mbps) for a domain.")}, -+ {NULL, NULL} -+}; -+ -+static const vshCmdOptDef opts_migrate_getspeed[] = { -+ {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")}, -+ {NULL, 0, 0, NULL} -+}; -+ -+static bool -+cmdMigrateGetMaxSpeed(vshControl *ctl, const vshCmd *cmd) -+{ -+ virDomainPtr dom = NULL; -+ unsigned long bandwidth; -+ bool ret = false; -+ -+ if (!vshConnectionUsability(ctl, ctl->conn)) -+ return false; -+ -+ if (!(dom = vshCommandOptDomain(ctl, cmd, NULL))) -+ return false; -+ -+ if (virDomainMigrateGetMaxSpeed(dom, &bandwidth, 0) < 0) -+ goto done; -+ -+ vshPrint(ctl, "%lu\n", bandwidth); -+ -+ ret = true; -+ -+done: -+ virDomainFree(dom); -+ return ret; -+} -+ - typedef enum { - VSH_CMD_BLOCK_JOB_ABORT = 0, - VSH_CMD_BLOCK_JOB_INFO = 1, -@@ -12519,6 +12558,8 @@ static const vshCmdDef domManagementCmds - opts_migrate_setmaxdowntime, info_migrate_setmaxdowntime, 0}, - {"migrate-setspeed", cmdMigrateSetMaxSpeed, - opts_migrate_setspeed, info_migrate_setspeed, 0}, -+ {"migrate-getspeed", cmdMigrateGetMaxSpeed, -+ opts_migrate_getspeed, info_migrate_getspeed, 0}, - {"reboot", cmdReboot, opts_reboot, info_reboot, 0}, - {"restore", cmdRestore, opts_restore, info_restore, 0}, - {"resume", cmdResume, opts_resume, info_resume, 0}, -Index: libvirt-0.9.4/tools/virsh.pod -=================================================================== ---- libvirt-0.9.4.orig/tools/virsh.pod -+++ libvirt-0.9.4/tools/virsh.pod -@@ -619,6 +619,10 @@ to be down at the end of live migration. - Set the maximum migration bandwidth (in Mbps) for a domain which is being - migrated to another host. - -+=item B I -+ -+Get the maximum migration bandwidth (in Mbps) for a domain. -+ - =item B I - - Reboot a domain. This acts just as if the domain had the B diff --git a/32620dab-fix-xen-err-msg.patch b/32620dab-fix-xen-err-msg.patch deleted file mode 100644 index 7eee71d..0000000 --- a/32620dab-fix-xen-err-msg.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 32620dabb12df70e14a645c20797b7658cd89e02 -Author: Jim Fehlig -Date: Thu Sep 1 16:22:38 2011 -0600 - - Don't overwrite errors from xend_{get,req} - - xenDaemonDomainFetch() was overwriting errors reported by - xend_get() and xend_req(). E.g. without patch - - error: failed Xen syscall xenDaemonDomainFetch failed to find this domain - - with patch - - error: internal error Xend returned HTTP Content-Length of 73817, which exceeds - maximum of 65536 - -diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c -index f44d674..957cd17 100644 ---- a/src/xen/xend_internal.c -+++ b/src/xen/xend_internal.c -@@ -359,8 +359,10 @@ xend_get(virConnectPtr xend, const char *path, - ret = xend_req(s, content); - VIR_FORCE_CLOSE(s); - -- if (((ret < 0) || (ret >= 300)) && -- ((ret != 404) || (!STRPREFIX(path, "/xend/domain/")))) { -+ if (ret < 0) -+ return ret; -+ -+ if ((ret >= 300) && ((ret != 404) || (!STRPREFIX(path, "/xend/domain/")))) { - virXendError(VIR_ERR_GET_FAILED, - _("%d status from xen daemon: %s:%s"), - ret, path, NULLSTR(*content)); -@@ -1810,12 +1812,8 @@ xenDaemonDomainFetch(virConnectPtr conn, - root = sexpr_get(conn, "/xend/domain/%s?detail=1", name); - else - root = sexpr_get(conn, "/xend/domain/%d?detail=1", domid); -- if (root == NULL) { -- virXendError(VIR_ERR_XEN_CALL, -- "%s", _("xenDaemonDomainFetch failed to" -- " find this domain")); -+ if (root == NULL) - return (NULL); -- } - - priv = (xenUnifiedPrivatePtr) conn->privateData; - diff --git a/57c95175-xend-buff-size.patch b/57c95175-xend-buff-size.patch deleted file mode 100644 index e5d4b1d..0000000 --- a/57c95175-xend-buff-size.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 57c95175e271ca63b3f1be44efef8997f20ffe13 -Author: Jim Fehlig -Date: Thu Sep 1 16:40:46 2011 -0600 - - Increase size of buffer for xend response - - On systems with many pcpus, the sexpr returned by xend can be quite - large for dom0 when it is configured to have #vcpus = #pcpus (default). - E.g. on a 80 pcpu system, where dom0 had 80 vcpus, the sexpr details - for dom0 was 73817 bytes! Increase maximum buffer size to 256k. - -diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c -index 957cd17..0a7fb48 100644 ---- a/src/xen/xend_internal.c -+++ b/src/xen/xend_internal.c -@@ -56,7 +56,7 @@ - * The number of Xen scheduler parameters - */ - --#define XEND_RCV_BUF_MAX_LEN 65536 -+#define XEND_RCV_BUF_MAX_LEN (256 * 1024) - - static int - virDomainXMLDevID(virDomainPtr domain, diff --git a/6f84e110-mig-speed-3.patch b/6f84e110-mig-speed-3.patch deleted file mode 100644 index 19e30b7..0000000 --- a/6f84e110-mig-speed-3.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 6f84e110d61e6e99ee80809f1d3c2c6dde352965 -Author: Jim Fehlig -Date: Fri Aug 26 12:10:22 2011 -0600 - - Store max migration bandwidth in qemuDomainObjPrivate struct - - The maximum bandwidth that can be consumed when migrating a domain - is better classified as an operational vs configuration parameter of - the dommain. As such, store this parameter in qemuDomainObjPrivate - structure. - -Index: libvirt-0.9.4/src/qemu/qemu_domain.c -=================================================================== ---- libvirt-0.9.4.orig/src/qemu/qemu_domain.c -+++ libvirt-0.9.4/src/qemu/qemu_domain.c -@@ -215,6 +215,8 @@ static void *qemuDomainObjPrivateAlloc(v - if (qemuDomainObjInitJob(priv) < 0) - VIR_FREE(priv); - -+ priv->migMaxBandwidth = QEMU_DOMAIN_DEFAULT_MIG_BANDWIDTH_MAX; -+ - return priv; - } - -Index: libvirt-0.9.4/src/qemu/qemu_domain.h -=================================================================== ---- libvirt-0.9.4.orig/src/qemu/qemu_domain.h -+++ libvirt-0.9.4/src/qemu/qemu_domain.h -@@ -36,6 +36,9 @@ - (1 << VIR_DOMAIN_VIRT_KVM) | \ - (1 << VIR_DOMAIN_VIRT_XEN)) - -+# define QEMU_DOMAIN_DEFAULT_MIG_BANDWIDTH_MAX (32 << 20) -+# define QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024)) -+ - # define JOB_MASK(job) (1 << (job - 1)) - # define DEFAULT_JOB_MASK \ - (JOB_MASK(QEMU_JOB_QUERY) | \ -@@ -113,6 +116,8 @@ struct _qemuDomainObjPrivate { - char *lockState; - - bool fakeReboot; -+ -+ unsigned long migMaxBandwidth; - }; - - struct qemuDomainWatchdogEvent diff --git a/6ff9fc26-quiet-libxl-logging.patch b/6ff9fc26-quiet-libxl-logging.patch deleted file mode 100644 index bb26d67..0000000 --- a/6ff9fc26-quiet-libxl-logging.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 6ff9fc26d3672cd6e822a20a70d9d36ee3e0c173 -Author: Daniel P. Berrange -Date: Wed Aug 31 16:53:09 2011 +0100 - - Stop libxl driver polluting logs on non-Xen hosts - - If the libxl driver is compiled in, then everytime libvirtd - starts up on a non-Xen Dom0 host, it logs a error message. - Since this is an expected condition, we should not log at - 'error' level, only 'info'. - - * src/libxl/libxl_driver.c: Lower log level for certain - expected errors during driver init - -diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c -index d6e0c28..91da438 100644 ---- a/src/libxl/libxl_driver.c -+++ b/src/libxl/libxl_driver.c -@@ -963,19 +963,19 @@ libxlStartup(int privileged) { - libxl_driver->logger = - (xentoollog_logger *)xtl_createlogger_stdiostream(libxl_driver->logger_file, XTL_DEBUG, 0); - if (!libxl_driver->logger) { -- VIR_ERROR(_("cannot create logger for libxenlight")); -+ VIR_INFO("cannot create logger for libxenlight, disabling driver"); - goto fail; - } - - if (libxl_ctx_init(&libxl_driver->ctx, - LIBXL_VERSION, - libxl_driver->logger)) { -- VIR_ERROR(_("cannot initialize libxenlight context")); -+ VIR_INFO("cannot initialize libxenlight context, probably not running in a Xen Dom0, disabling driver"); - goto fail; - } - - if ((ver_info = libxl_get_version_info(&libxl_driver->ctx)) == NULL) { -- VIR_ERROR(_("cannot version information from libxenlight")); -+ VIR_INFO("cannot version information from libxenlight, disabling driver"); - goto fail; - } - libxl_driver->version = (ver_info->xen_version_major * 1000000) + diff --git a/7e5f6a51-rpc-generator.patch b/7e5f6a51-rpc-generator.patch deleted file mode 100644 index 039eda1..0000000 --- a/7e5f6a51-rpc-generator.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit 7e5f6a516c1b0066206364655be31276056da147 -Author: Jim Fehlig -Date: Fri Aug 26 11:46:41 2011 -0600 - - Fix generator to cope with call-by-ref long types - - From: Matthias Bolte - Tested-by: Jim Fehlig - - Matthias provided this patch to fix an issue I encountered in the - generator with APIs containing call-by-ref long type, e.g. - - int virDomainMigrateGetMaxSpeed(virDomainPtr domain, - unsigned long *bandwidth, - unsigned int flags); - -diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl -index 0d344e8..f671ff0 100755 ---- a/src/rpc/gendispatch.pl -+++ b/src/rpc/gendispatch.pl -@@ -640,10 +640,11 @@ elsif ($opt_b) { - } elsif ($ret_member =~ m/^(?:unsigned )?hyper (\S+)<\S+>;/) { - # error out on unannotated arrays - die "hyper array without insert@ annotation: $ret_member"; -- } elsif ($ret_member =~ m/^(unsigned )?hyper (\S+);/) { -+ } elsif ($ret_member =~ m/^(unsigned )?hyper (\S+);(?:\s*\/\*\s*insert@(\d+)\s*\*\/)?/) { - my $type_name = $1; - my $ret_name = $2; - my $ret_assign; -+ my $insert = $3; - - if (hyper_to_long($call->{ProcName}, "ret", $ret_name)) { - my $sign = ""; $sign = "U" if ($1); -@@ -657,7 +658,13 @@ elsif ($opt_b) { - - push(@vars_list, "$type_name $ret_name"); - push(@ret_list, $ret_assign); -- $single_ret_var = $ret_name; -+ -+ if ($insert) { -+ splice(@args_list, int($insert), 0, "&$ret_name"); -+ $single_ret_var = undef; -+ } else { -+ $single_ret_var = $ret_name; -+ } - - if ($call->{ProcName} eq "DomainGetMaxMemory" or - $call->{ProcName} eq "NodeGetFreeMemory") { -@@ -1285,6 +1292,24 @@ elsif ($opt_k) { - - $single_ret_var = "int rv = -1"; - $single_ret_type = "int"; -+ } elsif ($ret_member =~ m/^(unsigned )?hyper (\S+);\s*\/\*\s*insert@(\d+)\s*\*\//) { -+ my $type_name = $1; -+ my $sign = ""; $sign = "U" if ($1); -+ my $ret_name = $2; -+ my $insert = $3; -+ -+ if (hyper_to_long($call->{ProcName}, "ret", $ret_name)) { -+ $type_name .= "long"; -+ push(@ret_list, "if ($ret_name) HYPER_TO_${sign}LONG(*$ret_name, ret.$ret_name);"); -+ } else { -+ $type_name .= "long long"; -+ push(@ret_list, "if ($ret_name) *$ret_name = ret.$ret_name;"); -+ } -+ -+ splice(@args_list, int($insert), 0, ("$type_name *$ret_name")); -+ push(@ret_list, "rv = 0;"); -+ $single_ret_var = "int rv = -1"; -+ $single_ret_type = "int"; - } elsif ($ret_member =~ m/^unsigned hyper (\S+);/) { - my $ret_name = $1; - diff --git a/7f2498ef-no-log-invalid.patch b/7f2498ef-no-log-invalid.patch deleted file mode 100644 index 44392f3..0000000 --- a/7f2498ef-no-log-invalid.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 7f2498efe45505135ed75c6548c21a89674cb6ba -Author: Daniel Veillard -Date: Tue Sep 13 18:24:13 2011 +0800 - - Do not log invalid operations in libvirtd logs - - This is a bit painful for example when starting virt-manager - it tends to clutter libvirtd.log with invalid operation on cpu pinning - for defined but not running domains. A priori those kind of errors - don't indicate an error when executing the command but on a precondition - for running the API, and honnestly while the application should report - it, logging it as an error in libvirtd.log is not really useful, - - Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=590807 - - * daemon/libvirtd.c: extend daemonErrorLogFilter() to filter out - errors of type VIR_ERR_OPERATION_INVALID - -Index: libvirt-0.9.4/daemon/libvirtd.c -=================================================================== ---- libvirt-0.9.4.orig/daemon/libvirtd.c -+++ libvirt-0.9.4/daemon/libvirtd.c -@@ -392,6 +392,7 @@ static int daemonErrorLogFilter(virError - case VIR_ERR_NO_NWFILTER: - case VIR_ERR_NO_SECRET: - case VIR_ERR_NO_DOMAIN_SNAPSHOT: -+ case VIR_ERR_OPERATION_INVALID: - return VIR_LOG_DEBUG; - } - diff --git a/829bce17-mig-speed-4.patch b/829bce17-mig-speed-4.patch deleted file mode 100644 index ce1310b..0000000 --- a/829bce17-mig-speed-4.patch +++ /dev/null @@ -1,59 +0,0 @@ -commit 829bce174c8a958dee4eb5b1fea63e0f5f914af8 -Author: Jim Fehlig -Date: Fri Aug 26 12:10:23 2011 -0600 - - Impl virDomainMigrateGetMaxSpeed in qemu driver - -Index: libvirt-0.9.4/src/qemu/qemu_driver.c -=================================================================== ---- libvirt-0.9.4.orig/src/qemu/qemu_driver.c -+++ libvirt-0.9.4/src/qemu/qemu_driver.c -@@ -8329,6 +8329,40 @@ static int qemuDomainSnapshotSetCurrentI - } - - -+static int -+qemuDomainMigrateGetMaxSpeed(virDomainPtr dom, -+ unsigned long *bandwidth, -+ unsigned int flags) -+{ -+ struct qemud_driver *driver = dom->conn->privateData; -+ virDomainObjPtr vm; -+ qemuDomainObjPrivatePtr priv; -+ int ret = -1; -+ -+ virCheckFlags(0, -1); -+ -+ qemuDriverLock(driver); -+ vm = virDomainFindByUUID(&driver->domains, dom->uuid); -+ qemuDriverUnlock(driver); -+ -+ if (!vm) { -+ char uuidstr[VIR_UUID_STRING_BUFLEN]; -+ virUUIDFormat(dom->uuid, uuidstr); -+ qemuReportError(VIR_ERR_NO_DOMAIN, -+ _("no domain with matching uuid '%s'"), uuidstr); -+ goto cleanup; -+ } -+ -+ priv = vm->privateData; -+ *bandwidth = priv->migMaxBandwidth; -+ ret = 0; -+ -+cleanup: -+ if (vm) -+ virDomainObjUnlock(vm); -+ return ret; -+} -+ - static int qemuDomainSnapshotIsAllowed(virDomainObjPtr vm) - { - int i; -@@ -9494,6 +9528,7 @@ static virDriver qemuDriver = { - .domainAbortJob = qemuDomainAbortJob, /* 0.7.7 */ - .domainMigrateSetMaxDowntime = qemuDomainMigrateSetMaxDowntime, /* 0.8.0 */ - .domainMigrateSetMaxSpeed = qemuDomainMigrateSetMaxSpeed, /* 0.9.0 */ -+ .domainMigrateGetMaxSpeed = qemuDomainMigrateGetMaxSpeed, /* 0.9.5 */ - .domainEventRegisterAny = qemuDomainEventRegisterAny, /* 0.8.0 */ - .domainEventDeregisterAny = qemuDomainEventDeregisterAny, /* 0.8.0 */ - .domainManagedSave = qemuDomainManagedSave, /* 0.8.0 */ diff --git a/8fc40c51-mig-speed-5.patch b/8fc40c51-mig-speed-5.patch deleted file mode 100644 index f321821..0000000 --- a/8fc40c51-mig-speed-5.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit 8fc40c511c08143cb64ff0d212942dde8e81c279 -Author: Jim Fehlig -Date: Fri Aug 26 12:10:25 2011 -0600 - - Save migration speed in qemuDomainMigrateSetMaxSpeed - - Now that migration speed is stored in qemuDomainObjPrivate structure, - save the new value when invoking qemuDomainMigrateSetMaxSpeed(). - - Allow setting migration speed on inactive domain too. - -Index: libvirt-0.9.4/src/qemu/qemu_driver.c -=================================================================== ---- libvirt-0.9.4.orig/src/qemu/qemu_driver.c -+++ libvirt-0.9.4/src/qemu/qemu_driver.c -@@ -8202,32 +8202,26 @@ qemuDomainMigrateSetMaxSpeed(virDomainPt - return -1; - } - -- if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MIGRATION_OP) < 0) -- goto cleanup; -- -- if (!virDomainObjIsActive(vm)) { -- qemuReportError(VIR_ERR_OPERATION_INVALID, -- "%s", _("domain is not running")); -- goto endjob; -- } -- - priv = vm->privateData; -- -- if (priv->job.asyncJob != QEMU_ASYNC_JOB_MIGRATION_OUT) { -- qemuReportError(VIR_ERR_OPERATION_INVALID, -- "%s", _("domain is not being migrated")); -- goto endjob; -+ if (virDomainObjIsActive(vm)) { -+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MIGRATION_OP) < 0) -+ goto cleanup; -+ -+ VIR_DEBUG("Setting migration bandwidth to %luMbs", bandwidth); -+ qemuDomainObjEnterMonitor(driver, vm); -+ ret = qemuMonitorSetMigrationSpeed(priv->mon, bandwidth); -+ qemuDomainObjExitMonitor(driver, vm); -+ -+ if (ret == 0) -+ priv->migMaxBandwidth = bandwidth; -+ -+ if (qemuDomainObjEndJob(driver, vm) == 0) -+ vm = NULL; -+ } else { -+ priv->migMaxBandwidth = bandwidth; -+ ret = 0; - } - -- VIR_DEBUG("Setting migration bandwidth to %luMbs", bandwidth); -- qemuDomainObjEnterMonitor(driver, vm); -- ret = qemuMonitorSetMigrationSpeed(priv->mon, bandwidth); -- qemuDomainObjExitMonitor(driver, vm); -- --endjob: -- if (qemuDomainObjEndJob(driver, vm) == 0) -- vm = NULL; -- - cleanup: - if (vm) - virDomainObjUnlock(vm); diff --git a/9e093f0b-libvirtd-sighup.patch b/9e093f0b-libvirtd-sighup.patch deleted file mode 100644 index 9cae09e..0000000 --- a/9e093f0b-libvirtd-sighup.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit 9e093f0b4cc5a5fc455a4893d73dc0f2c5355161 -Author: Osier Yang -Date: Mon Aug 15 15:40:46 2011 +0800 - - daemon: Fix regression of libvirtd reloading support - - This is introduced by commit df0b57a95a, which forgot to - add signal handler for SIGHUP. - - A simple reproduce method: - - 1) Create a domain XML under /etc/libvirt/qemu - 2) % kill -SIGHUP $(pidof libvirtd) - 3) % virsh list --all (the new created domain XML is not listed) - -Index: libvirt-0.9.4/daemon/libvirtd.c -=================================================================== ---- libvirt-0.9.4.orig/daemon/libvirtd.c -+++ libvirt-0.9.4/daemon/libvirtd.c -@@ -1139,6 +1139,17 @@ static void daemonShutdownHandler(virNet - virNetServerQuit(srv); - } - -+static void daemonReloadHandler(virNetServerPtr srv ATTRIBUTE_UNUSED, -+ siginfo_t *sig ATTRIBUTE_UNUSED, -+ void *opaque ATTRIBUTE_UNUSED) -+{ -+ VIR_INFO("Reloading configuration on SIGHUP"); -+ virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", -+ VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL); -+ if (virStateReload() < 0) -+ VIR_WARN("Error while reloading drivers"); -+} -+ - static int daemonSetupSignals(virNetServerPtr srv) - { - if (virNetServerAddSignalHandler(srv, SIGINT, daemonShutdownHandler, NULL) < 0) -@@ -1147,6 +1158,8 @@ static int daemonSetupSignals(virNetServ - return -1; - if (virNetServerAddSignalHandler(srv, SIGTERM, daemonShutdownHandler, NULL) < 0) - return -1; -+ if (virNetServerAddSignalHandler(srv, SIGHUP, daemonReloadHandler, NULL) < 0) -+ return -1; - return 0; - } - diff --git a/b12354be-mig-speed-1.patch b/b12354be-mig-speed-1.patch deleted file mode 100644 index 2160408..0000000 --- a/b12354be-mig-speed-1.patch +++ /dev/null @@ -1,292 +0,0 @@ -commit b12354befee9f8e88d3d5d96390856af8f05eb2f -Author: Jim Fehlig -Date: Fri Aug 26 12:10:21 2011 -0600 - - Add public API for getting migration speed - - Includes impl of python binding since the generator was not - able to cope. - - Note: Requires gendispatch.pl patch from Matthias Bolte - - https://www.redhat.com/archives/libvir-list/2011-August/msg01367.html - -Index: libvirt-0.9.4/docs/apibuild.py -=================================================================== ---- libvirt-0.9.4.orig/docs/apibuild.py -+++ libvirt-0.9.4/docs/apibuild.py -@@ -1643,7 +1643,8 @@ class CParser: - "virDomainSetMemory" : (False, ("memory")), - "virDomainSetMemoryFlags" : (False, ("memory")), - "virDomainBlockJobSetSpeed" : (False, ("bandwidth")), -- "virDomainBlockPull" : (False, ("bandwidth")) } -+ "virDomainBlockPull" : (False, ("bandwidth")), -+ "virDomainMigrateGetMaxSpeed" : (False, ("bandwidth")) } - - def checkLongLegacyFunction(self, name, return_type, signature): - if "long" in return_type and "long long" not in return_type: -Index: libvirt-0.9.4/include/libvirt/libvirt.h.in -=================================================================== ---- libvirt-0.9.4.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.9.4/include/libvirt/libvirt.h.in -@@ -711,6 +711,10 @@ int virDomainMigrateSetMaxSpeed(virDomai - unsigned long bandwidth, - unsigned int flags); - -+int virDomainMigrateGetMaxSpeed(virDomainPtr domain, -+ unsigned long *bandwidth, -+ unsigned int flags); -+ - /** - * VIR_NODEINFO_MAXCPUS: - * @nodeinfo: virNodeInfo instance -Index: libvirt-0.9.4/python/generator.py -=================================================================== ---- libvirt-0.9.4.orig/python/generator.py -+++ libvirt-0.9.4/python/generator.py -@@ -372,6 +372,7 @@ skip_impl = ( - 'virNodeGetCPUStats', - 'virNodeGetMemoryStats', - 'virDomainGetBlockJobInfo', -+ 'virDomainMigrateGetMaxSpeed', - ) - - -Index: libvirt-0.9.4/python/libvirt-override-api.xml -=================================================================== ---- libvirt-0.9.4.orig/python/libvirt-override-api.xml -+++ libvirt-0.9.4/python/libvirt-override-api.xml -@@ -356,5 +356,11 @@ - - - -+ -+ Get currently configured maximum migration speed for a domain -+ -+ -+ -+ - - -Index: libvirt-0.9.4/python/libvirt-override.c -=================================================================== ---- libvirt-0.9.4.orig/python/libvirt-override.c -+++ libvirt-0.9.4/python/libvirt-override.c -@@ -4543,6 +4543,29 @@ libvirt_virDomainSendKey(PyObject *self - return py_retval; - } - -+static PyObject * -+libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -+ PyObject *py_retval; -+ int c_retval; -+ unsigned long bandwidth; -+ virDomainPtr domain; -+ PyObject *pyobj_domain; -+ -+ if (!PyArg_ParseTuple(args, (char *)"O:virDomainMigrateGetMaxSpeed", &pyobj_domain)) -+ return(NULL); -+ -+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); -+ -+ LIBVIRT_BEGIN_ALLOW_THREADS; -+ c_retval = virDomainMigrateGetMaxSpeed(domain, &bandwidth, 0); -+ LIBVIRT_END_ALLOW_THREADS; -+ -+ if (c_retval < 0) -+ return VIR_PY_INT_FAIL; -+ py_retval = libvirt_ulongWrap(bandwidth); -+ return(py_retval); -+} -+ - /************************************************************************ - * * - * The registration stuff * -@@ -4632,6 +4655,7 @@ static PyMethodDef libvirtMethods[] = { - {(char *) "virDomainRevertToSnapshot", libvirt_virDomainRevertToSnapshot, METH_VARARGS, NULL}, - {(char *) "virDomainGetBlockJobInfo", libvirt_virDomainGetBlockJobInfo, METH_VARARGS, NULL}, - {(char *) "virDomainSendKey", libvirt_virDomainSendKey, METH_VARARGS, NULL}, -+ {(char *) "virDomainMigrateGetMaxSpeed", libvirt_virDomainMigrateGetMaxSpeed, METH_VARARGS, NULL}, - {NULL, NULL, 0, NULL} - }; - -Index: libvirt-0.9.4/src/driver.h -=================================================================== ---- libvirt-0.9.4.orig/src/driver.h -+++ libvirt-0.9.4/src/driver.h -@@ -531,6 +531,11 @@ typedef int - unsigned int flags); - - typedef int -+ (*virDrvDomainMigrateGetMaxSpeed)(virDomainPtr domain, -+ unsigned long *bandwidth, -+ unsigned int flags); -+ -+typedef int - (*virDrvDomainEventRegisterAny)(virConnectPtr conn, - virDomainPtr dom, - int eventID, -@@ -827,6 +832,7 @@ struct _virDriver { - virDrvDomainGetJobInfo domainGetJobInfo; - virDrvDomainAbortJob domainAbortJob; - virDrvDomainMigrateSetMaxDowntime domainMigrateSetMaxDowntime; -+ virDrvDomainMigrateGetMaxSpeed domainMigrateGetMaxSpeed; - virDrvDomainMigrateSetMaxSpeed domainMigrateSetMaxSpeed; - virDrvDomainEventRegisterAny domainEventRegisterAny; - virDrvDomainEventDeregisterAny domainEventDeregisterAny; -Index: libvirt-0.9.4/src/libvirt.c -=================================================================== ---- libvirt-0.9.4.orig/src/libvirt.c -+++ libvirt-0.9.4/src/libvirt.c -@@ -15157,6 +15157,57 @@ error: - } - - /** -+ * virDomainMigrateGetMaxSpeed: -+ * @domain: a domain object -+ * @bandwidth: return value of current migration bandwidth limit in Mbps -+ * @flags: fine-tuning flags, currently unused, use 0 -+ * -+ * Get the current maximum bandwidth (in Mbps) that will be used if the -+ * domain is migrated. Not all hypervisors will support a bandwidth limit. -+ * -+ * Returns 0 in case of success, -1 otherwise. -+ */ -+int -+virDomainMigrateGetMaxSpeed(virDomainPtr domain, -+ unsigned long *bandwidth, -+ unsigned int flags) -+{ -+ virConnectPtr conn; -+ -+ VIR_DOMAIN_DEBUG(domain, "bandwidth = %p, flags=%x", bandwidth, flags); -+ -+ virResetLastError(); -+ -+ if (!VIR_IS_CONNECTED_DOMAIN(domain)) { -+ virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__); -+ virDispatchError(NULL); -+ return -1; -+ } -+ -+ if (!bandwidth) { -+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__); -+ goto error; -+ } -+ -+ conn = domain->conn; -+ if (conn->flags & VIR_CONNECT_RO) { -+ virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); -+ goto error; -+ } -+ -+ if (conn->driver->domainMigrateGetMaxSpeed) { -+ if (conn->driver->domainMigrateGetMaxSpeed(domain, bandwidth, flags) < 0) -+ goto error; -+ return 0; -+ } -+ -+ virLibConnError(VIR_ERR_NO_SUPPORT, __FUNCTION__); -+error: -+ virDispatchError(conn); -+ return -1; -+} -+ -+/** - * virConnectDomainEventRegisterAny: - * @conn: pointer to the connection - * @dom: pointer to the domain -Index: libvirt-0.9.4/src/libvirt_public.syms -=================================================================== ---- libvirt-0.9.4.orig/src/libvirt_public.syms -+++ libvirt-0.9.4/src/libvirt_public.syms -@@ -480,4 +480,9 @@ LIBVIRT_0.9.4 { - virDomainBlockPull; - } LIBVIRT_0.9.3; - -+LIBVIRT_0.9.5 { -+ global: -+ virDomainMigrateGetMaxSpeed; -+} LIBVIRT_0.9.4; -+ - # .... define new API here using predicted next version number .... -Index: libvirt-0.9.4/src/remote/remote_driver.c -=================================================================== ---- libvirt-0.9.4.orig/src/remote/remote_driver.c -+++ libvirt-0.9.4/src/remote/remote_driver.c -@@ -4327,6 +4327,7 @@ static virDriver remote_driver = { - .domainAbortJob = remoteDomainAbortJob, /* 0.7.7 */ - .domainMigrateSetMaxDowntime = remoteDomainMigrateSetMaxDowntime, /* 0.8.0 */ - .domainMigrateSetMaxSpeed = remoteDomainMigrateSetMaxSpeed, /* 0.9.0 */ -+ .domainMigrateGetMaxSpeed = remoteDomainMigrateGetMaxSpeed, /* 0.9.5 */ - .domainEventRegisterAny = remoteDomainEventRegisterAny, /* 0.8.0 */ - .domainEventDeregisterAny = remoteDomainEventDeregisterAny, /* 0.8.0 */ - .domainManagedSave = remoteDomainManagedSave, /* 0.8.0 */ -Index: libvirt-0.9.4/src/remote/remote_protocol.x -=================================================================== ---- libvirt-0.9.4.orig/src/remote/remote_protocol.x -+++ libvirt-0.9.4/src/remote/remote_protocol.x -@@ -1913,6 +1913,16 @@ struct remote_domain_migrate_set_max_spe - unsigned int flags; - }; - -+struct remote_domain_migrate_get_max_speed_args { -+ remote_nonnull_domain dom; -+ unsigned int flags; -+}; -+ -+struct remote_domain_migrate_get_max_speed_ret { -+ unsigned hyper bandwidth; /* insert@1 */ -+}; -+ -+ - struct remote_domain_events_register_any_args { - int eventID; - }; -@@ -2475,7 +2485,8 @@ enum remote_procedure { - REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED = 239, /* autogen autogen */ - REMOTE_PROC_DOMAIN_BLOCK_PULL = 240, /* autogen autogen */ - -- REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241 /* skipgen skipgen */ -+ REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241, /* skipgen skipgen */ -+ REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242 /* autogen autogen */ - - /* - * Notice how the entries are grouped in sets of 10 ? -Index: libvirt-0.9.4/src/remote_protocol-structs -=================================================================== ---- libvirt-0.9.4.orig/src/remote_protocol-structs -+++ libvirt-0.9.4/src/remote_protocol-structs -@@ -1429,6 +1429,14 @@ struct remote_domain_migrate_set_max_spe - uint64_t bandwidth; - u_int flags; - }; -+struct remote_domain_migrate_get_max_speed_args { -+ remote_nonnull_domain dom; -+ u_int flags; -+}; -+struct remote_domain_migrate_get_max_speed_ret { -+ uint64_t bandwidth; -+}; -+ - struct remote_domain_events_register_any_args { - int eventID; - }; -@@ -1936,4 +1944,5 @@ enum remote_procedure { - REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED = 239, - REMOTE_PROC_DOMAIN_BLOCK_PULL = 240, - REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241, -+ REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242, - }; -Index: libvirt-0.9.4/src/rpc/gendispatch.pl -=================================================================== ---- libvirt-0.9.4.orig/src/rpc/gendispatch.pl -+++ libvirt-0.9.4/src/rpc/gendispatch.pl -@@ -222,6 +222,7 @@ my $long_legacy = { - NodeGetInfo => { ret => { memory => 1 } }, - DomainBlockPull => { arg => { bandwidth => 1 } }, - DomainBlockJobSetSpeed => { arg => { bandwidth => 1 } }, -+ DomainMigrateGetMaxSpeed => { ret => { bandwidth => 1 } }, - }; - - sub hyper_to_long diff --git a/clone.patch b/clone.patch index 63e9c2a..5529a0f 100644 --- a/clone.patch +++ b/clone.patch @@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c =================================================================== --- src/lxc/lxc_container.c.orig +++ src/lxc/lxc_container.c -@@ -991,6 +991,9 @@ int lxcContainerStart(virDomainDefPtr de +@@ -1183,6 +1183,9 @@ int lxcContainerStart(virDomainDefPtr de handshakefd}; /* allocate a stack for the container */ @@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c if (VIR_ALLOC_N(stack, stacksize) < 0) { virReportOOMError(); return -1; -@@ -1009,7 +1012,11 @@ int lxcContainerStart(virDomainDefPtr de +@@ -1201,7 +1204,11 @@ int lxcContainerStart(virDomainDefPtr de cflags |= CLONE_NEWNET; } @@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c VIR_FREE(stack); VIR_DEBUG("clone() completed, new container PID is %d", pid); -@@ -1036,6 +1043,7 @@ int lxcContainerAvailable(int features) +@@ -1228,6 +1235,7 @@ int lxcContainerAvailable(int features) char *childStack; char *stack; int childStatus; @@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c if (features & LXC_CONTAINER_FEATURE_USER) flags |= CLONE_NEWUSER; -@@ -1043,14 +1051,21 @@ int lxcContainerAvailable(int features) +@@ -1235,14 +1243,21 @@ int lxcContainerAvailable(int features) if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; diff --git a/ef1065cf-mig-speed-6.patch b/ef1065cf-mig-speed-6.patch deleted file mode 100644 index 6af48f4..0000000 --- a/ef1065cf-mig-speed-6.patch +++ /dev/null @@ -1,55 +0,0 @@ -commit ef1065cf5acad13767c054758cbe7f4e8af5d241 -Author: Jim Fehlig -Date: Fri Aug 26 12:10:26 2011 -0600 - - Set qemu migration speed unlimited when migrating to file - - The qemu migration speed default is 32MiB/s as defined in migration.c - - /* Migration speed throttling */ - static int64_t max_throttle = (32 << 20); - - There's no need to throttle migration when targeting a file, so set migration - speed to unlimited prior to migration, and restore to libvirt default value - after migration. - - Default units is MB for migrate_set_speed monitor command, so - (INT64_MAX / (1024 * 1024)) is used for unlimited migration speed. - - Tested with both json and text monitors. - -Index: libvirt-0.9.4/src/qemu/qemu_migration.c -=================================================================== ---- libvirt-0.9.4.orig/src/qemu/qemu_migration.c -+++ libvirt-0.9.4/src/qemu/qemu_migration.c -@@ -2675,6 +2675,16 @@ qemuMigrationToFile(struct qemud_driver - bool restoreLabel = false; - virCommandPtr cmd = NULL; - int pipeFD[2] = { -1, -1 }; -+ unsigned long saveMigBandwidth = priv->migMaxBandwidth; -+ -+ /* Increase migration bandwidth to unlimited since target is a file. -+ * Failure to change migration speed is not fatal. */ -+ if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) { -+ qemuMonitorSetMigrationSpeed(priv->mon, -+ QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX); -+ priv->migMaxBandwidth = QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX; -+ qemuDomainObjExitMonitorWithDriver(driver, vm); -+ } - - if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATE_QEMU_FD) && - (!compressor || pipe(pipeFD) == 0)) { -@@ -2783,6 +2793,13 @@ qemuMigrationToFile(struct qemud_driver - ret = 0; - - cleanup: -+ /* Restore max migration bandwidth */ -+ if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) { -+ qemuMonitorSetMigrationSpeed(priv->mon, saveMigBandwidth); -+ priv->migMaxBandwidth = saveMigBandwidth; -+ qemuDomainObjExitMonitorWithDriver(driver, vm); -+ } -+ - VIR_FORCE_CLOSE(pipeFD[0]); - VIR_FORCE_CLOSE(pipeFD[1]); - virCommandFree(cmd); diff --git a/f84aedad-revert.patch b/f84aedad-revert.patch new file mode 100644 index 0000000..07e292b --- /dev/null +++ b/f84aedad-revert.patch @@ -0,0 +1,277 @@ +commit f887b0c4913b81c33a7d0a8cce3da09caf88ecbb +Author: Jim Fehlig +Date: Thu Sep 22 20:48:07 2011 -0600 + + Revert "qemu: Fix shutdown regression with buggy qemu" + + This reverts commit f84aedad090da1e05ccc5651815febba013eb3ad. + + The commit is not needed since the affected SUSE kvm packages + have the necessary qemu patch + + http://lists.nongnu.org/archive/html/qemu-devel/2011-09/msg01757.html + +diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c +index 850d46e..36f47a9 100644 +--- a/src/qemu/qemu_capabilities.c ++++ b/src/qemu/qemu_capabilities.c +@@ -136,7 +136,6 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST, + "pci-ohci", + "usb-redir", + "usb-hub", +- "no-shutdown", + ); + + struct qemu_feature_flags { +@@ -1009,13 +1008,6 @@ qemuCapsComputeCmdFlags(const char *help, + qemuCapsSet(flags, QEMU_CAPS_VHOST_NET); + } + +- /* Do not use -no-shutdown if qemu doesn't support it or SIGTERM handling +- * is most likely buggy when used with -no-shutdown (which applies for qemu +- * 0.14.* and 0.15.*) +- */ +- if (strstr(help, "-no-shutdown") && (version < 14000 || version > 15999)) +- qemuCapsSet(flags, QEMU_CAPS_NO_SHUTDOWN); +- + /* + * Handling of -incoming arg with varying features + * -incoming tcp (kvm >= 79, qemu >= 0.10.0) +diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h +index 74d3ab2..96b7a3b 100644 +--- a/src/qemu/qemu_capabilities.h ++++ b/src/qemu/qemu_capabilities.h +@@ -110,7 +110,6 @@ enum qemuCapsFlags { + QEMU_CAPS_PCI_OHCI = 71, /* -device pci-ohci */ + QEMU_CAPS_USB_REDIR = 72, /* -device usb-redir */ + QEMU_CAPS_USB_HUB = 73, /* -device usb-hub */ +- QEMU_CAPS_NO_SHUTDOWN = 74, /* usable -no-shutdown */ + + QEMU_CAPS_LAST, /* this must always be the last item */ + }; +diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c +index 0adc56a..ee4b52b 100644 +--- a/src/qemu/qemu_command.c ++++ b/src/qemu/qemu_command.c +@@ -3574,7 +3574,7 @@ qemuBuildCommandLine(virConnectPtr conn, + * when QEMU stops. If we use no-shutdown, then we can + * watch for this event and do a soft/warm reboot. + */ +- if (monitor_json && qemuCapsGet(qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) ++ if (monitor_json) + virCommandAddArg(cmd, "-no-shutdown"); + + if (!(def->features & (1 << VIR_DOMAIN_FEATURE_ACPI))) +diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c +index 0d0bea2..f87af06 100644 +--- a/src/qemu/qemu_driver.c ++++ b/src/qemu/qemu_driver.c +@@ -1556,12 +1556,6 @@ static int qemuDomainReboot(virDomainPtr dom, unsigned int flags) { + priv = vm->privateData; + + if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) { +- if (!qemuCapsGet(priv->qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) { +- qemuReportError(VIR_ERR_OPERATION_INVALID, "%s", +- _("Reboot is not supported with this QEMU binary")); +- goto cleanup; +- } +- + if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) + goto cleanup; + +diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c +index 933d556..f0b0879 100644 +--- a/tests/qemuhelptest.c ++++ b/tests/qemuhelptest.c +@@ -152,8 +152,7 @@ mymain(void) + QEMU_CAPS_KVM, + QEMU_CAPS_DRIVE_FORMAT, + QEMU_CAPS_MEM_PATH, +- QEMU_CAPS_TDF, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_TDF); + DO_TEST("kvm-83-rhel56", 9001, 1, 83, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -178,8 +177,7 @@ mymain(void) + QEMU_CAPS_TDF, + QEMU_CAPS_DRIVE_READONLY, + QEMU_CAPS_SMBIOS_TYPE, +- QEMU_CAPS_SPICE, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_SPICE); + DO_TEST("qemu-0.10.5", 10005, 0, 0, + QEMU_CAPS_KQEMU, + QEMU_CAPS_VNC_COLON, +@@ -198,8 +196,7 @@ mymain(void) + QEMU_CAPS_SDL, + QEMU_CAPS_RTC_TD_HACK, + QEMU_CAPS_NO_HPET, +- QEMU_CAPS_VGA_NONE, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_VGA_NONE); + DO_TEST("qemu-kvm-0.10.5", 10005, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -224,8 +221,7 @@ mymain(void) + QEMU_CAPS_NO_KVM_PIT, + QEMU_CAPS_TDF, + QEMU_CAPS_NESTING, +- QEMU_CAPS_VGA_NONE, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_VGA_NONE); + DO_TEST("kvm-86", 10050, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -250,8 +246,7 @@ mymain(void) + QEMU_CAPS_TDF, + QEMU_CAPS_NESTING, + QEMU_CAPS_SMBIOS_TYPE, +- QEMU_CAPS_VGA_NONE, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_VGA_NONE); + DO_TEST("qemu-kvm-0.11.0-rc2", 10092, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -281,8 +276,7 @@ mymain(void) + QEMU_CAPS_NESTING, + QEMU_CAPS_NAME_PROCESS, + QEMU_CAPS_SMBIOS_TYPE, +- QEMU_CAPS_VGA_NONE, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_VGA_NONE); + DO_TEST("qemu-0.12.1", 12001, 0, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -312,8 +306,7 @@ mymain(void) + QEMU_CAPS_SMBIOS_TYPE, + QEMU_CAPS_VGA_NONE, + QEMU_CAPS_MIGRATE_QEMU_FD, +- QEMU_CAPS_DRIVE_AIO, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_DRIVE_AIO); + DO_TEST("qemu-kvm-0.12.1.2-rhel60", 12001, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -357,8 +350,7 @@ mymain(void) + QEMU_CAPS_DEVICE_SPICEVMC, + QEMU_CAPS_PIIX3_USB_UHCI, + QEMU_CAPS_PIIX4_USB_UHCI, +- QEMU_CAPS_USB_HUB, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_USB_HUB); + DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -395,8 +387,7 @@ mymain(void) + QEMU_CAPS_SMBIOS_TYPE, + QEMU_CAPS_VGA_NONE, + QEMU_CAPS_MIGRATE_QEMU_FD, +- QEMU_CAPS_DRIVE_AIO, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_DRIVE_AIO); + DO_TEST("qemu-kvm-0.13.0", 13000, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -448,8 +439,7 @@ mymain(void) + QEMU_CAPS_PIIX4_USB_UHCI, + QEMU_CAPS_VT82C686B_USB_UHCI, + QEMU_CAPS_PCI_OHCI, +- QEMU_CAPS_USB_HUB, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_USB_HUB); + DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0, + QEMU_CAPS_VNC_COLON, + QEMU_CAPS_NO_REBOOT, +@@ -497,8 +487,7 @@ mymain(void) + QEMU_CAPS_VIRTIO_IOEVENTFD, + QEMU_CAPS_PIIX3_USB_UHCI, + QEMU_CAPS_PIIX4_USB_UHCI, +- QEMU_CAPS_USB_HUB, +- QEMU_CAPS_NO_SHUTDOWN); ++ QEMU_CAPS_USB_HUB); + + return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; + } +diff --git a/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args b/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args +index e04cdec..8d8e43e 100644 +--- a/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args ++++ b/tests/qemuxml2argvdata/qemuxml2argv-monitor-json.args +@@ -1,5 +1,5 @@ + LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ + pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,\ + id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,\ +-id=monitor,mode=control -no-acpi -boot c -hda /dev/hda1 -usb -device \ ++id=monitor,mode=control -no-shutdown -no-acpi -boot c -hda /dev/hda1 -usb -device \ + virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +diff --git a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.args b/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.args +deleted file mode 100644 +index 1464d09..0000000 +--- a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.args ++++ /dev/null +@@ -1,21 +0,0 @@ +-LC_ALL=C \ +-PATH=/bin \ +-HOME=/home/test \ +-USER=test \ +-LOGNAME=test \ +-/usr/bin/qemu \ +--S \ +--M pc \ +--m 214 \ +--smp 1 \ +--nographic \ +--nodefconfig \ +--nodefaults \ +--chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +--mon chardev=charmonitor,id=monitor,mode=control \ +--no-shutdown \ +--no-acpi \ +--boot c \ +--hda /dev/hda1 \ +--usb \ +--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +diff --git a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.xml b/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.xml +deleted file mode 100644 +index 1901715..0000000 +--- a/tests/qemuxml2argvdata/qemuxml2argv-no-shutdown.xml ++++ /dev/null +@@ -1,24 +0,0 @@ +- +- encryptdisk +- 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 +- 219100 +- 219100 +- 1 +- +- hvm +- +- +- +- destroy +- restart +- destroy +- +- /usr/bin/qemu +- +- +- +- +- +- +- +- +diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c +index 1dc6a01..fcb20bb 100644 +--- a/tests/qemuxml2argvtest.c ++++ b/tests/qemuxml2argvtest.c +@@ -578,9 +578,6 @@ mymain(void) + json = true; + DO_TEST("monitor-json", false, QEMU_CAPS_DEVICE, + QEMU_CAPS_CHARDEV, QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_NODEFCONFIG); +- DO_TEST("no-shutdown", false, QEMU_CAPS_DEVICE, +- QEMU_CAPS_CHARDEV, QEMU_CAPS_MONITOR_JSON, QEMU_CAPS_NODEFCONFIG, +- QEMU_CAPS_NO_SHUTDOWN); + json = false; + + free(driver.stateDir); diff --git a/libvirt-0.9.4.tar.bz2 b/libvirt-0.9.4.tar.bz2 deleted file mode 100644 index 462b216..0000000 --- a/libvirt-0.9.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0da7dedb7d36ddb452ec33ed24203fcdb3ca6b7284524190ac0b70c96a505ad -size 11518513 diff --git a/libvirt-0.9.6.tar.bz2 b/libvirt-0.9.6.tar.bz2 new file mode 100644 index 0000000..5df1b94 --- /dev/null +++ b/libvirt-0.9.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44196cc4445f141b5f7f5f45b16ac476e7a2e0c994248714da6818e277f90495 +size 12058512 diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index 902ba8d..838e90a 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.9.4/configure.ac +Index: libvirt-0.9.5/configure.ac =================================================================== ---- libvirt-0.9.4.orig/configure.ac -+++ libvirt-0.9.4/configure.ac +--- libvirt-0.9.5.orig/configure.ac ++++ libvirt-0.9.5/configure.ac @@ -63,6 +63,7 @@ AVAHI_REQUIRED="0.6.0" POLKIT_REQUIRED="0.6" PARTED_REQUIRED="1.8.0" @@ -10,7 +10,7 @@ Index: libvirt-0.9.4/configure.ac UDEV_REQUIRED=145 PCIACCESS_REQUIRED=0.10.0 XMLRPC_REQUIRED=1.14.0 -@@ -1591,6 +1592,38 @@ AM_CONDITIONAL([WITH_NETCF], [test "$wit +@@ -1593,6 +1594,38 @@ AM_CONDITIONAL([WITH_NETCF], [test "$wit AC_SUBST([NETCF_CFLAGS]) AC_SUBST([NETCF_LIBS]) @@ -49,7 +49,7 @@ Index: libvirt-0.9.4/configure.ac AC_ARG_WITH([secrets], AC_HELP_STRING([--with-secrets], [with local secrets management driver @<:@default=yes@:>@]),[],[with_secrets=yes]) -@@ -2460,6 +2493,7 @@ AC_MSG_NOTICE([ Remote: $with_remote]) +@@ -2517,6 +2550,7 @@ AC_MSG_NOTICE([ Remote: $with_remote]) AC_MSG_NOTICE([ Network: $with_network]) AC_MSG_NOTICE([Libvirtd: $with_libvirtd]) AC_MSG_NOTICE([ netcf: $with_netcf]) @@ -57,7 +57,7 @@ Index: libvirt-0.9.4/configure.ac AC_MSG_NOTICE([ macvtap: $with_macvtap]) AC_MSG_NOTICE([virtport: $with_virtualport]) AC_MSG_NOTICE([]) -@@ -2586,6 +2620,11 @@ AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $ +@@ -2648,6 +2682,11 @@ AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $ else AC_MSG_NOTICE([ netcf: no]) fi @@ -69,10 +69,10 @@ Index: libvirt-0.9.4/configure.ac if test "$with_qemu" = "yes" && test "$LIBPCAP_FOUND" != "no"; then AC_MSG_NOTICE([ pcap: $LIBPCAP_CFLAGS $LIBPCAP_LIBS]) else -Index: libvirt-0.9.4/daemon/Makefile.am +Index: libvirt-0.9.5/daemon/Makefile.am =================================================================== ---- libvirt-0.9.4.orig/daemon/Makefile.am -+++ libvirt-0.9.4/daemon/Makefile.am +--- libvirt-0.9.5.orig/daemon/Makefile.am ++++ libvirt-0.9.5/daemon/Makefile.am @@ -141,6 +141,10 @@ endif if WITH_NETCF @@ -84,11 +84,11 @@ Index: libvirt-0.9.4/daemon/Makefile.am endif if WITH_NODE_DEVICES -Index: libvirt-0.9.4/daemon/libvirtd.c +Index: libvirt-0.9.5/daemon/libvirtd.c =================================================================== ---- libvirt-0.9.4.orig/daemon/libvirtd.c -+++ libvirt-0.9.4/daemon/libvirtd.c -@@ -74,6 +74,10 @@ +--- libvirt-0.9.5.orig/daemon/libvirtd.c ++++ libvirt-0.9.5/daemon/libvirtd.c +@@ -75,6 +75,10 @@ # endif # ifdef WITH_NETCF # include "interface/netcf_driver.h" @@ -99,7 +99,7 @@ Index: libvirt-0.9.4/daemon/libvirtd.c # endif # ifdef WITH_STORAGE_DIR # include "storage/storage_driver.h" -@@ -428,6 +432,10 @@ static void daemonInitialize(void) +@@ -393,6 +397,10 @@ static void daemonInitialize(void) # endif # ifdef WITH_NETCF interfaceRegister(); @@ -110,11 +110,11 @@ Index: libvirt-0.9.4/daemon/libvirtd.c # endif # ifdef WITH_STORAGE_DIR storageRegister(); -Index: libvirt-0.9.4/src/Makefile.am +Index: libvirt-0.9.5/src/Makefile.am =================================================================== ---- libvirt-0.9.4.orig/src/Makefile.am -+++ libvirt-0.9.4/src/Makefile.am -@@ -870,6 +870,24 @@ libvirt_driver_interface_la_LIBADD += .. +--- libvirt-0.9.5.orig/src/Makefile.am ++++ libvirt-0.9.5/src/Makefile.am +@@ -923,6 +923,24 @@ libvirt_driver_interface_la_LIBADD += .. libvirt_driver_interface_la_LDFLAGS += -module -avoid-version endif libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES) @@ -139,10 +139,10 @@ Index: libvirt-0.9.4/src/Makefile.am endif if WITH_SECRETS -Index: libvirt-0.9.4/src/interface/netcf_driver.c +Index: libvirt-0.9.5/src/interface/netcf_driver.c =================================================================== ---- libvirt-0.9.4.orig/src/interface/netcf_driver.c -+++ libvirt-0.9.4/src/interface/netcf_driver.c +--- libvirt-0.9.5.orig/src/interface/netcf_driver.c ++++ libvirt-0.9.5/src/interface/netcf_driver.c @@ -23,7 +23,13 @@ #include @@ -208,11 +208,11 @@ Index: libvirt-0.9.4/src/interface/netcf_driver.c /* open netcf */ if (ncf_init(&driverState->netcf, NULL) != 0) { -Index: libvirt-0.9.4/tools/virsh.c +Index: libvirt-0.9.5/tools/virsh.c =================================================================== ---- libvirt-0.9.4.orig/tools/virsh.c -+++ libvirt-0.9.4/tools/virsh.c -@@ -14904,6 +14904,10 @@ vshShowVersion(vshControl *ctl ATTRIBUTE +--- libvirt-0.9.5.orig/tools/virsh.c ++++ libvirt-0.9.5/tools/virsh.c +@@ -16001,6 +16001,10 @@ vshShowVersion(vshControl *ctl ATTRIBUTE #endif #ifdef WITH_NETCF vshPrint(ctl, " Netcf"); diff --git a/libvirt.changes b/libvirt.changes index ee37f1c..df34e7f 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,8 +1,33 @@ +------------------------------------------------------------------- +Thu Sep 22 21:08:11 MDT 2011 - jfehlig@suse.com + +- Revert upstream commit f84aedad, which is not needed since + affected SUSE kvm packages have the necessary qemu fix + f84aedad-revert.patch + +------------------------------------------------------------------- +Thu Sep 22 20:43:51 MDT 2011 - jfehlig@suse.com + +- Update to libvirt 0.9.6 + - Fix shutdown regression with buggy qemu + ------------------------------------------------------------------- Wed Sep 21 20:12:16 UTC 2011 - andrea.turrini@gmail.com - Fixed typos in libvirt.spec +------------------------------------------------------------------- +Tue Sep 20 11:51:44 MDT 2011 - jfehlig@suse.com + +- Update to libvirt 0.9.5 + - many snapshot improvements + - latency: Define new public API and structure + - USB2 and various USB improvements + - storage: Add fs pool formatting + - Add public API for getting migration speed + - Add basic driver for Microsoft Hyper-V + - Many bug fixes and improvements + ------------------------------------------------------------------- Fri Sep 16 12:50:51 MDT 2011 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index b0ac6f1..0f6ee28 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -48,6 +48,7 @@ %define with_phyp 0%{!?_without_phyp:0} %define with_esx 0%{!?_without_esx:1} %define with_xenapi 0%{!?_without_xenapi:1} +%define with_hyperv 0%{!?_without_hyperv:0} # Then the secondary host drivers %define with_network 0%{!?_without_network:%{server_drivers}} @@ -246,6 +247,9 @@ BuildRequires: libyajl-devel %if %{with_esx} BuildRequires: libcurl-devel %endif +%if %{with_hyperv} +BuildRequires: libwsman-devel >= 2.2.3 +%endif %if %{with_capng} BuildRequires: libcap-ng-devel >= 0.5.0 %endif @@ -302,8 +306,8 @@ Url: http://libvirt.org/ License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.9.4 -Release: 3 +Version: 0.9.6 +Release: 1 Summary: A C toolkit to interact with the virtualization capabilities of Linux Conflicts: kvm < 0.14.1 @@ -370,19 +374,6 @@ Source1: libvirtd.init Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches -Patch0: 9e093f0b-libvirtd-sighup.patch -Patch1: 32620dab-fix-xen-err-msg.patch -Patch2: 57c95175-xend-buff-size.patch -Patch3: 6ff9fc26-quiet-libxl-logging.patch -Patch4: 7f2498ef-no-log-invalid.patch -Patch5: 7e5f6a51-rpc-generator.patch -Patch6: b12354be-mig-speed-1.patch -Patch7: 1282bd80-mig-speed-2.patch -Patch8: 6f84e110-mig-speed-3.patch -Patch9: 829bce17-mig-speed-4.patch -Patch10: 8fc40c51-mig-speed-5.patch -Patch11: ef1065cf-mig-speed-6.patch -Patch12: 0257ba8f-mig-speed-7.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: clone.patch @@ -391,6 +382,9 @@ Patch103: xend-disk-order.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: use-init-script-redhat.patch +# This patch reverts commit f84aedad, which is not needed since +# affected SUSE kvm packages have the necessary qemu fix. +Patch202: f84aedad-revert.patch %if %{with_apparmor} Patch250: install-apparmor-profiles.patch %endif @@ -482,6 +476,7 @@ Authors: Karel Zak %if %{with_python} + %package python License: LGPLv2.1+ Summary: A C toolkit to interact with the virtualization capabilities of Linux @@ -504,25 +499,13 @@ Authors: %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 %patch100 -p1 %patch101 %patch102 -p1 %patch103 -p1 %patch200 -p1 %patch201 -p1 +%patch202 -p1 %if %{with_apparmor} %patch250 -p1 %endif @@ -561,6 +544,9 @@ Authors: %if ! %{with_vmware} %define _without_vmware --without-vmware %endif +%if ! %{with_hyperv} +%define _without_hyperv --without-hyperv +%endif %if ! %{with_libxl} %define _without_libxl --without-libxl %endif @@ -644,6 +630,7 @@ export CFLAGS="$RPM_OPT_FLAGS" %{?_without_phyp} \ %{?_without_esx} \ %{?_without_vmware} \ + %{?_without_hyperv} \ %{?_without_libxl} \ %{?_without_libvirtd} \ %{?_without_storage_fs} \ @@ -794,6 +781,7 @@ fi %postun client -p /sbin/ldconfig %if %{with_libvirtd} + %files %defattr(-, root, root) %{_sbindir}/libvirtd @@ -889,19 +877,20 @@ fi %dir %{_datadir}/libvirt/ %dir %{_datadir}/libvirt/schemas/ -%{_datadir}/libvirt/schemas/domain.rng -%{_datadir}/libvirt/schemas/network.rng -%{_datadir}/libvirt/schemas/storagepool.rng -%{_datadir}/libvirt/schemas/storagevol.rng -%{_datadir}/libvirt/schemas/nodedev.rng +%{_datadir}/libvirt/schemas/basictypes.rng %{_datadir}/libvirt/schemas/capability.rng +%{_datadir}/libvirt/schemas/domain.rng +%{_datadir}/libvirt/schemas/domaincommon.rng +%{_datadir}/libvirt/schemas/domainsnapshot.rng %{_datadir}/libvirt/schemas/interface.rng +%{_datadir}/libvirt/schemas/network.rng +%{_datadir}/libvirt/schemas/networkcommon.rng +%{_datadir}/libvirt/schemas/nodedev.rng +%{_datadir}/libvirt/schemas/nwfilter.rng %{_datadir}/libvirt/schemas/secret.rng %{_datadir}/libvirt/schemas/storageencryption.rng -%{_datadir}/libvirt/schemas/nwfilter.rng -%{_datadir}/libvirt/schemas/domainsnapshot.rng -%{_datadir}/libvirt/schemas/basictypes.rng -%{_datadir}/libvirt/schemas/networkcommon.rng +%{_datadir}/libvirt/schemas/storagepool.rng +%{_datadir}/libvirt/schemas/storagevol.rng %{_datadir}/libvirt/cpu_map.xml %if %{with_sasl} %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf @@ -923,10 +912,12 @@ fi %doc %{_docdir}/%{name}/html %if %{with_python} + %files python %defattr(-, root, root) %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* +%{_libdir}/python*/site-packages/libvirt_qemu.py* %{py_sitedir}/libvirtmod* %endif diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index 5b14721..ffbf7a4 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.9.4/daemon/libvirtd.conf +Index: libvirt-0.9.5/daemon/libvirtd.conf =================================================================== ---- libvirt-0.9.4.orig/daemon/libvirtd.conf -+++ libvirt-0.9.4/daemon/libvirtd.conf +--- libvirt-0.9.5.orig/daemon/libvirtd.conf ++++ libvirt-0.9.5/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.9.4/daemon/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.9.4/daemon/libvirtd.c +Index: libvirt-0.9.5/daemon/libvirtd.c =================================================================== ---- libvirt-0.9.4.orig/daemon/libvirtd.c -+++ libvirt-0.9.4/daemon/libvirtd.c -@@ -881,7 +881,7 @@ daemonConfigNew(bool privileged ATTRIBUT +--- libvirt-0.9.5.orig/daemon/libvirtd.c ++++ libvirt-0.9.5/daemon/libvirtd.c +@@ -846,7 +846,7 @@ daemonConfigNew(bool privileged ATTRIBUT return NULL; } @@ -41,7 +41,7 @@ Index: libvirt-0.9.4/daemon/libvirtd.c data->listen_tcp = 0; if (!(data->tls_port = strdup(LIBVIRTD_TLS_PORT))) -@@ -918,7 +918,7 @@ daemonConfigNew(bool privileged ATTRIBUT +@@ -883,7 +883,7 @@ daemonConfigNew(bool privileged ATTRIBUT #endif data->auth_tls = REMOTE_AUTH_NONE; diff --git a/xen-name-for-devid.patch b/xen-name-for-devid.patch index d63bf12..4453a30 100644 --- a/xen-name-for-devid.patch +++ b/xen-name-for-devid.patch @@ -13,10 +13,10 @@ Date: Wed Jan 27 16:11:41 2010 -0700 This approach allows removing a disk when domain is inactive. We obviously can't search xenstore when the domain is inactive. -Index: libvirt-0.9.4/src/xen/xend_internal.c +Index: libvirt-0.9.6/src/xen/xend_internal.c =================================================================== ---- libvirt-0.9.4.orig/src/xen/xend_internal.c -+++ libvirt-0.9.4/src/xen/xend_internal.c +--- libvirt-0.9.6.orig/src/xen/xend_internal.c ++++ libvirt-0.9.6/src/xen/xend_internal.c @@ -60,6 +60,7 @@ static int @@ -25,7 +25,7 @@ Index: libvirt-0.9.4/src/xen/xend_internal.c virDomainDeviceDefPtr dev, char *class, char *ref, -@@ -2805,7 +2806,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr +@@ -2749,7 +2750,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr sexpr = virBufferContentAndReset(&buf); @@ -34,7 +34,7 @@ Index: libvirt-0.9.4/src/xen/xend_internal.c /* device doesn't exist, define it */ ret = xend_op(domain->conn, domain->name, "op", "device_create", "config", sexpr, NULL); -@@ -2926,7 +2927,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr +@@ -2870,7 +2871,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr sexpr = virBufferContentAndReset(&buf); @@ -43,7 +43,7 @@ Index: libvirt-0.9.4/src/xen/xend_internal.c virXendError(VIR_ERR_OPERATION_INVALID, "%s", _("requested device does not exist")); goto cleanup; -@@ -3021,7 +3022,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr +@@ -2965,7 +2966,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; @@ -52,7 +52,7 @@ Index: libvirt-0.9.4/src/xen/xend_internal.c goto cleanup; if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) { -@@ -3977,6 +3978,7 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -3915,6 +3916,7 @@ struct xenUnifiedDriver xenDaemonDriver */ static int virDomainXMLDevID(virDomainPtr domain, @@ -60,7 +60,7 @@ Index: libvirt-0.9.4/src/xen/xend_internal.c virDomainDeviceDefPtr dev, char *class, char *ref, -@@ -3985,8 +3987,12 @@ virDomainXMLDevID(virDomainPtr domain, +@@ -3923,8 +3925,12 @@ virDomainXMLDevID(virDomainPtr domain, xenUnifiedPrivatePtr priv = domain->conn->privateData; char *xref; char *tmp; @@ -73,7 +73,7 @@ Index: libvirt-0.9.4/src/xen/xend_internal.c if (dev->data.disk->driverName && STREQ(dev->data.disk->driverName, "tap")) strcpy(class, "tap"); -@@ -3996,19 +4002,21 @@ virDomainXMLDevID(virDomainPtr domain, +@@ -3934,19 +3940,21 @@ virDomainXMLDevID(virDomainPtr domain, else strcpy(class, "vbd");