- 14 12月, 2010 2 次提交
-
-
由 Osier Yang 提交于
Currently, all of domain "save/dump/managed save/migration" use the same function "qemudDomainWaitForMigrationComplete" to wait the job finished, but the error messages are all about "migration", e.g. when a domain saving job is canceled by user, "migration was cancled by client" will be throwed as an error message, which will be confused for user. As a solution, intoduce two new job types(QEMU_JOB_SAVE, QEMU_JOB_DUMP), and set "priv->jobActive" to "QEMU_JOB_SAVE" before saving, to "QEMU_JOB_DUMP" before dumping, so that we could get the real job type in "qemudDomainWaitForMigrationComplete", and give more clear message further. And as It's not important to figure out what's the exact job is in the DEBUG and WARN log, also we don't need translated string in logs, simply repace "migration" with "job" in some statements. * src/qemu/qemu_driver.c
-
由 Roopa Prabhu 提交于
Current code does not pass VM mac address to a 802.1Qbh direct attach interface using IFLA_VF_MAC. This patch adds support in macvtap code to send IFLA_VF_MAC netlink request during port profile association on a 802.1Qbh interface. Stefan Cc'ed for comments because this patch changes a condition for 802.1Qbg 802.1Qbh support for IFLA_VF_MAC in enic driver has been posted and is pending acceptance at http://marc.info/?l=linux-netdev&m=129185244410557&w=2
-
- 11 12月, 2010 6 次提交
-
-
由 Eric Blake 提交于
* src/util/command.h (virCommandAddArgBuffer) (virCommandAddEnvBuffer): New prototypes. * src/util/command.c (virCommandAddArgBuffer) (virCommandAddEnvBuffer): Implement them. * src/libvirt_private.syms (command.h): Export them. * src/qemu/qemu_conf.c (qemudBuildCommandLine): Use them, plugging a memory leak on rbd_hosts in the process.
-
由 Eric Blake 提交于
* src/conf/domain_conf.c (virDomainGraphicsDefParseXML) (virDomainDeviceVirtioSerialAddressParseXML) (virDomainDiskDefFree): Free various leaks.
-
由 Eric Blake 提交于
* src/util/util.c (__virExec): Don't use FD_ISSET on out-of-bounds fd.
-
由 Laine Stump 提交于
This is pretty straightforward - even though dnsmasq gets daemonized and uses a pid file, those things are both handled by the dnsmasq binary itself. And libvirt doesn't need any of the output of the dnsmasq command either, so we just setup the args and call virRun(). Mainly it was just a (mostly) mechanical job of replacing the APPEND_ARG() macro (and some other *printfs()) with virCommandAddArg*().
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Instead of just reporting that a task failed get the localized message from the TaskInfo error and include it in the reported error message. Implement minimal deserialization support for the MethodFault type in order to obtain the actual fault type. For example, this changes the reported error message when trying to create a volume with zero size from Could not create volume to Could not create volume: InvalidArgument - A specified parameter was not correct. Not perfect yet, but better than before.
-
- 10 12月, 2010 7 次提交
-
-
由 Eric Blake 提交于
* src/util/command.c (virCommandFree): Free data from virCommandSetInputBuffer.
-
由 Josh Durgin 提交于
Changes common to all network disks: -Make source name optional in the domain schema, since NBD doesn't use it -Add a hostName type to the domain schema, and use it instead of genericName, which doesn't include . -Don't leak host names or ports -Set the source protocol in qemuParseCommandline Signed-off-by: NJosh Durgin <joshd@hq.newdream.net>
-
由 MORITA Kazutaka 提交于
This patch adds network disk support to libvirt/QEMU. The currently supported protocols are nbd, rbd, and sheepdog. The XML syntax is like this: <disk type="network" device="disk"> <driver name="qemu" type="raw" /> <source protocol='rbd|sheepdog|nbd' name="...some image identifier..."> <host name="mon1.example.org" port="6000"> <host name="mon2.example.org" port="6000"> <host name="mon3.example.org" port="6000"> </source> <target dev="vda" bus="virtio" /> </disk> Signed-off-by: NMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
-
由 Hu Tao 提交于
`dump' watchdog action lets libvirtd to dump the guest when receives a watchdog event (which probably means a guest crash) Currently only qemu is supported.
-
由 Hu Tao 提交于
This patch prepares for the next patch.
-
由 Hu Tao 提交于
* src/util/threadpool.c, src/util/threadpool.h: Thread pool implementation * src/Makefile.am: Build thread pool * src/libvirt_private.syms: Export public functions
-
由 Eric Blake 提交于
* src/util/command.c (virCommandRun): Fix yesterday's regression on logging, and avoid leaking log-only output captures. Reported by Hu Tao.
-
- 09 12月, 2010 4 次提交
-
-
由 Jiri Denemark 提交于
When we get an EOF event on monitor connection, it may be a result of either crash or graceful shutdown. QEMU which supports async events (i.e., we are talking to it using JSON monitor) emits SHUTDOWN event on graceful shutdown. In case we don't get this event by the time monitor connection is closed, we assume the associated domain crashed.
-
由 Ryan Harper 提交于
Currently libvirt doesn't confirm whether the guest has responded to the disk removal request. In some cases this can leave the guest with continued access to the device while the mgmt layer believes that it has been removed. With a recent qemu monitor command[1] we can deterministically revoke a guests access to the disk (on the QEMU side) to ensure no futher access is permitted. This patch adds support for the drive_del() command and introduces it in the disk removal paths. If the guest is running in a QEMU without this command we currently explicitly check for unknown command/CommandNotFound and log the issue. If QEMU supports the command we issue the drive_del command after we attempt to remove the device. The guest may respond and remove the block device before we get to attempt to call drive_del. In that case, we explicitly check for 'Device not found' from the monitor indicating that the target drive was auto-deleted upon guest responds to the device removal notification. 1. http://thread.gmane.org/gmane.comp.emulators.qemu/84745Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
-
由 Ryan Harper 提交于
Currently libvirt doesn't confirm whether the guest has responded to the disk removal request. In some cases this can leave the guest with continued access to the device while the mgmt layer believes that it has been removed. With a recent qemu monitor command[1] we can deterministically revoke a guests access to the disk (on the QEMU side) to ensure no futher access is permitted. This patch adds support for the drive_unplug() command and introduces it in the disk removal paths. There is some discussion to be had about how to handle the case where the guest is running in a QEMU without this command (and the fact that we currently don't have a way of detecting what monitor commands are available). Changes since v2: - use VIR_ERROR to report when unplug command not found Changes since v1: - return > 0 when command isn't present, < 0 on command failure - detect when drive_unplug command isn't present and log error instead of failing entire command Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
-
由 Anthony Liguori 提交于
The extra data isn't being free()'d for IO error events that have a reason. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 08 12月, 2010 9 次提交
-
-
由 Osier Yang 提交于
- qemudDomainAttachPciControllerDevice: Don't build "devstr" if "-device" of qemu is not available, as "devstr" will only be used by "qemuMonitorAddDevice", which depends on "-device" argument of qemu is supported. - "qemudDomainSaveImageOpen": Fix indent problem. * src/qemu/qemu_driver.c
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Commit febc5916 introduced -vga none in case no video card is included in domain XML. However, old qemu versions do not support this and such domain cannot be successfully started.
-
由 Eric Blake 提交于
* .gnulib: Update to latest, for at least a stdint.h fix * src/storage/storage_driver.c (storageVolumeZeroSparseFile) (storageWipeExtent): Use better type, although it still triggers spurious -Wformat warning on MacOS's gcc.
-
由 Eric Blake 提交于
* src/openvz/openvz_conf.c (openvzLoadDomains): Replace unsafe sscanf with safe direct parsing. (openvzGetVEID): Avoid lost integer overflow detection. (openvzAssignUUIDs): Likewise, and detect readdir failure.
-
由 Eric Blake 提交于
popen must be matched with pclose (not fclose), or it will leak resources. Furthermore, it is a lousy interface when it comes to signal handling. We're much better off using our decent command wrapper. Note that virCommand guarantees that VIR_FREE(outbuf) is both required and safe to call, whether virCommandRun succeeded or failed. * src/openvz/openvz_conf.c (openvzLoadDomains, openvzGetVEID): Replace popen with virCommand usage.
-
由 Eric Blake 提交于
Guarantee that outbuf/errbuf are allocated on success, even if to the empty string. Caller always has to free the result, and empty output check requires checking if *outbuf=='\0'. Makes the API easier to use safely. Failure is best effort allocation (some paths, like out-of-memory, cannot allocate a buffer, but most do), so caller must free buffer on failure. * docs/internals/command.html.in: Update documentation. * src/util/command.c (virCommandSetOutputBuffer) (virCommandSetErrorBuffer, virCommandProcessIO) Guarantee empty string on no output. * tests/commandtest.c (test17): New test.
-
由 Eric Blake 提交于
* docs/internals/command.html.in: Better documentation of buffer vs. fd considerations. * src/util/command.c (virCommandRunAsync): Reject raw execution with string io. (virCommandRun): Reject execution with user-specified fds not visiting a regular file.
-
由 Eric Blake 提交于
* src/util/command.c (virCommandAddEnvString): Remove duplicate code. (virCommandToString, virCommandRun, virCommandRunAsync) (virCommandWait): Report NULL command as ENOMEM, not invalid usage. Reported by Jiri Denemark.
-
- 07 12月, 2010 6 次提交
-
-
由 Eric Blake 提交于
* src/conf/domain_conf.c (virDomainDefParseXML): Prefer sysinfo uuid over generating one, and if both uuids are present, require them to be identical. * src/qemu/qemu_conf.c (qemuBuildSmbiosSystemStr): Allow skipping the uuid. (qemudBuildCommandLine): Adjust caller; <smbios mode=host/> must not use host uuid in place of guest uuid.
-
由 Eric Blake 提交于
* docs/schemas/domain.rng (sysinfo-system-name): Also allow family. * src/util/sysinfo.h (struct _virSysinfoDef): Add system_family. * src/conf/domain_conf.c (virSysinfoParseXML) (virDomainSysinfoDefFormat): Support it. * src/util/sysinfo.c (virSysinfoDefFree, virSysinfoRead): Likewise. * src/qemu/qemu_conf.c (qemuBuildSmbiosSystemStr): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smbios.xml: Adjust test. * tests/qemuxml2argvdata/qemuxml2argv-smbios.args: Likewise.
-
由 Eric Blake 提交于
The log lists things like -smbios type=1,vendor="Red Hat", which is great for shell parsing, but not so great when you realize that execve() then passes those literal "" on as part of the command line argument, such that qemu sets SMBIOS with extra literal quotes. The eventual addition of virCommand is needed before we have the API to shell-quote a string representation of a command line, so that the log can still be pasted into a shell, but without inserting extra bytes into the execve() arguments. * src/qemu/qemu_conf.c (qemuBuildSmbiosBiosStr) (qemuBuildSmbiosSystemStr): Qemu doesn't like quotes around uuid arguments, and the remaining quotes are passed literally to smbios, making <smbios mode='host'/> inaccurate. Removing the quotes makes the log harder to parse, but that can be fixed later with virCommand improvements. * tests/qemuxml2argvdata/qemuxml2argv-smbios.args: 'Fix' test; it will need fixing again once virCommand learns how to shell-quote a potential command line.
-
由 Dan Kenigsberg 提交于
Humans consider January as month #1, while gmtime_r(3) calls it month #0. While fixing it, render qemu's rtc parameter with leading zeros, as is more commonplace. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=660194
-
由 Eric Blake 提交于
* src/util/threads.h (virThreadID): New prototype. * src/util/threads-pthread.c (virThreadID): New function. * src/util/threads-win32.c (virThreadID): Likewise. * src/libvirt_private.syms (threads.h): Export it. * daemon/event.c (virEventInterruptLocked): Use it to avoid warning on BSD systems.
-
由 Osier Yang 提交于
"virCommandRun": if "cmd->outbuf" or "cmd->errbuf" is NULL, libvirtd will be crashed when trying to start a qemu domain (which invokes "virCommandRun"), it caused by we try to use "*cmd->outbuf" and "*cmd->errbuf" regardless of cmd->outbuf or cmd->errbuf is NULL. * src/util/command.c (virCommandRun)
-
- 06 12月, 2010 2 次提交
-
-
由 Jiri Denemark 提交于
Two more calls to remote libvirtd have to be surrounded by qemuDomainObjEnterRemoteWithDriver() and qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between two communicating libvirt daemons. See commit f0c8e1cb for further details.
-
由 Jiri Denemark 提交于
virDrvSupportsFeature API is allowed to return -1 on error while all but one uses of VIR_DRV_SUPPORTS_FEATURE only check for (non)zero return value. Let's make this macro return zero on error, which is what everyone expects anyway.
-
- 05 12月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 04 12月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
As this symbols are exported independent from WITH_MACVTAP.
-
- 03 12月, 2010 2 次提交
-
-
由 Jean-Baptiste Rouault 提交于
This patch adds a mode_t parameter to virFileWriteStr(). If mode is different from 0, virFileWriteStr() will try to create the file if it doesn't exist. * src/util/util.h (virFileWriteStr): Alter signature. * src/util/util.c (virFileWriteStr): Allow file creation. * src/network/bridge_driver.c (networkEnableIpForwarding) (networkDisableIPV6): Adjust clients. * src/node_device/node_device_driver.c (nodeDeviceVportCreateDelete): Likewise. * src/util/cgroup.c (virCgroupSetValueStr): Likewise. * src/util/pci.c (pciBindDeviceToStub, pciUnBindDeviceFromStub): Likewise.
-
由 Daniel P. Berrange 提交于
-