- 08 2月, 2019 10 次提交
-
-
由 Peter Krempa 提交于
Avoid regressions by disallowing the BLOCKDEV capability. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
QEMU accidentally exposed the id of -drive (or same value as disk serial, if provided) in one of the identifiers visible from the guest. To avoid regression in case when -blockdev will be used we need to always specify it ourselves. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The property allows to control the guest-visible content of the vendor specific designator of the 'Device Identification' page of a SCSI device's VPD (vital product data). QEMU was leaking the id string of -drive as the value if the 'serial' of the disk was not specified. Switching to -blockdev would impose an ABI change. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
For SCSI, IDE, and AHCI cdroms the appropriate device types which select the correct media are used. In qemu there's one other code path that looks at -drive media=cdrom in the XEN pv code. Thankfully we don't support it with qemu (see qemuBuildDiskDeviceStr). All other devices ignore it as the comment states, thus we can drop that code. The test fallout is expectedly only in the test added for uncommon cdrom types. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Attempting to create an empty virtio-blk drive results into: -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xc,drive=drive-virtio-disk1,id=virtio-disk1: Device needs media, but drive is empty Attempting to eject media from virtio-blk based drive results into: error: internal error: unable to execute QEMU command 'eject': Device 'drive-virtio-disk0' is not removable Forbid configurations where users would attempt to use cdroms in virtio bus. Fix few wrong examples which are not really relevant to the tested code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Cast disk->bus to proper type and add missing values to the enum so it's more obvious what types are supported. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The split of ide-disk into the two separate devices was introduced by qemu commit 1f56e32a7f4b3 released in qemu v0.15. Note that when compared to the previous commit which made sure that no disk related tests were touched, in this case it's not as careful. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The split of scsi-disk into the two separate devices was introduced by qemu commit b443ae67 released in qemu v0.15. All changes to test files are not really related to disk testing thanks to previous refactors. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Since commit a4cda054 we are using 'ide-hd' and 'ide-cd' instead of 'ide-drive'. We also should probe capabilities for 'ide-hd' instead of 'ide-drive'. It is safe to do as 'ide-drive' is the common denominator of both 'ide-hd' and 'ide-cd' so all the properties were common. For now the test data are modified by just changing the appropriate type when probing for caps. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Since commit 02e8d0cf we are using 'scsi-hd' and 'scsi-cd' instead of 'scsi-disk'. We also should probe capabilities for 'scsi-hd' instead of 'scsi-disk'. It is safe to do as 'scsi-disk' is the common denominator of both 'scsi-hd' and 'scsi-cd' so all the properties were common. For now the test data are modified by just changing the appropriate type when probing for caps. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 07 2月, 2019 18 次提交
-
-
由 Jiri Denemark 提交于
This flag tells virDomainMigrateSetMaxSpeed and virDomainMigrateGetMaxSpeed APIs to work on post-copy migration bandwidth. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
This typed parameter for virDomainMigrate3 and virDomainMigrateToURI3 APIs may be used for setting maximum post-copy migration bandwidth. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
This patch adds a new VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY typed parameter for virDomainMigrate3 and virDomainMigrateToURI3 for setting maximum post-copy migration bandwidth. In case the initial VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY value turns out to be suboptimal a new VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY flag for virDomainMigrateSetMaxSpeed and virDomainMigrateGetMaxSpeed may be used to set/get the maximum post-copy migration bandwidth while migration is already running. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
So far migration parameters were changed only at the beginning of migration mostly via an automatic translation from flags and typed parameters. We need to export a few more functions to support APIs which may set migration parameters while migration is already running. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Let's make the code flow easier to follow and get rid of the ugly endjob label inside if branch. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Some migration parameters supported by libvirt may use units that differ from the units used by QEMU for the corresponding parameters. For example, libvirt defines migration bandwidth in MiB/s while QEMU expects B/s. Let's add a unit field to qemuMigrationParamsTPMapItem for automatic conversion when translating between libvirt's migration typed parameters and QEMU's migration paramteres. This patch is a preparation for future parameters as the existing VIR_MIGRATE_PARAM_BANDWIDTH parameter is set using "migrate_set_speed" QMP command rather than "migrate-set-parameters" for backward compatibility. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The virInitctlFifos list is exported, but lacks definition for non-Linux and/or non-BSD case. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
qemuDomainBlockPivot and qemuDomainBlockJobAbort need the job name for cancelling or pivoting but were generating it locally instead of accessing the existing copy in the job data structure. 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 提交于
The writing to an image actually starts when the copy job is initiated, so checking this at the time of the pivot operation is too late. Move the check to qemuDomainBlockCopyCommon. Note that modern qemu would have prevented two writers with qcow2 so the slim possibility of a job started with libvirtd without this patch missing the check is not really worth worrying about. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
For copy and active commit jobs we record the state of the mirror so that we can recover. The status XML was not saved in case of qemuDomainBlockPivot due to an oversight. Save the XML always when invoking qemuDomainBlockJobAbort even if the job is not currently tracking any state. This will change later and also this is not a particularly hot code path. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
If the container is really a simple one (init is just bash and the whole root is passed through) then virDomainReboot and virDomainShutdown will talk to the actual init within the host. Therefore, 'virsh shutdown $dom' will result in shutting down the host. True, at that point the container is shut down too but looks a bit harsh to me. The solution is to check if the init inside the container is or is not the same as the init running on the host. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
So far the virInitctlSetRunLevel() is fully automatic. It finds the correct fifo to use to talk to the init and it will set the desired runlevel. Well, callers (so far there is just one) will need to inspect the fifo a bit just before the runlevel is set. Therefore, expose the internal list of fifos and also allow caller to explicitly use one. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
Due to a bug the seclabels are restored before any PID in the container is killed. This should be done afterwards in virLXCProcessCleanup. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
Prior to rewrite of cgroup code we only had one backend to try. After the rewrite the virCgroupBackendGetAll() returns both backends (for v1 and v2). However, not both have to really be present on the system which results in killRecursive callback failing which in turn might mean we won't try the other backend. At the same time, this function reports no error as it should. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
Not that it would matter because LXC driver doesn't differentiate the job types so far, but nevertheless the Destroy() should grab LXC_JOB_DESTROY. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Jie Wang 提交于
The number of iothreads is not part of the vm state sent during migration, nor exposed to the guest ABI, so this restriction is a mistake in libvirt. Let's remove that bit of code. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJie Wang <wangjie88@huawei.com>
-
- 06 2月, 2019 1 次提交
-
-
由 Andrea Bolognani 提交于
The checks and error messages are mostly the same across all virtio-input devices, so we can avoid having multiple copies of the same code. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 05 2月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
It will not work. This breaks qemu capabilities probing as a user. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 04 2月, 2019 9 次提交
-
-
由 Marc Hartmayer 提交于
For normal starts (no incoming migration) the refresh of the QEMU state must be done before the VCPUs getting started since otherwise there might be a race condition between a possible shutdown of the guest OS and the QEMU monitor queries. This fixes "qemu: migration: Refresh device information after transferring state" (93db7eea). Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
If a domain has a disk that is type='network' we require specific cache mode to allow migration with it (either 'directsync' or 'none'). This doesn't make much sense since network disks are supposed to be safe to migrate by default. At the same time, we should be checking for the actual source type, not apparent type set in the domain XML. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Storage pools might want to specify format of the image when translating the volume thus we can't add any default format when parsing the XML. Add a explicit format when starting the VM and format is not present neither by user specifying it nor by the storage pool translation function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Post parse callback adds the 'raw' type only for local files. Remote files can also have backing store (even local) so we should do this also for network backed storage. Note that virStorageFileGetMetadata always considers files with no type as raw so we will not accidentally traverse the backing chain and allow unexpected files being labelled with svirt labels. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In commit f80eae8c I was too agresive in removing properties of -drive for empty drives. It turns out that qemu actually persists the state of 'readonly' and the throttling information even for the empty drive. Removing 'readonly' thus made qemu open any subsequent images added via the 'change' command as RW which was forbidden by selinux thanks to the restrictive sVirt label for readonly media. Fix this by formating the property again and bump the tests and leave a note detailing why the rest of the properties needs to be skipped. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>). VIR_ONCE_GLOBAL_INIT is almost exclusively called without an ending semicolon, but let's standardize on using one like the other macros. Add a dummy struct definition at the end of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_LOG_INIT calls. Drop the semicolon from the final statement of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_ENUM_IMPL calls. Move the verify() statement to the end of the macro and drop the semicolon, so the compiler will require callers to add a semicolon. While we are touching these call sites, standardize on putting the closing parenth on its own line, as discussed here: https://www.redhat.com/archives/libvir-list/2019-January/msg00750.htmlReviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_ENUM_DECL calls. Drop the semicolon from the final statement of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 03 2月, 2019 1 次提交
-
-
由 Laine Stump 提交于
Just before pushing the series containing commit 3bba4825 I had added a "return true" to the top of virFirewallDZoneExists() to measure the impact of calling that function once per network during startup. I found that the effect was minimal, but forgot to remove the "return true" before pushing. This unfortunately causes a failure to start networks on systems that have a firewalld version that doesn't support our libvirt zone file (i.e. pretty much everyone). This patch removes the unintended line. Signed-off-by: NLaine Stump <laine@laine.org>
-