- 03 11月, 2017 4 次提交
-
-
由 Jiri Denemark 提交于
We already support several ways of setting migration bandwidth and this is not adding another one. With this patch we are able to read and write this parameter using query-migrate-parameters and migrate-set-parameters in one call with all other parameters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The parameters used "migrate" prefix which is pretty redundant and qemuMonitorMigrationParams structure is our internal representation of QEMU migration parameters and it is supposed to use names which match QEMU names. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
We already support setting the maximum downtime with a dedicated virDomainMigrateSetMaxDowntime API. This patch does not implement another way of setting the downtime by adding a new public migration parameter. It just makes sure any parameter we are able to get from a QEMU monitor by query-migrate-parameters can be passed back to QEMU via migrate-set-parameters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The check can be easily replaced with a simple test in the JSON implementation and we don't need to update it every time a new parameter is added. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 26 10月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
This new capability enables a pause before device state serialization so that we can finish all block jobs without racing with the end of the migration. The pause is indicated by "pre-switchover" state. Once we're done QEMU enters "device" migration state. This patch just defines the new capability and QEMU migration states and their mapping to our job states. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 20 10月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
The only remaining user of qemuMonitorGetMigrationCapability is our test suite. Let's replace qemuMonitorGetMigrationCapability with qemuMonitorGetMigrationCapabilities there and drop the unused function. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 17 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
When migration fails, QEMU may provide a description of the error in the reply to query-migrate QMP command. We can fetch this error and use it instead of the generic "unexpectedly failed" message. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 16 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
query-cpu-definitions QMP command returns a list of unavailable features which prevent CPU models from being usable on the current host. So far we only checked whether the list was empty to mark CPU models as (un)usable. This patch parses all unavailable features for each CPU model and stores them in virDomainCapsCPUModel as a list of usability blockers. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 05 10月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1447169 Since domain can have at most one watchdog it simplifies things a bit. However, since we must be able to set the watchdog action as well, new monitor command needs to be used. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 25 9月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
Seeing a log message saying 'flags=93' is ambiguous & confusing unless you happen to know that libvirt always prints flags as hex. Change our debug messages so that they always add a '0x' prefix when printing flags, and '0' prefix when printing mode. A few other misc places gain a '0x' prefix in error messages too. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 14 9月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Drop all the monitor code necessary to do the downstream block jobs. Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 27 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Allow getting the raw data from query-blockstats, so that we can use it to detect the backing chain later on. Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 10 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
vcpu properties gathered from query-hotpluggable cpus need to be passed back to qemu. As qemu did not use the node-id property until now and libvirt forgot to pass it back properly (it was parsed but not passed around) we did not honor this. This patch adds node-id to the structures where it was missing and passes it around as necessary. The test data was generated with a VM with following config: <numa> <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/> <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/> </numa> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053
-
- 13 6月, 2017 1 次提交
-
-
由 Marc Hartmayer 提交于
Add a comment for mon->watch to make clear what's the purpose of this value. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 26 5月, 2017 1 次提交
-
-
由 Martin Kletzander 提交于
QEMU will likely report the details of it shutting down, particularly whether the shutdown was initiated by the guest or host. We should forward that information along, at least for shutdown events. Reset has that as well, however that is not a lifecycle event and would add extra constants that might not be used. It can be added later on. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1384007Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 5月, 2017 1 次提交
-
-
由 Christian Ehrhardt 提交于
If a shutdown is expected because it was triggered via libvirt we can also expect the monitor to close. In those cases do not report an internal error like: "internal error: End of file from qemu monitor" Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
- 10 4月, 2017 2 次提交
-
-
由 Marc Hartmayer 提交于
Implement qemuMonitorRegister() as there is already a qemuMonitorUnregister() function. This way it may be easier to understand the code paths. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Marc Hartmayer 提交于
There were multiple race conditions that could lead to segmentation faults. The first precondition for this is qemuProcessLaunch must fail sometime shortly after starting the new QEMU process. The second precondition for the segmentation faults is that the new QEMU process dies - or to be more precise the QEMU monitor has to be closed irregularly. If both happens during qemuProcessStart (starting a domain) there are race windows between the thread with the event loop (T1) and the thread that is starting the domain (T2). First segmentation fault scenario: If qemuProcessLaunch fails during qemuProcessStart the code branches to the 'stop' path where 'qemuMonitorSetDomainLog(priv->mon, NULL, NULL, NULL)' will set the log function of the monitor to NULL (done in T2). In the meantime the event loop of T1 will wake up with an EOF event for the QEMU monitor because the QEMU process has died. The crash occurs if T1 has checked 'mon->logFunc != NULL' in qemuMonitorIO just before the logFunc was set to NULL by T2. If this situation occurs T1 will try to call mon->logFunc which leads to the segmentation fault. Solution: Require the monitor lock for setting the log function. Backtrace: 0 0x0000000000000000 in ?? () 1 0x000003ffe9e45316 in qemuMonitorIO (watch=<optimized out>, fd=<optimized out>, events=<optimized out>, opaque=0x3ffe08aa860) at ../../src/qemu/qemu_monitor.c:727 2 0x000003fffda2e1a4 in virEventPollDispatchHandles (nfds=<optimized out>, fds=0x2aa000fd980) at ../../src/util/vireventpoll.c:508 3 0x000003fffda2e398 in virEventPollRunOnce () at ../../src/util/vireventpoll.c:657 4 0x000003fffda2ca10 in virEventRunDefaultImpl () at ../../src/util/virevent.c:314 5 0x000003fffdba9366 in virNetDaemonRun (dmn=0x2aa000cc550) at ../../src/rpc/virnetdaemon.c:818 6 0x000002aa00024668 in main (argc=<optimized out>, argv=<optimized out>) at ../../daemon/libvirtd.c:1541 Second segmentation fault scenario: If qemuProcessLaunch fails it will unref the log context and with invoking qemuMonitorSetDomainLog(priv->mon, NULL, NULL, NULL) qemuDomainLogContextFree() will be invoked. qemuDomainLogContextFree() invokes virNetClientClose() to close the client and cleans everything up (including unref of _virLogManager.client) when virNetClientClose() returns. When T1 is now trying to report 'qemu unexpectedly closed the monitor' libvirtd will crash because the client has already been freed. Solution: As the critical section in qemuMonitorIO is protected with the monitor lock we can use the same solution as proposed for the first segmentation fault. Backtrace: 0 virClassIsDerivedFrom (klass=0x3100979797979797, parent=0x2aa000d92f0) at ../../src/util/virobject.c:169 1 0x000003fffda659e6 in virObjectIsClass (anyobj=<optimized out>, klass=<optimized out>) at ../../src/util/virobject.c:365 2 0x000003fffda65a24 in virObjectLock (anyobj=0x3ffe08c1db0) at ../../src/util/virobject.c:317 3 0x000003fffdba4688 in virNetClientIOEventLoop (client=client@entry=0x3ffe08c1db0, thiscall=thiscall@entry=0x2aa000fbfa0) at ../../src/rpc/virnetclient.c:1668 4 0x000003fffdba4b4c in virNetClientIO (client=client@entry=0x3ffe08c1db0, thiscall=0x2aa000fbfa0) at ../../src/rpc/virnetclient.c:1944 5 0x000003fffdba4d42 in virNetClientSendInternal (client=client@entry=0x3ffe08c1db0, msg=msg@entry=0x2aa000cc710, expectReply=expectReply@entry=true, nonBlock=nonBlock@entry=false) at ../../src/rpc/virnetclient.c:2116 6 0x000003fffdba6268 in virNetClientSendWithReply (client=0x3ffe08c1db0, msg=0x2aa000cc710) at ../../src/rpc/virnetclient.c:2144 7 0x000003fffdba6e8e in virNetClientProgramCall (prog=0x3ffe08c1120, client=<optimized out>, serial=<optimized out>, proc=<optimized out>, noutfds=<optimized out>, outfds=0x0, ninfds=0x0, infds=0x0, args_filter=0x3fffdb64440 <xdr_virLogManagerProtocolDomainReadLogFileArgs>, args=0x3ffffffe010, ret_filter=0x3fffdb644c0 <xdr_virLogManagerProtocolDomainReadLogFileRet>, ret=0x3ffffffe008) at ../../src/rpc/virnetclientprogram.c:329 8 0x000003fffdb64042 in virLogManagerDomainReadLogFile (mgr=<optimized out>, path=<optimized out>, inode=<optimized out>, offset=<optimized out>, maxlen=<optimized out>, flags=0) at ../../src/logging/log_manager.c:272 9 0x000003ffe9e0315c in qemuDomainLogContextRead (ctxt=0x3ffe08c2980, msg=0x3ffffffe1c0) at ../../src/qemu/qemu_domain.c:4422 10 0x000003ffe9e280a8 in qemuProcessReadLog (logCtxt=<optimized out>, msg=msg@entry=0x3ffffffe288) at ../../src/qemu/qemu_process.c:1800 11 0x000003ffe9e28206 in qemuProcessReportLogError (logCtxt=<optimized out>, msgprefix=0x3ffe9ec276a "qemu unexpectedly closed the monitor") at ../../src/qemu/qemu_process.c:1836 12 0x000003ffe9e28306 in qemuProcessMonitorReportLogError (mon=mon@entry=0x3ffe085cf10, msg=<optimized out>, opaque=<optimized out>) at ../../src/qemu/qemu_process.c:1856 13 0x000003ffe9e452b6 in qemuMonitorIO (watch=<optimized out>, fd=<optimized out>, events=<optimized out>, opaque=0x3ffe085cf10) at ../../src/qemu/qemu_monitor.c:726 14 0x000003fffda2e1a4 in virEventPollDispatchHandles (nfds=<optimized out>, fds=0x2aa000fd980) at ../../src/util/vireventpoll.c:508 15 0x000003fffda2e398 in virEventPollRunOnce () at ../../src/util/vireventpoll.c:657 16 0x000003fffda2ca10 in virEventRunDefaultImpl () at ../../src/util/virevent.c:314 17 0x000003fffdba9366 in virNetDaemonRun (dmn=0x2aa000cc550) at ../../src/rpc/virnetdaemon.c:818 18 0x000002aa00024668 in main (argc=<optimized out>, argv=<optimized out>) at ../../daemon/libvirtd.c:1541 Other code parts where the same problem was possible to occur are fixed as well (qemuMigrationFinish, qemuProcessStart, and qemuDomainSaveImageStartVM). Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reported-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
-
- 05 4月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
QEMU_CHECK_MONITOR_* already logs the object and vm name
-
- 30 3月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
If calling query-cpu-model-expansion on the 'host'/'max' CPU model with 'migratable' property set to false succeeds, we know QEMU is able to tell us which features would disable migration. Thus we can mark all enabled features as migratable. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
QEMU is able to tell us whether a CPU feature would block migration or not. This patch adds support for storing such features in qemuMonitorCPUModelInfo. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 27 3月, 2017 6 次提交
-
-
由 Peter Krempa 提交于
The hyperv panic notifier reports additional data in form of 5 registers that are reported in the crash event from qemu. Log them into the VM log file and report them as a warning so that admins can see the cause of crash of their windows VMs. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1426176
-
由 Peter Krempa 提交于
For certain kinds of panic notifiers (notably hyper-v) qemu is able to report some data regarding the crash passed from the guest. Make the data accessible to the callback in qemu so that it can be processed further.
-
由 Peter Krempa 提交于
To allow matching the node names gathered via 'query-named-block-nodes' we need to query and then use the top level nodes from 'query-block'. Add the data to the structure returned by qemuMonitorGetBlockInfo.
-
由 Peter Krempa 提交于
Add monitor tooling for calling query-named-block-nodes. The monitor returns the data as the raw JSON array that is returned from the monitor. Unfortunately the logic to extract the node names for a complete backing chain will be so complex that I won't be able to extract any meaningful subset of the data in the monitor code.
-
由 Peter Krempa 提交于
Add code to call the appropriate monitor command and code to lookup the given disk backing chain member.
-
由 Peter Krempa 提交于
The event is fired when a given block backend node (identified by the node name) experiences a write beyond the bound set via block-set-write-threshold QMP command. This wires up the monitor code to extract the data and allow us receiving the events and the capability.
-
- 25 3月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Add the fields to support setting tls-creds and tls-hostname during a migration (either source or target). Modify the query migration function to check for the presence and set the field for future consumers to determine which of 3 conditions is being met (NULL, present and set to "", or present and sent to something). These correspond to qemu commit id '4af245dc3' which added support to default the value to "" and allow setting (or resetting) to "" in order to disable. This reset option allows libvirt to properly use the tls-creds and tls-hostname parameters. Modify code paths that either allocate or use stack space in order to call qemuMigrationParamsClear or qemuMigrationParamsFree for cleanup. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 23 3月, 2017 1 次提交
-
-
由 John Ferlan 提交于
The prototype requires not passing a NULL in the parameter and the callers all would fail far before this code would fail if 'vm' was NULL, so just remove the check. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 17 3月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
qemuMonitorGetGuestCPU can now optionally create CPU data from filtered-features in addition to feature-words. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 16 3月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
There were couple of reports on the list (e.g. [1]) that guests with huge amounts of RAM are unable to start because libvirt kills qemu in the initialization phase. The problem is that if guest is configured to use hugepages kernel has to zero them all out before handing over to qemu process. For instance, 402GiB worth of 1GiB pages took around 105 seconds (~3.8GiB/s). Since we do not want to make the timeout for connecting to monitor configurable, we have to teach libvirt to count with this fact. This commit implements "1s per each 1GiB of RAM" approach as suggested here [2]. 1: https://www.redhat.com/archives/libvir-list/2017-March/msg00373.html 2: https://www.redhat.com/archives/libvir-list/2017-March/msg00405.htmlSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 3月, 2017 1 次提交
-
-
由 Philipp Hahn 提交于
QEMU should be written all upper or all lower case.
-
- 04 3月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
While query-cpu-model-expansion returns only boolean features on s390, but x86_64 reports some integer and string properties which we are interested in. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 10 2月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
==11846== 240 bytes in 1 blocks are definitely lost in loss record 81 of 107 ==11846== at 0x4C2BC75: calloc (vg_replace_malloc.c:624) ==11846== by 0x18C74242: virAllocN (viralloc.c:191) ==11846== by 0x4A05E8: qemuMonitorCPUModelInfoCopy (qemu_monitor.c:3677) ==11846== by 0x446E3C: virQEMUCapsNewCopy (qemu_capabilities.c:2171) ==11846== by 0x437335: testQemuCapsCopy (qemucapabilitiestest.c:108) ==11846== by 0x437CD2: virTestRun (testutils.c:180) ==11846== by 0x437AD8: mymain (qemucapabilitiestest.c:176) ==11846== by 0x4397B6: virTestMain (testutils.c:992) ==11846== by 0x437B44: main (qemucapabilitiestest.c:188) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 David Dai 提交于
Using libvirt to do live migration over RDMA via IPv6 address failed. For example: rhel73_host1_guest1 qemu+ssh://[deba::2222]/system --verbose root@deba::2222's password: error: internal error: unable to execute QEMU command 'migrate': RDMA ERROR: could not rdma_getaddrinfo address deba As we can see, the IPv6 address used by rdma_getaddrinfo() has only "deba" part because we didn't properly enclose the IPv6 address in [] and passed rdma:deba::2222:49152 as the migration URI in qemuMonitorMigrateToHost. Signed-off-by: NDavid Dai <zdai@linux.vnet.ibm.com>
-
- 18 1月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
In cases where CPU hotplug is supported by qemu force the monitor to reject invalid or broken responses to 'query-cpus'. It's expected that the command returns usable data in such case.
-
- 06 1月, 2017 1 次提交
-
-
由 Collin L. Walling 提交于
query-cpu-model-expansion is used to get a list of features for a given cpu model name or to get the model and features of the host hardware/environment as seen by Qemu/kvm. Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com> Signed-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com>
-