- 11 12月, 2018 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Disable external snapshot of a readonly disk for domains as this operation is not very useful. Such a snapshot is not possible for active domains but the error message from QEMU is more cryptic: error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied This error at least makes the error more understandable for active domains and disallows for inactive domains as well. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 12月, 2018 2 次提交
-
-
由 John Ferlan 提交于
Commit 212dc928 made a generic qemuDomainGetIOThreadsMon which would fail if the QEMU_CAPS_OBJECT_IOTHREAD didn't exist. Then commit d1eac927 used that helper for the collection of all domain stats. However, if the capability doesn't exist, then the entire stats collection fails. Since the IOThread stats were meant to be if available only, thus rather than failing if the capability doesn't exist, let's just not collect the stats. Restore the caps failure logic for qemuDomainGetIOThreadsLive. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 John Ferlan 提交于
During qemuConnectGetAllDomainStats if qemuDomainGetStats causes a failure, then when collecting more than one domain's worth of statistics the loop in virDomainStatsRecordListFree would call virDomainFree which would call virResetLastError effectively wiping out the reason we failed leaving the caller with no idea why the collection failed. To fix this, let's Preserve the error and Restore it prior to return so that a caller such as 'virsh domstats' doesn't get the generic "error: An error occurred, but the cause is unknown". Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 06 12月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
We are preparing a certain disk source passed in as '@src' so the individual functions should use that rather than disk->src which corresponds to the top level element of the chain only. Without this change TLS and persistent reservations would not work for backing images of a chain when using -blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function clears and frees the passed buffers on success, but not in one case of failure. Modify the control flow that the args are always consumed, record it in the docs and remove few pointless cleanup paths in callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 05 12月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1656014 An RNG device can consists of more devices than RND device itself. For instance, in case of EGD there is a chardev that connects to EGD daemon and feeds the qemu with random data. When doing RNG device removal we have to remove the associated chardev as well. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Yuri Chornoivan 提交于
Signed-off-by: NYuri Chornoivan <yurchor@ukr.net> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 04 12月, 2018 3 次提交
-
-
由 Michal Privoznik 提交于
The way that the code is currently written makes my eyes hurt. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The indentation of the code in this function is a bit off. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There are two functions called from syncNicRxFilterMultiMode: virNetDevSetRcvAllMulti() and virNetDevSetRcvMulti(). Both of them return 0 on success and -1 on error. However, currently their return value is checked for != 0 which conflicts with our assumptions on retvals: a positive value is still considered success but with current check it would lead to failure. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 12月, 2018 10 次提交
-
-
由 Erik Skultety 提交于
Depending on whether QEMU actually supports the option, we can put the 'rendernode' on the '-display egl-headless' cmdline. https://bugzilla.redhat.com/show_bug.cgi?id=1628892Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
Just like for SPICE, we need to put the render node DRI device into the device cgroup list so that users don't need to add it manually via qemu.conf file. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
Just like for SPICE, we need to put the DRI device into the namespace, otherwise it will be left out from the DAC relabeling process. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
Unlike with SPICE and SDL which use the <gl> subelement to enable OpenGL acceleration, specifying egl-headless graphics in the XML has essentially the same meaning, thus in case of egl-headless we don't have a need for the 'enable' element attribute and we'll only be interested in the 'rendernode' one further down the road. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
Now that we have QAPI introspection of display types in QEMU upstream, we can check whether the 'rendernode' option is supported with egl-headless display type. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
We're going to need a bit more logic for egl-headless down the road so prepare a helper just like for the other display types. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
Up until now, we formatted 'rendernode=' onto QEMU cmdline only if the user specified it in the XML, otherwise we let QEMU do it for us. This causes permission issues because by default the /dev/dri/renderDX permissions are as follows: crw-rw----. 1 root video There's literally no reason why it shouldn't be libvirt picking the DRM render node instead of QEMU, that way (and because we're using namespaces by default), we can safely relabel the device within the namespace. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jason Baron 提交于
Guest network devices can set 'overflow' when there are a number of multicast ips configured. For virtio_net, the limit is only 64. In this case, the list of mac addresses is empty and the 'overflow' condition is set. Thus, the guest will currently receive no multicast traffic in this state. When 'overflow' is set in the guest, let's turn this into ALLMULTI on the host. Signed-off-by: NJason Baron <jbaron@akamai.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Stefan Schallenberg 提交于
Signed-off-by: NStefan Schallenberg <infos@nafets.de> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Stefan Schallenberg 提交于
Support for armv6l qemu guests has been added. Tested with arm1176 CPU on x86. Signed-off-by: NStefan Schallenberg <infos@nafets.de> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 29 11月, 2018 1 次提交
-
-
由 Jiri Denemark 提交于
Post-copy migration has been broken on the source since commit v3.8.0-245-g32c29f10 which implemented support for pause-before-switchover QEMU migration capability. Even though the migration itself went well, the source did not really know when it switched to the post-copy mode despite the messages logged by MIGRATION event handler. As a result of this, the events emitted by source libvirtd were not accurate and statistics of the completed migration would cover only the pre-copy part of migration. Moreover, if migration failed during the post-copy phase for some reason, the source libvirtd would just happily resume the domain, which could lead to disk corruption. With the pause-before-switchover capability enabled, the order of events emitted by QEMU changed: pause-before-switchover disabled enabled MIGRATION, postcopy-active STOP STOP MIGRATION, pre-switchover MIGRATION, postcopy-active The STOP even handler checks the migration status (postcopy-active) and sets the domain state accordingly. Which is sufficient when pause-before-switchover is disabled, but once we enable it, the migration status is still active when we get STOP from QEMU. Thus the domain state set in the STOP handler has to be corrected once we are notified that migration changed to postcopy-active. This results in two SUSPENDED events to be emitted by the source libvirtd during post-copy migration. The first one with VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED detail, while the second one reports the corrected VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY detail. This is inevitable because we don't know whether migration will eventually switch to post-copy at the time we emit the first event. https://bugzilla.redhat.com/show_bug.cgi?id=1647365Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 28 11月, 2018 4 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Both VIR_DOMAIN_FEATURE_HPT and VIR_DOMAIN_FEATURE_HTM are handled in the exact same way, so we can remove some duplicated code without losing any functionality. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 27 11月, 2018 1 次提交
-
-
由 Wang Huaqiang 提交于
Adding the interface in qemu to report CMT statistic information through command 'virsh domstats --cpu-total'. Below is a typical output: # virsh domstats 1 --cpu-total Domain: 'ubuntu16.04-base' ... cpu.cache.monitor.count=2 cpu.cache.monitor.0.name=vcpus_1 cpu.cache.monitor.0.vcpus=1 cpu.cache.monitor.0.bank.count=2 cpu.cache.monitor.0.bank.0.id=0 cpu.cache.monitor.0.bank.0.bytes=4505600 cpu.cache.monitor.0.bank.1.id=1 cpu.cache.monitor.0.bank.1.bytes=5586944 cpu.cache.monitor.1.name=vcpus_4-6 cpu.cache.monitor.1.vcpus=4,5,6 cpu.cache.monitor.1.bank.count=2 cpu.cache.monitor.1.bank.0.id=0 cpu.cache.monitor.1.bank.0.bytes=17571840 cpu.cache.monitor.1.bank.1.id=1 cpu.cache.monitor.1.bank.1.bytes=29106176 Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 23 11月, 2018 4 次提交
-
-
由 Michal Privoznik 提交于
If migration is cancelled or confirm phase fails the domain should be kept on the source even if VIR_MIGRATE_UNDEFINE_SOURCE was requested. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
There are some checks done when parsing a migration cookie. For instance, one of the checks ensures that the domain is not being migrated onto the same host. If that is the case, then we are in big trouble because the @vm is the same domain object used by source and it has some jobs sets and everything so recovering from failed cookie parsing would be needlessly hard. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
The function currently takes virDomainObjPtr because it's using both: the domain definition and domain private data. Unfortunately, this means that in prepare phase we can't parse migration cookie before putting incoming domain def onto domain objects list (addressed in the very next commit). Change the arguments so that virDomainDef and private data are passed instead of virDomainObjPtr. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
There are several functions called in the cleanup path. Some of them do report error (e.g. qemuDomainRemoveInactiveJob()) which may result in overwriting an error reported earlier with some less useful message. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 20 11月, 2018 1 次提交
-
-
由 Martin Kletzander 提交于
The virGet*ID() functions should be called only if the user exists not when it doesn't. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 11月, 2018 8 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1545732 Implement the QEMU driver mechanism in order to set the polling parameters for an IOThread within the bounds specified by the QEMU qapi parameter passing. Based heavily on patches originally posted by Pavel Hrdina <phrdina@redhat.com>, but modified to only handle alterations for a running guest. For the most part the API names changed, the typed parameters removed the poll enabled value, and the capabilities check was moved to just before the live attempt to set. Since changes are only supported for a running guest, no guest XML alterations were kept. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Add a capability check for IOThread polling (all were added at the same time, so only one check is necessary). Based on code originally posted by Pavel Hrdina <phrdina@redhat.com> with the only changes to include the more recent QEMU releases. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Rather than passing an iothread_id, let's pass a qemuMonitorIOThreadInfo structure so that a subsequent change to modify the iothread info can just generate and pass one. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
We're about to add a new state "modify" and thus the function goes from just Add/Del. Use an enum to manage. Extracted from code originally posted by Pavel Hrdina <phrdina@redhat.com>, but placed into a separate patch. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Add functions to set the IOThreadInfo param data for the live guest. Modify the _qemuMonitorIOThreadInfo to have a flag to indicate when a value was set so that we don't set a value unless it was desired to be set. Based on code originally posted by Pavel Hrdina <phrdina@redhat.com>, but extracted into a separate patch. Note that qapi expects to receive integer parameters rather than unsigned long long or unsigned int's. QEMU does save the value in larger signed 64 bit values eventually. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Process the IOThreads polling stats if available. Generate the output params record to be returned to the caller with the three values - poll-max-ns, poll-grow, and poll-shrink. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Separate out the fetch of the IOThread monitor call into a separate helper so that a subsequent domain statistics change can fetch the raw IOThread data and parse it as it sees fit. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
If there are IOThread polling values in the query-iothreads return buffer, then fill them in and set a bool indicating their presence. This will allow for displaying in a domain stats output eventually. Note that the QEMU values are managed a bit differently (as int's stored in int64_t's) than we will manage them (as unsigned long and int values). This is intentional to allow for value validation checking when it comes time to provide the values to QEMU. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 11月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
This reverts commit 8b8aefb3. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-