- 26 8月, 2011 4 次提交
-
-
由 Eric Blake 提交于
Changing the current vm, and writing that change to the file system, all before a new qemu starts, is risky; it's hard to roll back if starting the new qemu fails for some reason. Instead of abusing vm->current_snapshot and making the command line generator decide whether the current snapshot warrants using -loadvm, it is better to just directly pass a snapshot all the way through the call chain if it is to be loaded. This frees up the last use of snapshot->def->active for qemu's use, so the next patch can repurpose that field for tracking which snapshot is current. * src/qemu/qemu_command.c (qemuBuildCommandLine): Don't use active field of snapshot. * src/qemu/qemu_process.c (qemuProcessStart): Add a parameter. * src/qemu/qemu_process.h (qemuProcessStart): Update prototype. * src/qemu/qemu_migration.c (qemuMigrationPrepareAny): Update callers. * src/qemu/qemu_driver.c (qemudDomainCreate) (qemuDomainSaveImageStartVM, qemuDomainObjStart) (qemuDomainRevertToSnapshot): Likewise. (qemuDomainSnapshotSetCurrentActive) (qemuDomainSnapshotSetCurrentInactive): Delete unused functions.
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=727709 mentions that if qemu fails to create the snapshot (such as what happens on Fedora 15 qemu, which has qmp but where savevm is only in hmp, and where libvirt is old enough to not try the hmp fallback), then 'virsh snapshot-list dom' will show a garbage snapshot entry, and the libvirt internal directory for storing snapshot metadata will have a bogus file. This fixes the fallout bug of polluting the snapshot-list with garbage on failure (the root cause of the F15 bug of not having fallback to hmp has already been fixed in newer libvirt releases). * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Allocate memory before making snapshot, and cleanup on failure. Don't dereference NULL if transient domain exited during snapshot creation.
-
由 Alex Jia 提交于
* src/qemu/qemu_migration.c: avoid dead 'ret' assignment and silence clang warning. Detected by ccc-analyzer: libvirt.c:4277:5: warning: Value stored to 'ret' is never read ret = domain->conn->driver->domainMigrateConfirm3 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
由 Alex Jia 提交于
* src/qemu/qemu_migration.c: avoid dead 'ret' assignment and silence clang warning. Detected by ccc-analyzer: CC libvirt_driver_qemu_la-qemu_migration.lo qemu/qemu_migration.c:2046:5: warning: Value stored to 'ret' is never read ret = qemuMigrationConfirm(driver, sconn, vm, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- 25 8月, 2011 4 次提交
-
-
由 Michal Privoznik 提交于
My previous patch 74c75671 introduced a regression by removing TLS initialization from client.
-
由 Laine Stump 提交于
virFileOpenAs takes desired uid:gid as arguments, and not only uses them for a fork/setuid/setgid when retrying failed open operations, but additionally always forces the opened file to be owned by the given uid:gid. One example of the problems this causes is that, when restoring a domain from a file that is owned by the qemu user, opening the file chowns it to root. if dynamic_ownership=1 this is coincidentally expected, but if dynamic_ownership=0, no existing file should ever have its ownership changed. This patch adds an extra check before calling fchown() - it only does it if O_CREAT was passed to virFileOpenAs() in the openflags.
-
由 Shradha Shah 提交于
Signed-off-by: NSteve Hodgson <shodgson@solarflare.com>
-
由 Shradha Shah 提交于
pciDeviceListSteal(pcidevs, dev) removes dev from pcidevs reducing the length of pcidevs, so moving onto what was the next dev is wrong. Instead callers should pop entry 0 repeatedly until pcidevs is empty. Signed-off-by: NSteve Hodgson <shodgson@solarflare.com> Signed-off-by: NShradha Shah <sshah@solarflare.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 8月, 2011 5 次提交
-
-
由 Eric Blake 提交于
I was testing a virsh patch, and wanted to see if I had passed the flags I thought. But with LIBVIRT_DEBUG in the environment, I just saw: 14:24:52.359: 15022: debug : virDomainSnapshotNum:15586 : dom=0xc9c180, (VM: name=rhel_6-64, uuid=48f8e8e7-e14f-0e14-02f0-ce71997bdcab), including a trailing space. This fixes the issues. * src/libvirt.c: Log flag parameters, even if currently unused. (VIR_DOMAIN_DEBUG_0): Drop trailing comma in log. (VIR_DOMAIN_DEBUG_1): Split guts into... (VIR_DOMAIN_DEBUG_2): ...new macro.
-
由 Matthias Bolte 提交于
-
由 Osier Yang 提交于
* src/qemu/qemu_monitor_json.c: Handle error "CommandNotFound" and report the error. * src/qemu/qemu_monitor_text.c: If a sub info command is not found, it prints the output of "help info", for other commands, "unknown command" is printed. Without this patch, libvirt always report: An error occurred, but the cause is unknown This patch was adapted from a patch by Osier Yang <jyang@redhat.com> to break out detection of unrecognized text monitor commands into a separate function. Signed-off-by: NAdam Litke <agl@us.ibm.com>
-
由 Matthias Bolte 提交于
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (qemuDomainSaveInternal): Fix typo. * src/conf/domain_event.c (virDomainEventDispatchMatchCallback): Likewise. * daemon/libvirtd.c (daemonRunStateInit): Likewise. * src/lxc/lxc_container.c (lxcContainerChildMountSort): Likewise. * src/util/virterror.c (virCopyError, virRaiseErrorFull): Likewise. * src/xenxs/xen_sxpr.c (xenParseSxprSound): Likewise.
-
- 23 8月, 2011 9 次提交
-
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
* src/qemu/qemu_command.c: s/VIR_ERR_NO_SUPPORT/VIR_ERR_CONFIG_UNSUPPORTED/ * src/qemu/qemu_driver.c: s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_INVALID/ * src/qemu/qemu_process.c: s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_INVALID/
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_INVALID/ Special case is changes on lxcDomainInterfaceStats, if it's not implemented on the platform, prints error like: lxcError(VIR_ERR_OPERATION_INVALID, "%s", _("interface stats not implemented on this platform")); As the function is supported by driver actually, error like VIR_ERR_NO_SUPPORT is confused.
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
* src/qemu/qemu_monitor_text.c: Error like "this function is not supported by the connection driver" is confused obviously.
-
- 22 8月, 2011 1 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
Now, bad key-code in send-key can cause segmentation fault in libvirt. (example) % virsh send-key --codeset win32 12 error: End of file while reading data: Input/output error This is caused by overrun at scanning keycode array. Fix it. Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
-
- 19 8月, 2011 16 次提交
-
-
由 Eric Blake 提交于
Repetitive patterns should be factored. The sign of a good factorization is a change that kills 5x more lines than it adds :) * src/conf/domain_conf.c (virDomainDeviceDefParse) (virDomainSnapshotDefParseString): Use new convenience macros. * src/conf/storage_conf.c (virStoragePoolDefParseSourceString): Likewise. * src/cpu/cpu.c (cpuCompareXML, cpuBaselineXML): Likewise. * src/esx/esx_vi.c (esxVI_Context_Execute): Likewise. * src/qemu/qemu_migration.c (qemuMigrationCookieXMLParseStr): Likewise. * src/security/virt-aa-helper.c (caps_mockup): Likewise. * src/test/test_driver.c (testOpenFromFile): Likewise. * tests/cputest.c (cpuTestLoadXML, cpuTestLoadMultiXML): Likewise. * tools/virsh.c (cmdFreecell, makeCloneXML, cmdVNCDisplay) (cmdTTYConsole, cmdDetachInterface, cmdDetachDisk) (cmdSnapshotCreate, cmdSnapshotCreateAs, cmdSnapshotCurrent) (cmdSnapshotList, cmdSnapshotParent): Likewise.
-
由 Eric Blake 提交于
Often, we want to use XPath functions on the just-parsed document; fold this into the parser function for convenience. * src/util/xml.h (virXMLParseHelper): Add argument. (virXMLParseStrHelper, virXMLParseFileHelper): Delete. (virXMLParseCtxt, virXMLParseStringCtxt, virXMLParseFileCtxt): New macros. * src/libvirt_private.syms (xml.h): Remove deleted functions. * src/util/xml.c (virXMLParseHelper): Add argument. (virXMLParseStrHelper, virXMLParseFileHelper): Delete.
-
由 Eric Blake 提交于
* cfg.mk (useless_free_options): Add xmlFreeDoc, xmlBufferFree. * src/esx/esx_vi.c (ESX_VI__TEMPLATE__FREE): Fix offenders. * tools/virsh.c (cmdFreecell, cmdVNCDisplay, cmdTTYConsole) (cmdDetachInterface, cmdDetachDisk, cmdSnapshotCreate) (cmdSnapshotCreateAs, cmdSnapshotList, cmdSnapshotParent): Likewise.
-
由 Eric Blake 提交于
* src/test/test_driver.c (testDomainUndefineFlags): Use right variable name.
-
由 Eric Blake 提交于
ACK was given too soon. According to the code, the xm driver is only used for inactive domains, and has no notion of an active domain, thus, it cannot support undefine of a running domain. The real fix for xen needs to be in the unified driver and/or the xend level. This reverts commit 49186ded.
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
-
由 Osier Yang 提交于
Undefining a running domain will convert it to trasient, but keep the domain still running.
-
由 Osier Yang 提交于
* src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as "balloon: actual=", which cause "actual=" is stripped early before the real parsing. This patch changes BALLOON_PREFIX into "balloon: ", and modifies related functions, also renames "qemuMonitorParseExtraBalloonInfo" to "qemuMonitorParseBalloonInfo", as after the changing, it parses all the info returned by "info balloon".
-
由 Michal Privoznik 提交于
Although we are flushing cache after some critical writes (e.g. volume creation), after some others we do not (e.g. volume cloning). This patch fix this issue. That is for volume cloning, writing header of logical volume, and storage wipe.
-
由 Michal Privoznik 提交于
When spice_tls is set but listen_tls is not, we don't initialize GnuTLS library. So any later gnutls call (e.g. during migration, where we initialize a certificate) will access uninitialized GnuTLS internal structs and throws an error. Although, we might now initialize GnuTLS twice, it is safe according to the documentation: This function can be called many times, but will only do something the first time. This patch creates 2 functions: virNetTLSInit and virNetTLSDeinit with respect to written above.
-
- 18 8月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Regression introduced in commit 5d30db09. * src/rpc/virnetsocket.c (virNetSocketNewListenUNIX) [WIN32]: Use correct signature.
-