- 25 4月, 2019 6 次提交
-
-
由 Daniel Henrique Barboza 提交于
If the current QEMU guest can't wake up from suspend properly, and we are able to determine that, avoid suspending the guest at all. To be able to determine this support, QEMU needs to implement the 'query-current-machine' QMP call. This is reflected by the QEMU_CAPS_QUERY_CURRENT_MACHINE cap. If the cap is enabled, a new function qemuDomainProbeQMPCurrentMachine is called. This is wrapper for qemuMonitorGetCurrentMachineInfo, where the 'wakeup-suspend-support' flag is retrieved from 'query-current-machine'. If wakeupSuspendSupport is true, proceed with the regular flow of qemuDomainPMSuspendForDuration. The absence of QEMU_CAPS_QUERY_CURRENT_MACHINE indicates that we're dealing with a QEMU version older than 4.0 (which implements the required QMP API). In this case, proceed as usual with the suspend logic of qemuDomainPMSuspendForDuration, since we can't assume whether the guest has support or not. Fixes: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1759509Reported-by: NBalamuruhan S <bala24@linux.vnet.ibm.com> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
So far, this command returns a structure with only one member: 'wakeup-suspend-support'. But that's okay. It's what we are after anyway. Based-on-work-of: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
QEMU commit 46ea94ca9cf ("qmp: query-current-machine with wakeup-suspend-support") added a new QMP command called 'query-current-machine' that retrieves guest parameters that can vary in the same machine model (e.g. ACPI support for x86 VMs depends on the '--no-acpi' option). Currently, this API has a single flag, 'wakeup-suspend-support', that indicates whether the guest has the capability of waking up from suspended state. Introduce a libvirt capability that reflects whether qemu has the monitor command. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Pavel Hrdina 提交于
virCgroup struct is always defined and the free function is not calling anything that would require OS supporting cgroups. This fixes an issue if we try to start a VM with QEMU binary that doesn't support QXL. The start operation will fail in qemuProcessStartValidateVideo() which will set correct error message, but later in one of the cleanup paths we will call qemuDomainObjPrivateDataClear() which always calls virCgroupFree() and that will fail on OS that doesn't support cgroups and it will set a new error which will be eventually reported to user. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Allen, John 提交于
If a bitmap of a shorter length than the data buffer is passed to virBitmapToDataBuf, it will read off the end of the bitmap and copy junk into the returned buffer. Add a check to only copy the length of the bitmap to the buffer. The problem can be observed after setting a vcpu affinity using the vcpupin command on a system with a large number of cores: # virsh vcpupin example_domain 0 0 # virsh vcpupin example_domain 0 VCPU CPU Affinity --------------------------- 0 0,192,197-198,202 Signed-off-by: NJohn Allen <john.allen@amd.com>
-
由 Nikolay Shirokovskiy 提交于
Different check values are not ABI compatible. For example if on migration we change 'full' to 'partial' then guest cpu on destination can be different. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 24 4月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
If there's an error when setting up QoS on a bridge the control jumps over to 'err5' label. Here, the virNetDevBandwidthClear() is called to clear out any partially set QoS. This function can also report an error which would overwrite the actual error that caused us jumping here. Use virErrorPreserveLast() to preserve the original error. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 4月, 2019 5 次提交
-
-
由 Cole Robinson 提交于
qemu 4.0.0 will prefix most errors with 'Error: ', so consider any string instance of that an error. This fixes savevm failure detection when migration is blocked due to usage of nested VMX https://bugzilla.redhat.com/show_bug.cgi?id=1697997Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Drop redundant NULL checks, and add an error string prefix Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Drop redundant NULL checks, add error string prefixes, consolidate a few indentical reports. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Syed Humaid 提交于
Replaced usage of virSaveLastError and virSetError/virFreeError with virErrorPreserveLast and virErrorRestore respectively. Signed-off-by: NSyed Humaid <syedhumaidbinharoon@gmail.com>
-
由 Michal Privoznik 提交于
The @firmware string is allocated, but never freed. 4 bytes in 1 blocks are definitely lost in loss record 1 of 44 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x76FB469: strdup (strdup.c:42) by 0x497B6DE: virStrdup (virstring.c:966) by 0x48F6FD3: virConfGetValueString (virconf.c:908) by 0x4B3E9B6: virVMXGetConfigStringHelper (vmx.c:736) by 0x4B3EA6B: virVMXGetConfigString (vmx.c:756) by 0x4B41AEA: virVMXParseConfig (vmx.c:1832) by 0x10B8E4: testCompareFiles (vmx2xmltest.c:79) by 0x10BAB8: testCompareHelper (vmx2xmltest.c:124) by 0x10D058: virTestRun (testutils.c:174) by 0x10CDDA: mymain (vmx2xmltest.c:288) by 0x10F11C: virTestMain (testutils.c:1096) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPino Toscano <ptoscano@redhat.com>
-
- 20 4月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
Allocated in libxlDriverConfigNew(), the @configBaseDir is never freed. 13 bytes in 1 blocks are definitely lost in loss record 36 of 125 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x8012469: strdup (strdup.c:42) by 0x52926DE: virStrdup (virstring.c:966) by 0x11D46B: libxlDriverConfigNew (libxl_conf.c:1749) by 0x114D78: testCompareXMLToDomConfig (libxlxml2domconfigtest.c:62) by 0x1152A3: testCompareXMLToDomConfigHelper (libxlxml2domconfigtest.c:160) by 0x115925: virTestRun (testutils.c:174) by 0x1154A4: mymain (libxlxml2domconfigtest.c:216) by 0x1179E9: virTestMain (testutils.c:1096) by 0x1154FD: main (libxlxml2domconfigtest.c:224) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There's no need to keep @binary around. virQEMUCapsInitGuestFromBinary() duplicates the string anyway. 1,002 bytes in 36 blocks are definitely lost in loss record 54 of 59 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x796B1C7: vasprintf (vasprintf.c:73) by 0x4C3F2C6: virVasprintfInternal (virstring.c:740) by 0x4C3F3DC: virAsprintfInternal (virstring.c:761) by 0x13AFC9: testGetCaps (qemucaps2xmltest.c:105) by 0x13B200: testQemuCapsXML (qemucaps2xmltest.c:157) by 0x13B642: virTestRun (testutils.c:174) by 0x13B366: doCapsTest (qemucaps2xmltest.c:191) by 0x13FF2B: testQemuCapsIterate (testutilsqemu.c:941) by 0x13B427: mymain (qemucaps2xmltest.c:215) by 0x13D706: virTestMain (testutils.c:1096) by 0x13B489: main (qemucaps2xmltest.c:221) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 4月, 2019 12 次提交
-
-
由 Michal Privoznik 提交于
This function is not used anymore. Let's remove it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
It's funny how this went unnoticed for such a long time. Long story short, if a domain is configured with VIR_DOMAIN_NUMATUNE_MEM_STRICT libvirt doesn't really honour that. This is because of 7e72ac78 after which libvirt allowed qemu to allocate memory just anywhere and only after that it used some magic involving cpuset.memory_migrate and cpuset.mems to move the memory to desired NUMA nodes. This was done in order to work around some KVM bug where KVM would fail if there wasn't a DMA zone available on the NUMA node. Well, while the work around might stopped libvirt tickling the KVM bug it also caused a bug on libvirt side: if there is not enough memory on configured NUMA node(s) then any attempt to start a domain must fail. Because of the way we play with guest memory domains can start just happily. The solution is to move the child we've just forked into emulator cgroup, set up cpuset.mems and exec() qemu only after that. This basically reverts 7e72ac78 which was a workaround for kernel bug. This bug was apparently fixed because I've tested this successfully with recent kernel. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit f1d65853. Turns out, this caused a regression. There is this (perhaps less known) semantic of virDomainAttachDevice() where if the device the API is trying to attach is a CDROM/floppy that is already in the domain the attach request is handled as 'change the media in the drive'. We have a better fix anyways. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 Michal Privoznik 提交于
This tries to fix the same problem as f1d65853 but it's doing so in a less invasive way. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 Michal Privoznik 提交于
Unit number 7 is kind of special. It's reserved for SCSI controller. The comment in virDomainSCSIDriveAddressIsUsed() summarizes that pretty nicely. Libvirt would never generate such address. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 Michal Privoznik 提交于
This function checks if given drive address is already present in passed domain definition. Expose the function as it will be used shortly. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 Daniel P. Berrangé 提交于
During initial NIC setup the hypervisor drivers are responsible for attaching the TAP device to the bridge device. Any fixup after libvirtd restarts should thus also be their responsibility. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The call to resolve the actual network type will turn any NICs with type=network into one of the other types. Thus there should be no need to handle type=network in later switch() statements jumping off the actual type. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ports allocated on virtual networks with type=nat|route|open all get given an actual type of 'network'. Only ports in networks with type=bridge use an actual type of 'bridge'. This distinction makes little sense since the virtualization drivers will treat both actual types in exactly the same way, as they're all just bridge devices a VM needs to be connected to. This doesn't affect user visible XML since the "actual" device XML is internal only, but we need code to convert the data upgrades. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virNetDevBandwidthParse method uses the interface type to decide whether to allow use of the "floor" parameter. Using the interface type is not convenient as callers may not have that available, but still wish to allow use of "floor". Switch to an explicit boolean to control its usage. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reword error messages to make it clear that the combined floor settings of all NICs are exceeding the network inbound peak/average settings. Including the actual values being checked helps to diagnose what is actually wrong. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
In extreme cases libvirt can get mixed up about what VMs are running and attached to a network leading to the cached floor sum value being outdated. When this happens the only option is to destroy the network and then restart libvirtd. If we set floor sum back to zero when starting the network, we avoid the need for a libvirtd restart at least. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 4月, 2019 14 次提交
-
-
由 Syed Humaid 提交于
Replaced all virSaveLastError and virSetError/virFreeError usages to virErrorPreserveLast and virErrorRestore respectively. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NSyed Humaid <syedhumaidbinharoon@gmail.com>
-
由 Daniel P. Berrangé 提交于
The networkPlugBandwidth & networkUnplugBandwidth methods currently take a virDomainNetDefPtr. To remove the dependency on the domain config struct, pass individual parameters instead. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
All but one of the network types supports port profiles. Rather than duplicating the code to merge profiles 3 times, do it once and then later report an error if used from the wrong place. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
Firstly, VIR_STRDUP() accepts NULL, so there is no need to check if the string we want to duplicate is not-NULL. Secondly, virDomainNetSetModelString() also accepts NULL. Thirdly, we have VIR_AUTOFREE(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
It has made Clang very unhappy ever since 6bf7c676. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Nikolay Shirokovskiy 提交于
Fix for commit ffc0fbeb refactoring snapshot code. Reviewed-by: NCole Robinson <crobinso@redhat.com> ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Fix for commit 1ab05da2 refactoring snapshot code. Reviewed-by: NCole Robinson <crobinso@redhat.com> ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
f1056279 removed virDomainSnapshotDef.current and leaved using vm->current_snapshot only. Later 4819f54b moved current snapshot tracking to virDomainSnapshotObjList. As vz driver never used vm->current_snaphot this patch includes fixes after both commits. Reviewed-by: NCole Robinson <crobinso@redhat.com> ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Andrea Bolognani 提交于
After the recent changes, there are only a few places left where we use the explicit path instead of taking advantage of the publicly available define; let's get rid of those too. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
As evidenced by all existing callers, the only directory it makes sense to use is TEST_QEMU_CAPS_PATH, so let's just bake that into the function. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
As evidenced by all existing callers, the only directory it makes sense to use is TEST_QEMU_CAPS_PATH, so let's just bake that into the function. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
The value (with a slightly different name) is currently private to testutilsqemu, but since we use this path all over the place it makes sense to define it publicly and avoid repetition. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
Now that we can override the post-parse handling, let's update the testsuite to provide the desired timestamp/name rather than ignoring the non-deterministic one that was previously being generated. A few output files need timestamps added now that they are no longer ignored. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-