- 09 1月, 2014 2 次提交
-
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1019053 (cherry picked from commit e3ef20d7) Conflicts: missing support for changing the migration listen address src/qemu/qemu.conf src/qemu/qemu_conf.c src/qemu/qemu_conf.h src/qemu/test_libvirtd_qemu.aug.in
-
由 Wang Yufei 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1019053 When we migrate vms concurrently, there's a chance that libvirtd on destination assigns the same port for different migrations, which will lead to migration failure during prepare phase on destination. So we use virPortAllocator here to solve the problem. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com> (cherry picked from commit 0196845d) Conflicts: missing support for WebSockets and listen address virAsprintf doesn't report OOM src/qemu/qemu_command.h src/qemu/qemu_conf.h src/qemu/qemu_driver.c src/qemu/qemu_migration.c
-
- 07 10月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
The virConnectPtr is passed around loads of nwfilter code in order to provide it as a parameter to the callback registered by the virt drivers. None of the virt drivers use this param though, so it serves no purpose. Avoiding the need to pass a virConnectPtr means that the nwfilterStateReload method no longer needs to open a bogus QEMU driver connection. This addresses a race condition that can lead to a crash on startup. The nwfilter driver starts before the QEMU driver and registers some callbacks with DBus to detect firewalld reload. If the firewalld reload happens while the QEMU driver is still starting up though, the nwfilterStateReload method will open a connection to the partially initialized QEMU driver and cause a crash. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 999d72fb) Conflicts: src/nwfilter/nwfilter_driver.c
-
由 Peter Krempa 提交于
In the original implementation of external checkpoints I've mistakenly used the live definition to be stored in the save image. The normal approach is to use the "migratable" definition. This was discovered when commit 07966f6a changed the behavior to use a converted XML from the user to do the compatibility check to fix problem when using the regular machine saving. As the previous patch added a compatibility layer, we can now change the type of the XML in the image. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1008340 (cherry picked from commit 1b7bfa65)
-
由 Peter Krempa 提交于
External checkpoints have a bug in the implementation where they use the normal definition instead of the "migratable" one. This causes errors when the snapshot is being reverted using the workaround method via qemuDomainRestoreFlags() with a custom XML. This issue was introduced when commit 07966f6a changed the code to compare "migratable" XMLs from the user as we should have used migratable in the image too. This patch adds a compatibility layer, so that fixing the snapshot code won't make existing snapshots fail to load. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1008340 (cherry picked from commit 59898a88)
-
- 12 7月, 2013 5 次提交
-
-
由 Ján Tomko 提交于
We can only pass values up to LLONG_MAX through JSON and QEMU checks if the int64_t number is not negative at startup since 1.5.0. https://bugzilla.redhat.com/show_bug.cgi?id=974010 (cherry picked from commit d3c87884)
-
由 Ján Tomko 提交于
Convert input XML to migratable before using it in qemuDomainSaveImageOpen. XML in the save image is migratable, i.e. doesn't contain implicit controllers. If these controllers were in a non-default order in the input XML, the ABI check would fail. Removing and re-adding these controllers fixes it. https://bugzilla.redhat.com/show_bug.cgi?id=834196 (cherry picked from commit 07966f6a)
-
由 Peter Krempa 提交于
If snapshot creation failed for example due to invalid use of the "REUSE_EXTERNAL" flag, libvirt killed access to the original image file instead of the new image file. On machines with selinux this kills the whole VM as the selinux context is enforced immediately. * qemu_driver.c:qemuDomainSnapshotUndoSingleDiskActive(): - Kill access to the new image file instead of the old one. Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=906639 (cherry picked from commit 17704675)
-
由 Martin Kletzander 提交于
Function qemuDomainSetBlockIoTune() was checking QEMU capabilities even when !(flags & VIR_DOMAIN_AFFECT_LIVE) and the domain was shutoff, resulting in the following problem: virsh # domstate asdf; blkdeviotune asdf vda --write-bytes-sec 100 shut off error: Unable to change block I/O throttle error: unsupported configuration: block I/O throttling not supported with this QEMU binary Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=965016 (cherry picked from commit 5af3ce82)
-
由 Daniel P. Berrange 提交于
It is possible to build a kernel without swap cgroup controls present. This causes a fatal error when querying memory parameters. Treat missing swap controls as meaning "unlimited". The fatal error remains if the user tries to actually change the limit. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit f493d83f)
-
- 11 7月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
If qemuMonitorBlockJob returned 0, qemuDomainBlockPivot might return 0 even if an error occured. https://bugzilla.redhat.com/show_bug.cgi?id=977678 (cherry picked from commit c34107df)
-
- 20 6月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Cherry-picked from b2375453 As a consequence of the cgroup layout changes from commit '632f78ca', the qemuDomainGetSchedulerParameters[Flags]()' and qemuGetSchedulerType() APIs failed to return data for a non running domain. This can be seen through a 'virsh schedinfo <domain>' command which returns: Scheduler : Unknown error: Requested operation is not valid: cgroup CPU controller is not mounted Prior to that change a non running domain would return: Scheduler : posix cpu_shares : 0 vcpu_period : 0 vcpu_quota : 0 emulator_period: 0 emulator_quota : 0 This patch will restore the capability to return configuration only data for a non running domain regardless of whether cgroups are available. NOTE: Needed to change the VIR_STRDUP(ret, "posix"); to ret = strdup("posix"); and added the virReportOOMError(); on failure.
-
- 17 5月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
Commit 632f78ca introduced a regression which causes schedinfo being unable to set some parameters. When migrating to priv->cgroup there was missing variable left out and due to passed NULL to underlying function, the setting failed. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963592
-
- 11 5月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=851411 https://bugzilla.redhat.com/show_bug.cgi?id=955500 The first problem was that virFileOpenAs was returning fd (-1) in one of the error cases rather than ret (-errno), so the caller thought that the error was EPERM rather than ENOENT. The second problem was that some log messages in the general purpose qemuOpenFile() function would always say "Failed to create" even if the caller hadn't included O_CREAT (i.e. they were trying to open an existing file). This fixes virFileOpenAs to jump down to the error return (which returns ret instead of fd) in the previously mentioned incorrect failure case of virFileOpenAs(), removes all error logging from virFileOpenAs() (since the callers report it), and modifies qemuOpenFile to appropriately use "open" or "create" in its log messages. NB: I seriously considered removing logging from all callers of virFileOpenAs(), but there is at least one case where the caller doesn't want virFileOpenAs() to log any errors, because it's just going to try again (qemuOpenFile()). We can't simply make a silent variation of virFileOpenAs() though, because qemuOpenFile() can't make the decision about whether or not it wants to retry until after virFileOpenAs() has already returned an error code. Likewise, I also considered changing virFileOpenAs() to return -1 with errno set on return, and may still do that, but only as a separate patch, as it obscures the intent of this patch too much. (cherry picked from commit a2c1bedb)
-
- 09 5月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
The controller element supports non-disk controller types too. https://bugzilla.redhat.com/show_bug.cgi?id=960958 (cherry picked from commit c075f89f)
-
- 02 5月, 2013 1 次提交
-
-
由 Laine Stump 提交于
virPCIDeviceReattach and virPCIDeviceUnbindFromStub (called by virPCIDeviceReattach) had previously required the name of the stub driver as input. This is unnecessary, because the name of the driver the device is currently bound to can be found by looking at the link: /sys/bus/pci/dddd:bb:ss.ff/driver Instead of requiring that the name of the expected stub driver name and only unbinding if that one name is matched, we no longer take a driver name in the arglist for either of these functions. virPCIDeviceUnbindFromStub just compares the name of the currently bound driver to a list of "well known" stubs (right now contains "pci-stub" and "vfio-pci" for qemu, and "pciback" for xen), and only performs the unbind if it's one of those devices. This allows virsh nodedevice-reattach to work properly across a libvirtd restart, and fixes a couple of cases where we were erroneously still hard-coding "pci-stub" as the drive name. For some unknown reason, virPCIDeviceReattach had been calling modprobe on the stub driver prior to unbinding the device. This was problematic because we no longer know the name of the stub driver in that function. However, it is pointless to probe for the stub driver at that time anyway - because the device is bound to the stub driver, we are guaranteed that it is already loaded, and so that call to modprobe has been removed.
-
- 30 4月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
This adds addresses to domxml-to-native output and chooses the correct virtio devices for ccw and s390 machines. https://bugzilla.redhat.com/show_bug.cgi?id=957077
-
- 26 4月, 2013 1 次提交
-
-
由 Laine Stump 提交于
The differences from virNodeDeviceDettach are very minor: 1) Check that the flags are 0. 2) Set the virPCIDevice's stubDriver according to the driverName that is passed in. 3) Call virPCIDeviceDetach with a NULL stubDriver, indicating it should get the name of the stub driver from the virPCIDevice object.
-
- 25 4月, 2013 1 次提交
-
-
由 Wido den Hollander 提交于
This for example prohibits you to use iotune for Ceph or Sheepdog devices. Signed-off-by: NWido den Hollander <wido@widodh.nl>
-
- 24 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all drivers implementing public APIs use a naming convention for their implementation that matches the public API name. eg for the public API virDomainCreate make sure QEMU uses qemuDomainCreate and not qemuDomainStart Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Ensure that the driver struct field names match the public API names. For an API virXXXX we must have a driver struct field xXXXX. ie strip the leading 'vir' and lowercase any leading uppercase letters. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 4月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Refactoring done in 19c6ad9a didn't correctly take into account the order cgroup limit modification needs to be done in. This resulted into errors when decreasing the limits. The operations need to take place in this order: decrease hard limit change swap hard limit or change swap hard limit increase hard limit This patch also fixes the check if the hard_limit is less than swap_hard_limit to print better error messages. For this purpose I introduced a helper function virCompareLimitUlong to compare limit values where value of 0 is equal to unlimited. Additionally the check is now applied also when the user does not provide all of the tunables through the API and in that case the currently set values are used. This patch resolves: https://bugzilla.redhat.com/show_bug.cgi?id=950478
-
- 22 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
Wrong use of the parentheses causes "rc" always having a boolean value, either "1" or "0", and thus we can't get the detailed error message when it fails: Before (I only have 1 node): % virsh numatune f18 --nodeset 12 error: Unable to change numa parameters error: unable to set numa tunable: Unknown error -1 After: virsh numatune f18 --nodeset 12 error: Unable to change numa parameters error: unable to set numa tunable: Invalid argument
-
- 17 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
Detected by a simple Shell script: for i in $(git ls-files -- '*.[ch]'); do awk 'BEGIN { fail=0 } /# *include.*\.h/{ match($0, /["<][^">]*[">]/) arr[substr($0, RSTART+1, RLENGTH-2)]++ } END { for (key in arr) { if (arr[key] > 1) { fail=1 printf("%d %s\n", arr[key], key) } } if (fail == 1) exit 1 }' $i if test $? != 0; then echo "Duplicate header(s) in $i" fi done; A later patch will add the syntax-check to avoid duplicate headers.
-
- 16 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Rename all the virCgroupForXXX methods to use the form virCgroupNewXXX since they are all constructors. Also make sure the output parameter is the last one in the list, and annotate all pointers as non-null. Fix up all callers, and make sure they use true/false not 0/1 for the boolean parameters Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of calling virCgroupForDomain every time we need the virCgrouPtr instance, just do it once at Vm startup and cache a reference to the object in qemuDomainObjPrivatePtr until shutdown of the VM. Removing the virCgroupPtr from the QEMU driver state also means we don't have stale mount info, if someone mounts the cgroups filesystem after libvirtd has been started Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 4月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Report the errors as: Domain not found: no domain with matching uuid '41414141-4141-4141-4141-414141414141' (crashtest) instead of: Domain not found: no domain with matching uuid '41414141-4141-4141-4141-414141414141'
-
由 Peter Krempa 提交于
Use the helper to lookup the domain object in the remaining places. This patch also fixes error reporting when the domain was not found in several functions that were printing the raw UUID buffer instead of the formatted string. The offending functions were: qemuDomainGetInterfaceParameters qemuDomainSetInterfaceParameters qemuGetSchedulerParametersFlags qemuSetSchedulerParametersFlags qemuDomainGetNumaParameters qemuDomainSetNumaParameters qemuDomainGetMemoryParameters qemuDomainSetMemoryParameters qemuDomainGetBlkioParameters qemuDomainSetBlkioParameters qemuDomainGetCPUStats
-
- 11 4月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
If the path part of connection URI is not present, cfg is used unitialized. https://bugzilla.redhat.com/show_bug.cgi?id=950855
-
- 08 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
To support "shareable" for volume type disk, we have to translate the source before trying to add the shared disk entry. To achieve the goal, this moves the helper qemuTranslateDiskSourcePool into src/qemu/qemu_conf.c, and introduce an internal only member (voltype) for struct _virDomainDiskSourcePoolDef, to record the underlying volume type for use when building the drive string. Later patch will support "shareable" volume type disk.
-
- 06 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
For both "live" and "config" changes of vcpupin and emulatorpin, an all clear bitmap doesn't make sense, and it can just cause corruptions. E.g (similar for emulatorpin). % virsh vcpupin hame 0 8,^8 --config % virsh vcpupin hame VCPU: CPU Affinity ---------------------------------- 0: 1: 0-63 2: 0-63 3: 0-63 % virsh dumpxml hame | grep cpuset <vcpupin vcpu='0' cpuset=''/> % virsh start hame error: Failed to start domain hame error: An error occurred, but the cause is unknown
-
- 05 4月, 2013 6 次提交
-
-
由 Peter Krempa 提交于
When setting processor count for a domain using the API libvirt enforced a maximum processor count, while it isn't enforced when taking the XML path. This patch removes the check to match the XML.
-
由 Daniel P. Berrange 提交于
Currently when getting an instance of virCgroupPtr we will create the path in all cgroup controllers. Only at the virt driver layer are we attempting to filter controllers. This is bad because the mere act of creating the dirs in the controllers can have a functional impact on the kernel, particularly for performance. Update the virCgroupForDriver() method to accept a bitmask of controllers to use. Only create dirs in the controllers that are requested. When creating cgroups for domains, respect the active controller list from the parent cgroup Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
This patch removes the defaultDiskDriverName from the virCaps structure. This particular default value is used only in the qemu driver so this patch uses the recently added callback to fill the driver name if it's needed instead of propagating it through virCaps.
-
由 Peter Krempa 提交于
Move the xmlopt and caps arguments to the end of the argument list.
-
由 Peter Krempa 提交于
This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesting to fill and validate driver specific details of the configuration. This allows to use sensible defaults and checks on a per driver basis at the time the XML is parsed. Two callback pointers are stored in the new virDomainXMLConf object: * virDomainDeviceDefPostParseCallback (devicesPostParseCallback) - called for a single device parsed and for every single device in a domain config. A virDomainDeviceDefPtr is passed along with the domain definition and virCaps. * virDomainDefPostParseCallback, (domainPostParseCallback) - A callback that is meant to process the domain config after it's parsed. A virDomainDefPtr is passed along with virCaps. Both types of callbacks support arbitrary opaque data passed for the callback functions. Errors may be reported in those callbacks resulting in a XML parsing failure.
-
由 Peter Krempa 提交于
This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i done and a few manual tweaks.
-
- 03 4月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Mimic the fix done in 02b90972 to fix crash by accessing an already freed structure. Also copy the explaining comment why the pointer can't be accessed any more.
-
- 28 3月, 2013 1 次提交
-
-
由 Guannan Ren 提交于
-
- 21 3月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The VIR_ERR_NO_SUPPORT error code is reserved for cases where an API is not implemented in a driver. It definitely should not be used when an API execution fails due to unsupported operation.
-