- 25 3月, 2020 6 次提交
-
-
由 Peter Krempa 提交于
Use qemuAgentCommandFull in qemuAgentGetHostname so that we can suppress error reports if the caller will not require them. Callers for now always require error reporting but will be fixed later. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use g_autoptr instead. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Return 0 on success to match the documentation. The callers only check for negative values. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In some cases we don't want to log errors if an agent command is unsupported. Wire it up into qemuAgentCheckError via qemuAgentCommandFull and provide a thin wrapper (qemuAgentCommand) to prevent having to fix all callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
'qemuDomainGetGuestInfoCheckSupport' despite its name was not checking whether the info types are supported. Convert the function to return integers and include the check. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 24 3月, 2020 23 次提交
-
-
由 Marc-André Lureau 提交于
The WIP specification is hosted on slirp wiki at this point: https://gitlab.freedesktop.org/slirp/libslirp/-/wikis/Slirp-Helper We would need more feedback from various parties (including libvirt, podman, and other developpers) before declaring a frozen version. So for now, follow it, and feedback welcome! Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
When the helper supports DBus, connect it to the bus and set its ID. If the helper supports migration, register its ID to the list of dbus-vmstate ID to migrate, and specify --dbus-incoming when restoring the VM. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Helper processes may have their state migrated with QEMU data stream thanks to the QEMU "dbus-vmstate". libvirt maintains the list of helpers to be migrated. The "dbus-vmstate" is added when required, and given the list of helper Ids that must be migrated, on save & load sides. See also: https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/dbus-vmstate.rstSigned-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
This avoids trying to start a dbus-daemon when its already running. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Add a unit to start & stop a private dbus-daemon. The daemon is meant to be started on demand, and associated with a QEMU process. It should be stopped when the QEMU process is stopped. The current policy is permissive like a session bus. Stricter policies can be added later, following recommendations from: https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/dbus.rstSigned-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Location of DBus daemon state configuration, socket, pid... Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
This code was based on a per-helper instance and peer-to-peer connections. The code that landed in qemu master for v5.0 is relying on a single instance and DBus bus. Instead of trying to adapt the existing dbus-vmstate code, let's remove it and resubmit. That should make reviewing easier. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Now, that we know that the virtiofsd will have the pidfile open and locked we can use virPidFileForceCleanupPath() to kill it and unlink the pidfile. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Michal Privoznik 提交于
Now, that we know that the slirp helper will have the pidfile open and locked we can use virPidFileForceCleanupPath() to kill it and unlink the pidfile. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Michal Privoznik 提交于
Now, that our virCommandSetPidFile() is more intelligent we don't need to rely on the daemon to create and lock the pidfile and use virCommandSetPidFile() at the same time. NOTE that as advertised in the previous commit, this was temporarily broken, because both virCommand and qemuProcessStartManagedPRDaemon() would try to lock the pidfile. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Seeteena Thoufeek 提交于
Signed-off-by: NSeeteena Thoufeek <s1seetee@linux.vnet.ibm.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Format cookies into the backing store string without encryption as they will not be visible on the command line when formatting a 'target' only string. In cases when cookies or other options are used we must use the JSON format rather than pure URI. Add tests to validate the scenario. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Introduce qemuBlockStorageSourceGetCookieString which does the concatenation so that we can reuse it later. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
QEMU requires an extra wrapper object where only the "file" member is populated. This is basically a placeholder for establishing the format layer. We did the same in qemuDiskSourceGetProps for the old-school JSON usage with -drive but forgot to adopt this for -blockdev. https://bugzilla.redhat.com/show_bug.cgi?id=1804617Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
qemublocktest showed that we don't add the "fat:" prefix for directory storage when formatting the backing store string. While it's unlikely to be used it's simple enough to actually implement the support rather than trying to forbid it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
We can return the appropriate string directly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Add support for pretty-printing of the JSON variant of the output for consumption in tests. All current callers pass 'false'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
While 'namespace' is not a reserved word in C, it is in C++. Our compilers are happy with it but syntax-hilighting in some editors hilights is as a keyword. Rename it to prevent confusion. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Use just 'fs' instead of 'virtiofsd'. https://bugzilla.redhat.com/show_bug.cgi?id=1816577Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
There is no need to repeat the shortName, since it's already present in the directory path. Also use just 'fs' instead of 'virtiofsd'. https://bugzilla.redhat.com/show_bug.cgi?id=1816577Signed-off-by: NJán Tomko <jtomko@redhat.com> Suggested-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Using the 'uuid' element for ppc64 NVDIMM memory added in the previous patch, use it in qemuBuildMemoryDeviceStr() to pass it over to QEMU. Another ppc64 restriction is the necessity of a mem->labelsize, given than ppc64 only support label-area backed NVDIMMs. Finally, we don't want ppc64 NVDIMMs to align up due to the high risk of going beyond the end of file with a 256MiB increment that the user didn't predict. Align it down instead. If target size is less than the minimum of 256MiB + labelsize, error out since QEMU will error out if we attempt to round it up to the minimum. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 3月, 2020 2 次提交
-
-
由 Jonathon Jongsma 提交于
The agent 'guest-sync' command historically had a 5s response timeout which was different from other agent commands, which waited forever. When we added the ability to customize the response timeout for guest agent commands, we intended to continue to use 5s for 'guest-sync' when the user specified a response timeout greater than 5s, and use the user-specified timeout if it was below 5s. Unfortunately, when attempting to determine whether the user-specified timeout was less than 5s, we were comparing against an enum value of VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT (which is -1) rather than against the actual time value that it represented (5). This change makes it so that 'guest-sync' now uses the user-specified tiemout if it is less than 5s. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Seeteena Thoufeek 提交于
Signed-off-by: NSeeteena Thoufeek <s1seetee@linux.vnet.ibm.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 20 3月, 2020 8 次提交
-
-
由 Michal Privoznik 提交于
The @devPath variable is not modifiable. It merely just points to string containing path where private devtmpfs is being constructed. Make it const so it doesn't look weird that it's not freed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com>
-
由 Michal Privoznik 提交于
If building namespace fails somewhere in the middle (that is some files exists under devMountsSavePath[i]), then plain rmdir() is not enough to remove dir. Umount the temp location and use virFileDeleteTree() to remove the directory. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com>
-
由 Michal Privoznik 提交于
The virFileMakePathWithMode() which is our recursive version of mkdir() fails, it simply just returns a negative value with errno set. No error is reported (as compared to virFileTouch() for instance). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com>
-
由 Peter Krempa 提交于
qemuBlockStorageSourceGetFormatRawProps aggregated both formats but since we now have props specific for either of those formats it's unwanted to aggregate the code such way. Split out the 'luks' props formatter into qemuBlockStorageSourceGetFormatLUKSProps. The wrong separation demonstrates istself on formatting of the 'size' and 'offset' attributes for the 'luks' driver which does not conform to the qapi schema. https://bugzilla.redhat.com/show_bug.cgi?id=1814975Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The 'luks' driver in qemu is as any other non-raw format driver and thus doesn't support the properties for 'slice'. Since libvirt considers luks files to be raw+encryption we need to special case them when dealing with the slice. https://bugzilla.redhat.com/show_bug.cgi?id=1814975Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce qemuBlockStorageSourceNeedsStorageSliceLayer which will hold the decision logic and fix all places that open-code it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Nikolay Shirokovskiy 提交于
A fixup to patch [1]. We need to reset await_event in all error paths. [1] 52532073 : qemu: remove redundant needReply argument of qemuAgentCommand Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In one of my previous commits I've introduced code that creates all devices for given (possible) multipath target. But I've made a mistake there - the code accesses 'next->path' without checking if the disk source is local. Note that the 'next->path' is NULL/doesn't make sense for VIR_STORAGE_TYPE_NVME. Fixes: a30078cb Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1814947Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 3月, 2020 1 次提交
-
-
由 Peter Krempa 提交于
Many calls of qemuMonitorDelObject don't actually check the return value or report the error from the object deletion itself since they are on cleanup paths. In some cases this can lead to reporting of spurious errors e.g. when qemuMonitorDelObject is used to clean up a possibly pre-existing objects. Add a new argument for qemuMonitorDelObject which controls whether the internals report errors from qemu and fix all callers accordingly. Note that some of the cases on device unplug which check the error code don't in fact propagate the error to the user, but in this case it is important to add the log entry anyways for tracing that the device deletion failed. https://bugzilla.redhat.com/show_bug.cgi?id=1784040Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-