- 16 9月, 2011 11 次提交
-
-
由 Jiri Denemark 提交于
Ever since we introduced fake reboot, we call qemuProcessKill as a reaction to SHUTDOWN event. Unfortunately, qemu doesn't guarantee it flushed all internal buffers before sending SHUTDOWN, in which case killing the process forcibly may result in (virtual) disk corruption. By sending just SIGTERM without SIGKILL we give qemu time to to flush all buffers and exit. Once qemu exits, we will see an EOF on monitor connection and tear down the domain. In case qemu ignores SIGTERM or just hangs there, the process stays running but that's not any different from a possible hang anytime during the shutdown process so I think it's just fine. Also qemu (since 0.14 until it's fixed) has a bug in SIGTERM processing which causes it not to exit but instead send new SHUTDOWN event and keep waiting. I think the best we can do is to ignore duplicate SHUTDOWN events to avoid a SHUTDOWN-SIGTERM loop and leave the domain in paused state.
-
由 Jiri Denemark 提交于
When a domain is rebooted using libvirt API, we use fake reboot consisting of shutting down and resetting the domain. Thus we see a SHUTDOWN event and set gotShutdown flag. But we never reset it back and if the domain crashes after it was rebooted this way, we consider it was a normal shutdown and not a crash.
-
由 Jiri Denemark 提交于
Commit 4454a9ef changed shutoff reason from VIR_DOMAIN_SHUTOFF_CRASHED to VIR_DOMAIN_SHUTOFF_FAILED in case we see an unexpected EOF on monitor connection. But FAILED reason is dedicated for domains that fail to start. CRASHED reason is the right one to use in this situation.
-
由 Eric Blake 提交于
Libvirt special-cases a specific VIR_ERR_RPC from the remote driver back into VIR_ERR_NO_SUPPORT on the client, so that clients can handle missing rpc functions the same whether the hypervisor driver is local or remote. However, commit c1b22644 introduced a regression: VIR_FROM_THIS changed from VIR_FROM_REMOTE to VIR_FROM_RPC, so the special casing no longer works if the server uses the newer error domain. * src/rpc/virnetclientprogram.c (virNetClientProgramDispatchError): Also cater to 0.9.3 and newer.
-
由 Stefan Berger 提交于
This patch fixes the bug shown in bugzilla 738778. It's not an nwfilter problem but a connection sharing / closure issue. https://bugzilla.redhat.com/show_bug.cgi?id=738778 Depending on the speed / #CPUs of the machine you are using you may not see this bug all the time.
-
由 Alex Jia 提交于
* conf/domain_conf.c: allocate memory to def->redirdevs in virDomainDefParseXML such as VIR_ALLOC_N(def->redirdevs, n), however, virDomainDefFree(def) hasn't released these memory. * Detected in valgrind run: ==19820== 209 (16 direct, 193 indirect) bytes in 1 blocks are definitely lost in loss record 25 of 26 ==19820== at 0x4A04A28: calloc (vg_replace_malloc.c:467) ==19820== by 0x4A13AF: virAllocN (memory.c:129) ==19820== by 0x4D4A0E: virDomainDefParseXML (domain_conf.c:7258) ==19820== by 0x4D4C93: virDomainDefParseNode (domain_conf.c:7512) ==19820== by 0x4D562F: virDomainDefParse (domain_conf.c:7465) ==19820== by 0x415863: testCompareXMLToXMLFiles (qemuxml2xmltest.c:35) ==19820== by 0x415982: testCompareXMLToXMLHelper (qemuxml2xmltest.c:80) ==19820== by 0x416D31: virtTestRun (testutils.c:140) ==19820== by 0x415604: mymain (qemuxml2xmltest.c:192) ==19820== by 0x416437: virtTestMain (testutils.c:689) ==19820== by 0x3CA7A1ECDC: (below main) (in /lib64/libc-2.12.so) ==19820== ==19820== LEAK SUMMARY: ==19820== definitely lost: 16 bytes in 1 blocks ==19820== indirectly lost: 193 bytes in 5 blocks ==19820== possibly lost: 0 bytes in 0 blocks ==19820== still reachable: 1,054 bytes in 21 blocks * How to reproduce? % valgrind -v --leak-check=full ./tests/qemuxml2xmltest Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Peter Krempa 提交于
Mac OS X 10.6. Snow Leopard and probably other do not provide a mkfs command to create filesystems. Macro MKFS then remained undefined and did not provide any substitute, so that build failed on a missing argument.
-
由 Peter Krempa 提交于
Struct virStoragePoolProbeResult was compiled in conditionaly, but virStorageBackendFileSystemProbe used it unconditionaly. This patch exempts the struct from conditional include.
-
由 Peter Krempa 提交于
/usr/lib/stdlib.h in Mac OS X and probably also in BSD's exports this symbol :(
-
由 Peter Krempa 提交于
Documentation did not specify, that some permissions are required on target path for coredump for the user running the hypervisor. Diff to v1: - reword statements
-
由 Eric Blake 提交于
The new doc text had a few readability issues. Also, the monitor command text copied a bit too much from the attach case. * src/libvirt-qemu.c (virDomainQemuMonitorCommand) (virDomainQemuAttach): Fix typos and grammar.
-
- 15 9月, 2011 8 次提交
-
-
由 Jim Fehlig 提交于
Pushing under build-breaker rule.
-
由 Jim Fehlig 提交于
Adjust qemuMigrationRun() to use migMaxBandwidth in qemuDomainObjPrivate structure when setting qemu migration speed. Caller-specified 'resource' parameter overrides migMaxBandwidth.
-
由 Jim Fehlig 提交于
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.
-
由 Jim Fehlig 提交于
Now that migration speed is stored in qemuDomainObjPrivate structure, save the new value when invoking qemuDomainMigrateSetMaxSpeed(). Allow setting migration speed on inactive domain too.
-
由 Jim Fehlig 提交于
-
由 Jim Fehlig 提交于
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.
-
由 Marc-André Lureau 提交于
Also initialize to NULL a few variables that might get free before being set.
-
由 Eric Blake 提交于
Commit c246b025 added new functions, but forgot to export them, resulting in a build failure when using modules. * src/libvirt_private.syms (network.h): Export new functions.
-
- 14 9月, 2011 3 次提交
-
-
由 Eric Blake 提交于
Commit 973fcd8f introduced the ability for qemu to reject snapshot reversion on an ABI incompatibility; but the very example that was first proposed on-list[1] as a demonstration of an ABI incompatibility, namely that of changing the max memory allocation, was not being checked for, resulting in a cryptic failure when running with larger max mem than what the snapshot was created with: error: operation failed: Error -22 while loading VM state This commit merely protects the three variables within mem that are referenced by qemu_command.c, rather than all 7 (the other 4 variables affect cgroup handling, but as far as I can tell, have no visible effect to the qemu guest). This also affects migration and save file handling, which are other places where we perform ABI compatibility checks. [1] https://www.redhat.com/archives/libvir-list/2010-December/msg00331.html * src/conf/domain_conf.c (virDomainDefCheckABIStability): Add memory sizing checks.
-
由 Peter Krempa 提交于
Commit 498d7833 cleans up some of virtual file names for parsing strings in memory. This patch cleans up (hopefuly) the rest forgotten by the first patch. This patch also changes all of the previously modified "filenames" to valid URI's replacing spaces for underscores. Changes to v1: - Replace all spaces for underscores, so that the strings form valid URI's - Replace spaces in places changed by commit 498d7833
-
由 Osier Yang 提交于
And fix argument @pid's type of virDomainQemuAttach.
-
- 13 9月, 2011 1 次提交
-
-
由 Guannan Ren 提交于
Regression introduced in commit 3881a470, due to an improper rebase of a cleanup written beforehand but only applied after a rebased of a refactoring that created a new function in commit 25fb3ef1. Also avoids passing NULL to printf %s. * src/qemu/qemu_driver.c: In qemuDomainSnapshotForEachQcow2() it free up the memory of qemu_driver->qemuImgBinary in the cleanup tag which leads to the garbage value of qemuImgBinary in qemu_driver struct and libvirtd crash when running "virsh snapshot-create" command a second time. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 9月, 2011 4 次提交
-
-
由 Michal Privoznik 提交于
So we can allow GSSAPI authentication for ssh. Signed-off-by: NMatthias Witte <witte@netzquadrat.de>
-
由 Michal Privoznik 提交于
If we fail setting label on a file and this file is on NFS share, it is wise to advise user to set virt_use_nfs selinux boolean variable.
-
由 Philipp Hahn 提交于
'+' in strings get translated to ' ' when editing domains. While xenDaemonDomainCreateXML() did URL-escape the sexpr, xenDaemonDomainDefineXML() did not. Remove the explicit urlencode() in xenDaemonDomainCreateXML() and add the direct encoding calls to xend_op_ext() because it calls xend_post() which uses "Content-Type: application/x-www-form-urlencoded". According to <http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1> this requires all parameters to be url-encoded as specified in rfc1738. Notice: virBufferAsprintf(..., "%s=%s", ...) is again replaced by three calls to virBufferURIEncodeString() and virBufferAddChar() because '=' is a "reserved" character, which would get escaped by virBufferURIEncodeString(), which - by the way - escapes anything not c_isalnum(). Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Peter Krempa 提交于
While parsing XML strings from memory, the previous convention in libvirt was to set the virtual file name to "domain.xml" or something similar. This could potentialy trick the user into looking for a file named domain.xml on the disk in an attempt to fix the error. This patch changes these filenames to something that can't be as easily confused for a valid filename. Examples of error messages: --------------------------- Error while loading file from disk: 15:07:59.015: 527: error : catchXMLError:709 : /path/to/domain.xml:1: StartTag: invalid element name <domain type='kvm'>< --------------------^ Error while parsing definition in memory: 15:08:43.581: 525: error : catchXMLError:709 : (domain definition):2: error parsing attribute name <name>vm1</name> --^
-
- 08 9月, 2011 7 次提交
-
-
由 Eric Blake 提交于
Regression introduced in commit d6f6b2d1. Running 'virsh snapshot-create dom' would mistakenly report that disks can only be specified for disk snapshots. * src/conf/domain_conf.c (virDomainSnapshotDefParseString): Only give error about no disk support when <disk> was found.
-
由 Eric Blake 提交于
These functions access internals of the opaque object, and do not need any rpc counterpart. It could be argued that we should have provided these when snapshot objects were first introduced, since all the other vir*Ptr objects have at least a GetName accessor. * include/libvirt/libvirt.h.in (virDomainSnapshotGetName) (virDomainSnapshotGetDomain, virDomainSnapshotGetConnect): Declare. * src/libvirt.c (virDomainSnapshotGetName) (virDomainSnapshotGetDomain, virDomainSnapshotGetConnect): New functions. * src/libvirt_public.syms: Export them.
-
由 Soren Hansen 提交于
Xen PV domU's have no PCI bus. node_device_udev.c calls pci_system_init which looks for /sys/bus/pci. If it does not find /sys/bus/pci (which it won't in a Xen PV domU) it returns unsuccesfully (ENOENT), which libvirt considers fatal. This makes libvirt unusable in this environment, even though there are plenty of valid virtualisation options that work there (LXC, UML, and QEmu spring to mind) https://bugzilla.redhat.com/show_bug.cgi?id=709471Signed-off-by: NSoren Hansen <soren@linux2go.dk>
-
由 Alex Jia 提交于
* src/rpc/virnettlscontext.c: fix memory leak on virNetTLSContextValidCertificate. * Detected in valgrind run: ==25667== ==25667== 6,085 (44 direct, 6,041 indirect) bytes in 1 blocks are definitely lost in loss record 326 of 351 ==25667== at 0x4005447: calloc (vg_replace_malloc.c:467) ==25667== by 0x4F2791F3: _asn1_add_node_only (structure.c:53) ==25667== by 0x4F27997A: _asn1_copy_structure3 (structure.c:421) ==25667== by 0x4F276A50: _asn1_append_sequence_set (element.c:144) ==25667== by 0x4F2743FF: asn1_der_decoding (decoding.c:1194) ==25667== by 0x4F22B9CC: gnutls_x509_crt_import (x509.c:229) ==25667== by 0x805274B: virNetTLSContextCheckCertificate (virnettlscontext.c:1009) ==25667== by 0x804DE32: testTLSSessionInit (virnettlscontexttest.c:693) ==25667== by 0x804F14D: virtTestRun (testutils.c:140) ==25667== ==25667== 23,188 (88 direct, 23,100 indirect) bytes in 11 blocks are definitely lost in loss record 346 of 351 ==25667== at 0x4005447: calloc (vg_replace_malloc.c:467) ==25667== by 0x4F22B841: gnutls_x509_crt_init (x509.c:50) ==25667== by 0x805272B: virNetTLSContextCheckCertificate (virnettlscontext.c:1003) ==25667== by 0x804DDD1: testTLSSessionInit (virnettlscontexttest.c:673) ==25667== by 0x804F14D: virtTestRun (testutils.c:140) * How to reproduce? % cd libvirt && ./configure && make && make -C tests valgrind or % valgrind -v --leak-check=full ./tests/virnettlscontexttest Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Alex Jia 提交于
Variable 'l_disk' initialized to a null pointer value, control jumps to 'case VIR_DOMAIN_DISK_DEVICE_DISK and then taking false branch, Within the expansion of the macro 'libxlError': Field access results in a dereference of a null pointer (loaded from variable 'l_disk'). * src/libxl/libxl_driver.c: Field access results in a dereference of a null pointer (loaded from variable 'l_disk') Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
Regression introduced in commit 89b6284f, due to an incorrect conversion to the new means of converting disk names back to the correct object. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Avoid NULL deref.
-
由 Matthias Bolte 提交于
Exit early if managed object is not found, instead of dereferencing a NULL pointer and triggering a segfault.
-
- 07 9月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
Although we were initializing worker threads during pool creating, we missed this during virThreadPoolSendJob. This bug led to segmenation fault as worker thread free() given argument.
-
- 06 9月, 2011 5 次提交
-
-
由 Peter Krempa 提交于
This patch enables modifying network device configuration using the virUpdateDeviceFlags API method. Matching of devices is accomplished using MAC addresses. While updating live configuration of a running domain, the user is allowed only to change link state of the interface. Additional modifications may be added later. For now the code checks for unsupported changes and thereafter changes the link state, if applicable. When updating persistent configuration of guest's network interface the whole configuration (except for the MAC address) may be modified and is stored for the next startup. * src/qemu/qemu_driver.c - Add dispatching of virUpdateDevice for network devices update (live/config) * src/qemu/qemu_hotplug.c - add setting of initial link state on live device addition - add function to change network device configuration. By now it supports only changing of link state * src/qemu/qemu_hotplug.h - Headers to above functions * src/qemu/qemu_process.c - set link states before virtual machine start. Qemu does not support setting of this on the command line.
-
由 Peter Krempa 提交于
This patch adds handlers for modification of guest's interface link state. Both HMP and QMP commands are supported, but as the link state functionality is from the beginning supported in QMP the HMP code will probably never be used.
-
由 Peter Krempa 提交于
A new element is introduced to XML that allows to control state of virtual network interfaces in hypervisors. Live modification of the link state allows networking tools propagate topology changes to guest OS or testing of scenarios in complex (virtual) networks. This patch adds elements to XML grammars and parsing and generating code.
-
由 Peter Krempa 提交于
This patch adds functions to compare structures containing network device configuration for equality. They serve for the purpose of disallowing unsupported changes to live network devices.
-
由 Peter Krempa 提交于
This patch modifies error handling function for the XML parser provided by libxml2. Originaly only a line number and error message were logged. With this new error handler function, the user is provided with a more complex description of the parsing error. Context of the error is printed in libXML2 style and filename of the file, that caused the error is printed. Example of an parse error: 13:41:36.262: 16032: error : catchXMLError:706 : /etc/libvirt/qemu/rh_bad.xml:58: Opening and ending tag mismatch: name line 2 and domain </domain> ---------^ Context of the error gives the user hints that may help to quickly locate a corrupt xml file. fixes BZs: ---------- Bug 708735 - [RFE] Show column and line on XML parsing error https://bugzilla.redhat.com/show_bug.cgi?id=708735 Bug 726771 - libvirt does not specify problem file if persistent xml is invalid https://bugzilla.redhat.com/show_bug.cgi?id=726771
-