- 05 4月, 2011 3 次提交
-
-
由 Markus Groß 提交于
The domainSetAutostart function is nearly identical to the one from qemu.
-
由 Jesse Cook 提交于
This patch enables the relative backing file path support provided by qemu-img create. If a relative path is specified for the backing file, it is converted to an absolute path using the storage pool path. The absolute path is used to verify that the backing file exists. If the backing file exists, the relative path is allowed and will be provided to qemu-img create.
-
由 Eric Blake 提交于
Even with -Wuninitialized (which is part of autobuild.sh --enable-compile-warnings=error), gcc does NOT catch this use of an uninitialized variable: { if (cond) goto error; int a = 1; error: printf("%d", a); } which prints 0 (supposing the stack started life wiped) if cond was true. Clang will catch it, but we don't use clang as often. Using gcc -Wjump-misses-init catches it, but also gives false positives: { if (cond) goto error; int a = 1; return a; error: return 0; } Here, a was never used in the scope of the error block, so declaring it after goto is technically fine (and clang agrees). However, given that our HACKING already documents a preference to C89 decl-before-statement, the false positive warning is enough of a prod to comply with HACKING. [Personally, I'd _really_ rather use C99 decl-after-statement to minimize scope, but until gcc can efficiently and reliably catch scoping and uninitialized usage bugs, I'll settle with the compromise of enforcing a coding standard that happens to reject false positives if it can also detect real bugs.] * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Wjump-misses-init. * src/util/util.c (__virExec): Adjust offenders. * src/conf/domain_conf.c (virDomainTimerDefParseXML): Likewise. * src/remote/remote_driver.c (doRemoteOpen): Likewise. * src/phyp/phyp_driver.c (phypGetLparNAME, phypGetLparProfile) (phypGetVIOSFreeSCSIAdapter, phypVolumeGetKey) (phypGetStoragePoolDevice) (phypVolumeGetPhysicalVolumeByStoragePool) (phypVolumeGetPath): Likewise. * src/vbox/vbox_tmpl.c (vboxNetworkUndefineDestroy) (vboxNetworkCreate, vboxNetworkDumpXML) (vboxNetworkDefineCreateXML): Likewise. * src/xenapi/xenapi_driver.c (getCapsObject) (xenapiDomainDumpXML): Likewise. * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise. * src/security/security_selinux.c (SELinuxGenNewContext): Likewise. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetPtyPaths): Likewise. * src/qemu/qemu_driver.c (qemudDomainShutdown) (qemudDomainBlockStats, qemudDomainMemoryPeek): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN): Likewise. * src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
-
- 03 4月, 2011 2 次提交
-
-
由 Wen Congyang 提交于
If strdup("x509dname") or strdup("saslUsername") success, but strdup(x509dname) or strdup(saslUsername) failed, subject->nidentity is not the num elements of subject->identities, and we will leak some memory.
-
由 Wen Congyang 提交于
There is no need to lock vm while allocating memory. If allocating memory failed, we forgot to unlock vm.
-
- 01 4月, 2011 7 次提交
-
-
由 Eric Blake 提交于
* .gnulib: Update to latest, for nonblocking module. * bootstrap.conf (gnulib_modules): Add nonblocking. * src/util/util.c (virSetBlocking): Defer to gnulib.
-
由 Daniel Veillard 提交于
When you happen to have a libvirtd binary compiled with the libxenlight driver (say you have installed xen-4.1 libraries) but not running a xen enabled system, then libvirtd fails to start. The cause is that libxlStartup() returns -1 when failing to initialize the library, and this propagates to virStateInitialize() which consider this a failure. We should only exit libxlStartup with an error code if something like an allocation error occurs, not if the driver failed to initialize. * src/libxl/libxl_driver.c: fix libxlStartup() to not return -1 when failing to initialize the libxenlight library
-
由 Guido Günther 提交于
as needed on non linux ports using HAL.
-
由 Jiri Denemark 提交于
qemu driver uses a 4K buffer for reading qemu log file. This is enough when only qemu's output is present in the log file. However, when debugging messages are turned on, intermediate libvirt process fills the log with a bunch of debugging messages before it executes qemu binary. In such a case the buffer may become too small. However, we are not really interested in libvirt messages so they can be filtered out from the buffer.
-
由 Osier Yang 提交于
It throws errors as long as the cgroup controller is not available, regardless of whether we really want to use it to do setup or not, which is not what we want, fixing it with throwing error when need to use the controller. And change "VIR_WARN" to "qemuReportError" for memory controller incidentally.
-
由 Wen Congyang 提交于
We create a temporary file to save memory, and we will remove it after reading memory to buffer. But we free the variable that contains the temporary filename before we remove it. So we should free tmp after unlinking it.
-
由 Michal Privoznik 提交于
-
- 31 3月, 2011 2 次提交
-
-
由 Eric Blake 提交于
strcase{cmp/str} have the drawback of being sensitive to the global locale; this is unacceptable in a library setting. Prefer a hard-coded C locale alternative for all but virsh, which is user facing and where the global locale isn't changing externally. * .gnulib: Update to latest, for c-strcasestr change. * bootstrap.conf (gnulib_modules): Drop strcasestr, add c-strcase and c-strcasestr. * cfg.mk (sc_avoid_strcase): New rule. (exclude_file_name_regexp--sc_avoid_strcase): New exception. * src/internal.h (STRCASEEQ, STRCASENEQ, STRCASEEQLEN) (STRCASENEQLEN): Adjust offenders. * src/qemu/qemu_monitor_text.c (qemuMonitorTextEjectMedia): Likewise. * tools/virsh.c (namesorter): Document exception.
-
由 Jiri Denemark 提交于
In qemu-0.12.* "device '...' is locked" message was changed to "Device ..." so libvirt was no longer detecting this as an error.
-
- 30 3月, 2011 4 次提交
-
-
由 Wen Congyang 提交于
If qemu quited unexpectedly when we call qemuMonitorJSONHMP(), libvirt will crash. Steps to reproduce this bug: 1. use gdb to attach libvirtd, and set a breakpoint in the function qemuMonitorSetCapabilities() 2. start a vm 3. let the libvirtd to run until qemuMonitorJSONSetCapabilities() returns. 4. kill the qemu process 5. continue running libvirtd Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
由 Wen Congyang 提交于
If the monitor met a error, and we will call qemuProcessHandleMonitorEOF(). But we may try to send monitor command after qemuProcessHandleMonitorEOF() returned. Then libvirtd will be blocked in qemuMonitorSend(). Steps to reproduce this bug: 1. use gdb to attach libvirtd, and set a breakpoint in the function qemuConnectMonitor() 2. start a vm 3. let the libvirtd to run until qemuMonitorOpen() returns. 4. kill the qemu process 5. continue running libvirtd Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
由 Hu Tao 提交于
qemuDriverUnlock() wasn't called on 2 exit paths * src/qemu/qemu_driver.c: fix qemudDomainSave() to always unlock the driver before exiting on error
-
由 Naoya Horiguchi 提交于
Currently libvirt's default logging is limited and it is difficult to determine what was happening when a proglem occurred (especially on a machines where one don't know the detail.) This patch helps to do that by making additional logging available for the following events: creating/defining/undefining domains creating/defining/undefining/starting/stopping networks creating/defining/undefining/starting/stopping storage pools creating/defining/undefining/starting/stopping storage volumes. * AUTHORS: add Naoya Horiguchi * src/network/bridge_driver.c src/qemu/qemu_driver.c src/storage/storage_driver.c: provide more VIR_INFO logging
-
- 29 3月, 2011 22 次提交
-
-
由 Osier Yang 提交于
Not sure if it's the correct way to add cputune xml for xend driver, and besides, seems "xm driver" and "xen hypervisor" also support vcpu affinity, do we need to add support for them too?
-
由 Osier Yang 提交于
LXC driver doesn't support vcpu affinity yet, so just need to modify it to support cpu shares.
-
由 Osier Yang 提交于
When domain startup, setting cpu affinity and cpu shares according to the cputune xml specified in domain xml. Modify "qemudDomainPinVcpu" to update domain config for vcpupin, and modify "qemuSetSchedulerParameters" to update domain config for cpu shares. v1 - v2: * Use "VIR_ALLOC_N" instead of "VIR_ALLOC_VAR" * But keep raising error when it fails on adding vcpupin xml entry, as I still don't have a better idea yet.
-
由 Osier Yang 提交于
Implementations of following functions: virDomainVcpupinIsDuplicate virDomainVcpupinFindByVcpu virDomainVcpupinAdd Update "virDomainDefParseXML" to parse, and "virDomainDefFormatXML" to build cputune xml, also implementations of new internal helper functions. v1 - v2: * Resolve potential crash bug of "virDomainVcpupinAdd"
-
由 Osier Yang 提交于
Also related new functions' declaration, and expose the new introduced functions in libvirt_private.syms. v1 - v2: Don't expose "virAllocVar" in libvirt_private.syms
-
由 Eric Blake 提交于
My earlier testing for commit 34fa0de0 was done while starting just-built libvirt from an unconfined_t shell, where the fds happened to work when transferring to qemu. But when installed and run under virtd_t, failure to label the raw file (with no compression) or the pipe (with compression) triggers SELinux failures when passing fds over SCM_RIGHTS to svirt_t qemu. * src/qemu/qemu_migration.c (qemuMigrationToFile): When passing FDs, make sure they are labeled.
-
由 Eric Blake 提交于
First fallout of fd: migration - it looks like SELinux enforcing _does_ require fd labeling (running uninstalled libvirtd from an unconstrained shell had no problems, but once faked out by doing chcon `stat -c %C /usr/sbin/libvirtd` daemon/libvirtd run_init $PWD/daemon/libvirtd to run it with the same context as an init script service, and with SELinux enforcing, I got a rather confusing failure: error: Failed to save domain fedora_12 to fed12.img error: internal error unable to send TAP file handle: No file descriptor supplied via SCM_RIGHTS This fixes the error message, then I need to figure out a subsequent patch that does the fsetfilecon() necessary to keep things happy. It also appears that libvirtd hangs on a failed fd transfer; I don't know if that needs an independent fix. * src/qemu/qemu_monitor_text.c (qemuMonitorTextSendFileHandle): Improve message, since TAP is no longer only client.
-
由 Markus Groß 提交于
* src/libxl/libxl_driver.c: implements libxlDomainSuspend and libxlDomainResume
-
由 Markus Groß 提交于
* src/libxl/libxl_driver.c: implements libxlDomainGetOSType
-
由 Markus Groß 提交于
* src/libxl/libxl_driver.c: implements libxlDomainGetSchedulerType
-
由 Markus Groß 提交于
* src/Makefile.am src/libvirt_private.syms configure.ac: share and reuse the sexpr routines from sexpr.h of the old xen driver * src/libxl/libxl_driver.c: implements libxlDomainXMLFromNative and libxlDomainXMLToNative
-
由 Markus Groß 提交于
Hook the virtual cpu functions to their libxenlight counterparts * src/libxl/libxl_driver.c: implements libxlDomainSetVcpus, libxlDomainGetVcpus, libxlDomainSetVcpusFlags, libxlDomainGetVcpusFlags and libxlDomainPinVcpu
-
由 Markus Groß 提交于
* src/libxl/libxl_conf.[ch] src/libxl/libxl_driver.[ch]: add authors after the licence template
-
由 Markus Groß 提交于
* src/libxl/libxl_conf.h: add the necessary fields to the driver private structure * src/libxl/libxl_driver.c: add lifecycle event support and entry points for event(de)register(any)
-
由 Markus Groß 提交于
* src/libxl/libxl_driver.c: use ignore_value() in libxlDomainObjUnref and libxlCreateDomEvents
-
由 Daniel P. Berrange 提交于
* daemon/remote.c, src/remote/remote_driver.c: Implementation of storage vol upload/download APIs * src/remote/remote_protocol.x: Wire protocol definition for upload/download * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h, daemon/remote_dispatch_table.h, src/remote/remote_protocol.h, src/remote/remote_protocol.c: Re-generate
-
由 Daniel P. Berrange 提交于
Use generic FD streams to allow data upload/download to/from any storage volume * src/storage/storage_driver.c: Wire up upload/download APIs
-
由 Daniel P. Berrange 提交于
New APIs are added allowing streaming of content to/from storage volumes. * include/libvirt/libvirt.h.in: Add virStorageVolUpload and virStorageVolDownload APIs * src/driver.h, src/libvirt.c, src/libvirt_public.syms: Stub code for new APIs * src/storage/storage_driver.c, src/esx/esx_storage_driver.c: Add dummy entries in driver table for new APIs
-
由 Daniel P. Berrange 提交于
The O_NONBLOCK flag doesn't work as desired on plain files or block devices. Introduce an I/O helper program that does the blocking I/O operations, communicating over a pipe that can support O_NONBLOCK * src/fdstream.c, src/fdstream.h: Add non-blocking I/O on plain files/block devices * src/Makefile.am, src/util/iohelper.c: I/O helper program * src/qemu/qemu_driver.c, src/lxc/lxc_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Update for streams API change
-
由 Eric Blake 提交于
Regression introduced in commit 6034ddd5. * src/qemu/qemu_driver.c (qemudDomainSaveFlag): Jump to correct label.
-
由 Eric Blake 提交于
* src/util/command.c (virCommandAbort) [WIN32]: Provide stub. Reported by Daniel P. Berrange's autobuilder.
-
由 Eric Blake 提交于
Spawn the compressor ourselves, instead of requiring the shell. * src/qemu/qemu_migration.c (qemuMigrationToFile): Spawn compression helper process when needed.
-