- 08 8月, 2016 1 次提交
-
-
由 Marc Hartmayer 提交于
Commit b3e4401d introduced a check to ignore an error if the guest is already terminated. However the check accidentally compared error.code with VIR_ERR_ERROR, which is an error level, not an error code. Because of this, almost every error got silently ignored. Fixes: b3e4401d ("systemd: don't report an error if the guest is already terminated") Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
-
- 04 8月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
The virJSONValueArraySize() function return ssize_t (with possibly returning -1 if the passed json is not an array). Storing the return value into size_t is possibly dangerous then. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 8月, 2016 1 次提交
-
-
由 Cédric Bosdonnat 提交于
Introduce libxl hook and use it for start, prepare, started, stop, stopped, migrate events.
-
- 28 7月, 2016 3 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1356436 According to RFC 3721 (https://www.ietf.org/rfc/rfc3721.txt), there are two ways to "discover" targets in/for the iSCSI environment. Discovery is the process which allows the initiator to find the targets to which it has access and at least one address at which each target may be accessed. The method currently implemented in libvirt using the virISCSIScanTargets API is known as "SendTargets" discovery. This method is more useful when the target IP Address and TCP port information are available, e.g. in libvirt terms the "portal". It returns a list of targets for the portal. From that list, the target can be found. This operation can also fill an iSCSI node table into which iSCSI logins may occur. Commit id '56057900' altered that filling by adding the "--op nonpersistent" since it was not necessarily desired to perform that for non libvirt related targets. The second method is "Static Configuration". This method not only needs the IP Address and TCP port (e.g. portal), but also the iSCSI target name. In libvirt terms this would be the device path field from the iSCSI pool <source> XML. This patch implements the second methodology using that required device path as the targetname.
-
由 Daniel P. Berrange 提交于
The current LUKS support has a "luks" volume type which has a "luks" encryption format. This partially makes sense if you consider the QEMU shorthand syntax only requires you to specify a format=luks, and it'll automagically uses "raw" as the next level driver. QEMU will however let you override the "raw" with any other driver it supports (vmdk, qcow, rbd, iscsi, etc, etc) IOW the intention though is that the "luks" encryption format is applied to all disk formats (whether raw, qcow2, rbd, gluster or whatever). As such it doesn't make much sense for libvirt to say the volume type is "luks" - we should be saying that it is a "raw" file, but with "luks" encryption applied. IOW, when creating a storage volume we should use this XML <volume> <name>demo.raw</name> <capacity>5368709120</capacity> <target> <format type='raw'/> <encryption format='luks'> <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/> </encryption> </target> </volume> and when configuring a guest disk we should use <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/home/berrange/VirtualMachines/demo.raw'/> <target dev='sda' bus='scsi'/> <encryption format='luks'> <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/> </encryption> </disk> This commit thus removes the "luks" storage volume type added in commit 318ebb36 Author: John Ferlan <jferlan@redhat.com> Date: Tue Jun 21 12:59:54 2016 -0400 util: Add 'luks' to the FileTypeInfo The storage file probing code is modified so that it can probe the actual encryption formats explicitly, rather than merely probing existance of encryption and letting the storage driver guess the format. The rest of the code is then adapted to deal with VIR_STORAGE_FILE_RAW w/ VIR_STORAGE_ENCRYPTION_FORMAT_LUKS instead of just VIR_STORAGE_FILE_LUKS. The commit mentioned above was included in libvirt v2.0.0. So when querying volume XML this will be a change in behaviour vs the 2.0.0 release - it'll report 'raw' instead of 'luks' for the volume format, but still report 'luks' for encryption format. I think this change is OK because the storage driver did not include any support for creating volumes, nor starting guets with luks volumes in v2.0.0 - that only since then. Clearly if we change this we must do it before v2.1.0 though. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Refactor the virStorageFileMatchesNNN methods so that they don't take a struct FileFormatInfo parameter, but instead get the actual raw dat items they needs. This will facilitate reuse in other contexts. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 7月, 2016 21 次提交
-
-
由 Peter Krempa 提交于
To allow richer definitions of disk sources add infrastructure that will allow to register functionst generating a JSON object based definition. This infrastructure will then convert the definition to the proper command line syntax and use it in cases where it's necessary. This will allow to keep legacy definitions for back-compat when possible and use the new definitions for the configurations requiring them.
-
由 Peter Krempa 提交于
Add support for converting objects nested in arrays with a numbering discriminator on the command line. This syntax is used for the object-based specification of disk source properties.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Allow using 'ssh' protocol in backing chains and later for disks themselves.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
iSCSI is a bit odd in this aspect since it only supports URIs but using the 'filename' property and does not have any alternative syntax.
-
由 Peter Krempa 提交于
Along with the legacy URI based syntax add support for the brand-new fully object based syntax.
-
由 Peter Krempa 提交于
http(s), ftp(s) and tftp use URIs for volume definitions in the JSON pseudo protocol so it's pretty straightforward to add support for them.
-
由 Peter Krempa 提交于
JSON pseudo protocol for qemu allows to explicitly specify devices. Add convertor to the internal type.
-
由 Peter Krempa 提交于
Add a modular parser that will allow to parse 'json' backing definitions that are supported by qemu. The initial implementation adds support for the 'file' driver. Due to the approach qemu took to implement the JSON backing strings it's possible to specify them in two approaches. The object approach: json:{ "file" : { "driver":"file", "filename":"/path/to/file" } } And a partially flattened approach: json:{"file.driver":"file" "file.filename":"/path/to/file" } Both of the above are supported by qemu and by the code added in this commit. The current implementation de-flattens the first level ('file.') if possible and required. Other handling may be added later but currently only one level was possible anyways.
-
由 Peter Krempa 提交于
It's just read.
-
由 Erik Skultety 提交于
Since commit c4bdff19, the path to the configuration file has been constructed in the following manner: - if no config filename was passed to virConfLoadConfigPath, libvirt.conf was used as default - otherwise the filename was concatenated with "<config_dir>/libvirt/libvirt%s%s.conf" which in admin case resulted in "libvirt-libvirt-admin.conf.conf". Obviously, this non-existent config led to ignoring all user settings in libvirt-admin.conf. This patch requires the config filename to be always provided as an argument with the concatenation being simplified. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357364Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
The function would generate a leading comma. Let the callers properly add commas by formatting the commas at the end and trimming the trailing one.
-
由 Peter Krempa 提交于
For use with memory hotplug virQEMUBuildCommandLineJSONRecurse attempted to format JSON arrays as bitmap on the command line. Make the formatter function configurable so that it can be reused with different syntaxes of arrays such as numbered arrays for use with disk sources. This patch extracts the code and adds a parameter for the function that will allow to plug in different formatters.
-
由 Peter Krempa 提交于
Move the iterator of objects to the recursive function so that nested objects are supported by flattening the structure with '.' delimiters.
-
由 Peter Krempa 提交于
Until now the JSON->commandline convertor was used only for objects created by qemu. To allow reusing it with disk formatter we'll need to escape ',' as usual in qemu commandlines.
-
由 Peter Krempa 提交于
Refactor the command line generator by adding a wrapper (with documentation) that will handle the outermost object iteration. This patch also renames the functions and tweaks the error message for nested arrays to be more universal. The new function is then reused to simplify qemucommandutiltest.
-
由 Peter Krempa 提交于
The iterator function (second argument) already requires that the object is handled as 'const' thus we won't modify the object itself.
-
由 Peter Krempa 提交于
As we already test that the extraction of the backing store string works well additional tests for the backing store string parser can be made simpler. Export virStorageSourceNewFromBackingAbsolute and use it to parse the backing store strings, format them using virDomainDiskSourceFormat and match them against expected XMLs.
-
由 Anton Khramov 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1181539
-
- 26 7月, 2016 2 次提交
-
-
由 Ján Tomko 提交于
Use virAsprintf to prepend an underscore to make the code more readable.
-
由 Andrea Bolognani 提交于
The symbol being missing has been reported as causing build failures on OS X. If it's not already defined, define it to zero so that it won't have any effect.
-
- 19 7月, 2016 3 次提交
-
-
由 John Ferlan 提交于
Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021 If the volume xml was looking to create a luks volume take the necessary steps in order to make that happen. The processing will be: 1. create a temporary file (virStorageBackendCreateQemuImgSecretPath) 1a. use the storage driver state dir path that uses the pool and volume name as a base. 2. create a secret object (virStorageBackendCreateQemuImgSecretObject) 2a. use an alias combinding the volume name and "_luks0" 2b. add the file to the object 3. create/add luks options to the commandline (virQEMUBuildLuksOpts) 3a. at the very least a "key-secret=%s" using the secret object alias 3b. if found in the XML the various "cipher" and "ivgen" options Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Since we VIR_ALLOC_N to *values, the VIR_FREE should be done likewise Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move to virqemu and rename to virQEMUBuildBufferEscapeComma. This can then be shared by the storage driver when it builds the command line for qemuimg
-
- 18 7月, 2016 8 次提交
-
-
由 Andrea Bolognani 提交于
Since commit 6381c89f, we're storing long long integers instead of long integers. Rename the corresponding virConfType value accordingly.
-
由 Andrea Bolognani 提交于
We use unsigned long long integers unless we need to store a negative value. Rewrite the condition to make this more obvious.
-
由 Andrea Bolognani 提交于
The parameters for virConfGetValueLLong() were not aligned properly.
-
由 Andrea Bolognani 提交于
The name of the function is not virConfGetValueULongLong().
-
由 Andrea Bolognani 提交于
virConfGetValueLLong() errors out if the value is too big to fit into a long long integer, but claims the supported range to be (0,LLONG_MAX) instead of (LLONG_MIN,LLONG_MAX).
-
由 Andrea Bolognani 提交于
For good measure.
-
由 Andrea Bolognani 提交于
When parsing numeric values, we always store them as unsigned unless they're negative. We can use this fact to simplify the logic by removing a bunch of unnecessary checks.
-
由 Andrea Bolognani 提交于
Commit 6381c89f changed virConfValue to store long long integers instead of long integers; however, the temporary variable used in virConfParseLong() was not updated accordingly, causing trouble for 32-bit machines.
-