- 13 11月, 2013 5 次提交
-
-
由 Jason Andryuk 提交于
ifdef LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS hides a multi-line body for a brace-less else. Add braces to ensure proper logic is applied. Without this fix, new domains cannot be started. Both libxl_domain_create_new and libxl_domain_create_restore are called when starting a new domain leading to this error: libxl: error: libxl.c:324:libxl__domain_rename: domain with name "guest" already exists. libxl: error: libxl_create.c:800:initiate_domain_create: cannot make domain: -6
-
由 Peter Krempa 提交于
The QOM path in qemu that contains the CPUID registers of a running VM may not be present (introduced in QEMU 1.5). Since commit d94b7817 we have a regression with QEMU that don't support reporting of the CPUID register state via the monitor as the process startup code expects the path to exist. This patch adds code that checks with the monitor if the requested path already exists and uses it only in this case.
-
由 Peter Krempa 提交于
To allow returning more granular errors, change the error type to an integer.
-
由 Peter Krempa 提交于
There were two separate places with that were stringifying type of a volume. One of the places was out of sync with types implemented upstream. To avoid such problems in the future, this patch adds a common function to convert the type to string and reuses it across the two said places.
-
由 Peter Krempa 提交于
Add an extra space before the first column as we have when listing domains. Previous output: $ virsh vol-list glusterpool Name Path ----------------------------------------- asdf gluster://gluster-node-1/gv0/asdf c gluster://gluster-node-1/gv0/c cd gluster://gluster-node-1/gv0/cd $ virsh vol-list glusterpool --details Name Path Type Capacity Allocation ---------------------------------------------------------------------- asdf gluster://gluster-node-1/gv0/asdf unknown 0.00 B 0.00 B c gluster://gluster-node-1/gv0/c unknown 16.00 B 16.00 B cd gluster://gluster-node-1/gv0/cd unknown 0.00 B 0.00 B New output: $ virsh vol-list glusterpool Name Path ------------------------------------------------------------------------------ asdf gluster://gluster-node-1/gv0/asdf c gluster://gluster-node-1/gv0/c cd gluster://gluster-node-1/gv0/cd $ virsh vol-list glusterpool --details Name Path Type Capacity Allocation ------------------------------------------------------------------------ asdf gluster://gluster-node-1/gv0/asdf unknown 0.00 B 0.00 B c gluster://gluster-node-1/gv0/c unknown 16.00 B 16.00 B cd gluster://gluster-node-1/gv0/cd unknown 0.00 B 0.00 B
-
- 12 11月, 2013 8 次提交
-
-
由 Daniel P. Berrange 提交于
As of libvirt 1.1.1 and systemd 205, the cgroups layout used by libvirt has some changes. Update the 'cgroups.html' file from the website to describe how it works in a systemd world. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If the host side of an LXC container console disconnected and the guest side continued to write data, until the PTY buffer filled up, the LXC controller would busy wait. It would repeatedly see POLLHUP from poll() and not disable the watch. This was due to some bogus logic detecting blocking conditions. Upon seeing a POLLHUP we must disable all reading & writing from the PTY, and setup the epoll to wake us up again when the connection comes back. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'none' machine type is something only intended for use by libvirt probing capabilities. It isn't something that is useful for running real VM instances. As such it should not be exposed to users in the capabilities. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virQEMUCapsProbeQMPMachineTypes method iterates over machine types copying them into the qemuCapsPtr object. It only updates the qemuCaps->nmachinetypes value at the end though. So if OOM occurs in the middle, the destructor of qemuCapsPtr will not free the partially initialized machine types. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
Now that the function is separate clean out a few ugly places and fix up error messages.
-
由 Peter Krempa 提交于
The function destroys only the contents not the object itself thus it should be called Clear.
-
由 Peter Krempa 提交于
To avoid code duplication between snapshot configuration code that parses the disk source too we need to split out this code that will be reused later on. This patch tries to be code movement, some aspects of this function will be refactored later.
-
由 Michal Privoznik 提交于
If the managedsave image is corrupted, e.g. the XML part is, we fail to parse it and throw an error, e.g.: error: Failed to start domain jms8 error: XML error: missing security model when using multiple labels This is okay, as we can't really start the machine and avoid undefined qemu behaviour. On the other hand, the error message doesn't give a clue to users what should they do. The consensus here would be to thrown a warning to logs saying "Hey, you've got a corrupted file". Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 11 11月, 2013 3 次提交
-
-
由 Chen Hanxiao 提交于
s/repersents/represents Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1027096 If there's the following snippet in the domain XML, the domain will be lost upon the daemon restart (if the domain is started prior restart): <seclabel type='dynamic' relabel='yes'/> The problem is, the 'label', 'imagelabel' and 'baselabel' are parsed whenever the VIR_DOMAIN_XML_INACTIVE is *not* present or the label is static. The latter is not our case, obviously. So, when libvirtd starts up, it finds domain state xml and parse it. During parsing, many XML flags are enabled but VIR_DOMAIN_XML_INACTIVE. Hence, our parser tries to extract 'label', 'imagelabel' and 'baselabel' from the XML which fails for model='none'. Err, this model - even though not specified in XML - can be taken from qemu wide config file: /etc/libvirtd/qemu.conf. However, in order to know we are dealing with model='none' the code in question must be moved forward a bit. Then a new check must be introduced. This is what the first two chunks are doing. But this alone is not sufficient. The domain state XML won't contain the model attribute without slight modification. The model should be inserted into the XML even if equal to 'none' and the state XML is being generated - what if the origin (the @security_driver variable in qemu.conf) changes during libvirtd restarts? At the end, a test to catch this scenario is introduced. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The 'vcpucount' command is a getter command for the vCPUu count. When one or more of the filtering flags are specified the command returns the value only for the selected combination. In this case the --live and --config combination isn't valid. This however didn't cause errors as the combination of flags was rejected by the libvirt API but then the fallback code kicked in and requested the count in a way where the clash of the flags didn't matter. Mark the flag combination mutually exclusive so that users aren't confused. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1024245
-
- 09 11月, 2013 2 次提交
-
-
由 Wang Yufei 提交于
In virDomainRestoreFlags with VIR_DOMAIN_SAVE_BYPASS_CACHE, it risks slowing restores from NFS, but not saves to NFS. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com>
-
由 Eric Blake 提交于
Fix some user-visible wording from commits 72aafe9c and 1606d89c. * src/qemu/qemu.conf (migration_address): Better wording. * include/libvirt/libvirt.h.in (VIR_MIGRATE_PARAM_LISTEN_ADDRESS): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 11月, 2013 15 次提交
-
-
由 Vitor de Lima 提交于
This patch moves some code in the qemuDomainAttachSCSIDisk function. The check for the existence of a PCI address assigned to the SCSI controller was moved in order to be executed only when needed. The PCI address of a controller is not necessary if QEMU_CAPS_DEVICE is supported. This fixes issues with the hotplug of SCSI disks on pseries guests.
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1025397 When virPCIGetVirtualFunctions created the list of an SRIOV Physical Function's (PF) Virtual Functions (VF), it had assumed that the order of "virtfn*" links returned by readdir() from the PF's sysfs directory was already in the correct order. Experience has shown that this is not always the case - it can be in alphabetical order (which would e.g. place virtfn11 before virtfn2) or even some seemingly random order (see the example in the bugzilla report) This results in 1) incorrect assumptions made by consumers of the output of the virt_functions list of virsh nodedev-dumpxml, and 2) setting MAC address and vlan tag on the wrong VF (since libvirt uses netlink to set mac address and vlan tag, netlink requires the VF#, and the function virPCIGetVirtualFunctionIndex() returns the wrong index due to the improperly ordered VF list). The solution provided by this patch is for virPCIGetVirtualFunctions to no longer scan the entire device directory in its natural order, but instead to check for links individually by name "virtfn%d" where %d starts at 0 and increases with each success. Since VFs are created contiguously by the kernel, this will guarantee that all VFs are found, and placed in the arry in the correct order. One note of use to the uninitiated is that VIR_APPEND_ELEMENT always either increments *num_virtual_functions or fails, so no this isn't an endless loop. (NB: the SRIOV_* defines at the top of virpci.c were removed because they are unnecessary and/or not used.)
-
由 Laine Stump 提交于
This is a prerequisite to the fix for the fix to: https://bugzilla.redhat.com/show_bug.cgi?id=1025397 num_virtual_functions needs to be size_t in order to use the VIR_APPEND_ELEMENT macro.
-
由 Vitor de Lima 提交于
When adding support for Q35 guests, the code to assign a PCI address to the primary video card was moved into Q35 and i440fx(PIIX3) specific functions, but no fallback was kept for other machine types that might have a video card. This patch remedies that by assigning a PCI address to the primary video card if it does not have any kind of address. In particular, this fixes issues with pseries guests. Signed-off-by: NVitor de Lima <vitor.lima@eldorado.org.br> Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Serge Hallyn 提交于
When supported, ask iptables to wait rather than fail if it is in use by another caller (like ufw). (See https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1245322) Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com>
-
由 Peter Krempa 提交于
When starting a VM the qemu process may filter out some requested features of a domain as it's not supported either by the host or by qemu. Libvirt didn't check if this happened which might end up in changing of the guest ABI when migrating. The proof of concept implementation adds the check for the recently introduced kvm_pv_unhalt cpuid feature bit. This feature depends on both qemu and host kernel support and thus increase the possibility of guest ABI breakage.
-
由 Peter Krempa 提交于
The linux kernel recently added support for paravirtual spinlock handling to avoid performance regressions on overcomitted hosts. This feature needs to be turned in the hypervisor so that the guest OS is notified about the possible support. This patch adds a new feature "paravirt-spinlock" to the XML and supporting code to enable the "kvm_pv_unhalt" pseudo CPU feature in qemu. https://bugzilla.redhat.com/show_bug.cgi?id=1008989
-
由 Peter Krempa 提交于
Currently we were storing domain feature flags in a bit field as the they were either enabled or disabled. New features such as paravirtual spinlocks however can be tri-state as the default option may depend on hypervisor version. To allow storing tri-state feature state in the same place instead of having to declare dedicated variables for each feature this patch refactors the bit field to an array.
-
由 Peter Krempa 提交于
Some of the emulator features are presented in the <features> element in the domain XML although they are virtual CPUID feature bits when presented to the guest. To avoid confusing the users with these features, as they are not configurable via the <cpu> element, this patch adds an internal array where those can be stored privately instead of exposing them in the XML. Additionaly KVM feature bits are added as example usage of this code.
-
由 Jiri Denemark 提交于
The qemu monitor supports retrieval of actual CPUID bits presented to the guest using QMP monitor. Add APIs to extract these information and tests for them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The CPUID functions were stored in multiple arrays according to a specified prefix of those. This made it very hard to add another prefix to store KVM CPUID features (0x40000000). Instead of hardcoding a third array this patch changes the approach used: The code is refactored to use a single array where the CPUID functions are stored ordered by the cpuid function so that they don't depend on the specific prefix and don't waste memory. The code is also less complex using this approach. A trateoff to this is the change from O(N) complexity to O(N^2) in x86DataAdd and x86DataSubtract. The rest of the functions were already using O(N^2) algorithms.
-
由 Li Zhang 提交于
vol-clone reports out of memory error with disk type on ppc64. Currently, wbytes is defined as size_t type (8 bytes), but args's value in ioctl(fd, args..) in kernel is int (4 bytes). This makes wbytes 2^32 times larger, causing an out of memory error. This patch changes size_t to int to synchronize with kernel. [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/block/ioctl.c?id=5e01dc7b#n363 [2] https://lkml.org/lkml/2013/11/1/620Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
Since 86d90b3a (yes, my patch; again) we are supporting NBD storage migration. However, on error recovery path we got the steps reversed. The correct order is: return NBD port to the virPortAllocator and then either unlock the vm or remove it from the driver. Not vice versa. ==11192== Invalid write of size 4 ==11192== at 0x11488559: qemuMigrationPrepareAny (qemu_migration.c:2459) ==11192== by 0x11488EA6: qemuMigrationPrepareDirect (qemu_migration.c:2652) ==11192== by 0x114D1509: qemuDomainMigratePrepare3Params (qemu_driver.c:10332) ==11192== by 0x519075D: virDomainMigratePrepare3Params (libvirt.c:7290) ==11192== by 0x1502DA: remoteDispatchDomainMigratePrepare3Params (remote.c:4798) ==11192== by 0x12DECA: remoteDispatchDomainMigratePrepare3ParamsHelper (remote_dispatch.h:5741) ==11192== by 0x5212127: virNetServerProgramDispatchCall (virnetserverprogram.c:435) ==11192== by 0x5211C86: virNetServerProgramDispatch (virnetserverprogram.c:305) ==11192== by 0x520A8FD: virNetServerProcessMsg (virnetserver.c:165) ==11192== by 0x520A9E1: virNetServerHandleJob (virnetserver.c:186) ==11192== by 0x50DA78F: virThreadPoolWorker (virthreadpool.c:144) ==11192== by 0x50DA11C: virThreadHelper (virthreadpthread.c:161) ==11192== Address 0x1368baa0 is 576 bytes inside a block of size 688 free'd ==11192== at 0x4A07F5C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==11192== by 0x5079A2F: virFree (viralloc.c:580) ==11192== by 0x11456C34: qemuDomainObjPrivateFree (qemu_domain.c:267) ==11192== by 0x50F41B4: virDomainObjDispose (domain_conf.c:2034) ==11192== by 0x50C2991: virObjectUnref (virobject.c:262) ==11192== by 0x50F4CFC: virDomainObjListRemove (domain_conf.c:2361) ==11192== by 0x1145C125: qemuDomainRemoveInactive (qemu_domain.c:2087) ==11192== by 0x11488520: qemuMigrationPrepareAny (qemu_migration.c:2456) ==11192== by 0x11488EA6: qemuMigrationPrepareDirect (qemu_migration.c:2652) ==11192== by 0x114D1509: qemuDomainMigratePrepare3Params (qemu_driver.c:10332) ==11192== by 0x519075D: virDomainMigratePrepare3Params (libvirt.c:7290) ==11192== by 0x1502DA: remoteDispatchDomainMigratePrepare3Params (remote.c:4798) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
One of my previous patches (c7ac2519) did try to fix the issue when domain dies too soon during migration. However, this clumsy approach was missing removal of qemuProcessHandleMonitorDestroy resulting in double unrefing of mon->vm and hence producing the daemon crash: ==11843== Invalid read of size 4 ==11843== at 0x50C28C5: virObjectUnref (virobject.c:255) ==11843== by 0x1148F7DB: qemuMonitorDispose (qemu_monitor.c:258) ==11843== by 0x50C2991: virObjectUnref (virobject.c:262) ==11843== by 0x50C2D13: virObjectFreeCallback (virobject.c:388) ==11843== by 0x509C37B: virEventPollCleanupHandles (vireventpoll.c:583) ==11843== by 0x509C711: virEventPollRunOnce (vireventpoll.c:652) ==11843== by 0x509A620: virEventRunDefaultImpl (virevent.c:274) ==11843== by 0x520D21C: virNetServerRun (virnetserver.c:1112) ==11843== by 0x11F368: main (libvirtd.c:1513) ==11843== Address 0x13b88864 is 4 bytes inside a block of size 136 free'd ==11843== at 0x4A07F5C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==11843== by 0x5079A2F: virFree (viralloc.c:580) ==11843== by 0x50C29E3: virObjectUnref (virobject.c:270) ==11843== by 0x114770E4: qemuProcessHandleMonitorDestroy (qemu_process.c:1103) ==11843== by 0x1148F7CB: qemuMonitorDispose (qemu_monitor.c:257) ==11843== by 0x50C2991: virObjectUnref (virobject.c:262) ==11843== by 0x50C2D13: virObjectFreeCallback (virobject.c:388) ==11843== by 0x509C37B: virEventPollCleanupHandles (vireventpoll.c:583) ==11843== by 0x509C711: virEventPollRunOnce (vireventpoll.c:652) ==11843== by 0x509A620: virEventRunDefaultImpl (virevent.c:274) ==11843== by 0x520D21C: virNetServerRun (virnetserver.c:1112) ==11843== by 0x11F368: main (libvirtd.c:1513) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Use absDirPath instead of absFilePath. https://bugzilla.redhat.com/show_bug.cgi?id=1028107
-
- 07 11月, 2013 7 次提交
-
-
由 Michal Privoznik 提交于
So far we are checking if qemu supports 'nbd-server-start'. This, however, makes no sense on the source as nbd-server-* is used on the destination. On the source the 'drive-mirror' is used instead. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Chen Hanxiao 提交于
A copy-paste error. s/model/vendor id Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
由 Michal Privoznik 提交于
Since 21685c95 we have tests/virpcitestdata dir containing the PCI config files for some dummy PCI devices that are used int virpcitest. However, the directory containing the config files is not distributed making 'make rpm' fail. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
-
由 Peter Krempa 提交于
For some strange reason virDomainDiskSourcePoolDefParse accessed def of the disk and allocated the pool object in it. To avoid the need to carry over the disk definition object, refactor this function to return the allocated object instead.
-
由 Eric Blake 提交于
Commit b0f85462 broke the build on mingw, by exposing code that had Linux-specific dependencies but which was previously protected by libnuma ifdef guards: make[3]: Entering directory `/home/eblake/libvirt-tmp/build/src' CC libvirt_driver_la-nodeinfo.lo ../../src/nodeinfo.c: In function 'virNodeGetSiblingsList': ../../src/nodeinfo.c:1543:30: error: 'SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX' undeclared (first use in this function) if (virFileReadAll(path, SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX, &buf) < 0) ^ ../../src/nodeinfo.c:1543:30: note: each undeclared identifier is reported only once for each function it appears in ../../src/nodeinfo.c: In function 'virNodeCapsFillCPUInfo': ../../src/nodeinfo.c:1562:5: error: implicit declaration of function 'virNodeGetCpuValue' [-Werror=implicit-function-declaration] if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id, ^ ../../src/nodeinfo.c:1562:5: error: nested extern declaration of 'virNodeGetCpuValue' [-Werror=nested-externs] ../../src/nodeinfo.c:1562:35: error: 'SYSFS_CPU_PATH' undeclared (first use in this function) if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id, ^ cc1: all warnings being treated as errors * src/nodeinfo.c (virNodeCapsFillCPUInfo): Make conditional. (virNodeGetSiblingsList): Move into #ifdef linux block. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
This gets rid of another stat() per volume, as well as cutting bytes read in half, when populating the volumes of a directory pool during a pool refresh. Not to mention that it provides an interface that can let gluster pools also probe file types. * src/util/virstoragefile.h (virStorageFileProbeFormatFromFD): Delete. (virStorageFileProbeFormatFromBuf): New prototype. (VIR_STORAGE_MAX_HEADER): New constant, based on... * src/util/virstoragefile.c (STORAGE_MAX_HEAD): ...old name. (vmdk4GetBackingStore, virStorageFileGetMetadataInternal) (virStorageFileProbeFormat): Adjust clients. (virStorageFileProbeFormatFromFD): Delete. (virStorageFileProbeFormatFromBuf): Export. * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget): Adjust client. * src/libvirt_private.syms (virstoragefile.h): Adjust exports. Signed-off-by: NEric Blake <eblake@redhat.com>
-