- 02 8月, 2016 17 次提交
-
-
由 John Ferlan 提交于
Move QEMU_DRIVE_HOST_PREFIX into the qemu_alias.c to dissuade future callers from using it. Create qemuAliasDiskDriveSkipPrefix in order to handle the current consumers that desire to check if an alias has the drive- prefix and "get beyond it" in order to get the disk alias.
-
由 John Ferlan 提交于
Rather than open code build the drive alias command in multiple places, use the helper to ensure consistency.
-
由 John Ferlan 提交于
Since we already have a function that will generate the drivestr from the alias, let's use it and remove the qemuDeviceDriveHostAlias. Move the QEMU_DRIVE_HOST_PREFIX definition into qemu_alias.h Also alter qemuAliasFromDisk to use the QEMU_DRIVE_HOST_PREFIX instead of "drive-%s".
-
由 John Ferlan 提交于
The qemuDomainSnapshotCreateSingleDiskActive open coded generating the disk drive alias. Let's use the common function.
-
由 John Ferlan 提交于
Rather than pass the disks[i]->info.alias to qemuMonitorSetDrivePassphrase and then generate the "drive-%s" alias from that, let's use qemuAliasFromDisk prior to the call to generate the drive alias and then pass that along thus removing the need to generate the alias from the monitor code.
-
由 John Ferlan 提交于
Modify the error/exit path to match what was done for Virtio and SCSI. If nothing else it'll have a consistent look'n'feel
-
由 Nikolay Shirokovskiy 提交于
As commit id 'e2b86f58' notes, when mode=agent possibly setting the fake reboot flag to true wouldn't be necessary; however, it doesn't "force" the issue by just ensuring the fake reboot is false, so this patch adds the explicit setting for the reboot path. More investigation and details can be found in commit id '8be502fd' as well as in the archives at: https://www.redhat.com/archives/libvir-list/2015-April/msg00715.html
-
由 Nikolay Shirokovskiy 提交于
Conditional setting of the fake reboot flag should only happen for the acpi mode shutdown path; however, for the agent mode shutdown, the fake reboot should be cleared. This patch will essentially revert commit id '8be502fd', but adds an explicit setting of the flag to false when using mode=agent while also only conditionally setting the reboot flag if the guest went away. This also avoids an issue where a shutdown with reboot semantics is done from agent mode which sets the reboot flag followed by a shutdown from within the guest which would result in a reboot due to the fake reboot flag being set. The change will also properly handle the cases described in the following archive post: https://www.redhat.com/archives/libvir-list/2015-April/msg00715.html
-
由 Chunyan Liu 提交于
To sync with virDomainControllerModelUSB, we add two models in qemuControllerModelUSB 'qusb1' and 'qusb2', but those models are not supported in qemu driver. So add check in device post parse to report errors if 'qusb1' and 'qusb2' are specified. Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
由 Chunyan Liu 提交于
According to libxl implementation, it supports pvusb controller of version 1.1 and version 2.0, and it supports two types of backend, 'pvusb' (dom0 backend) and 'qusb' (qemu backend). But currently pvusb backend is not checked in yet. To match libxl support, extend usb controller schema to support two more models: qusb1 (qusb, version 1.1) and 'qusb2' (qusb version 2.0). Signed-off-by: NChunyan Liu <cyliu@suse.com>
-
由 Peter Krempa 提交于
Use a temporary pointer rather than always recalculating the index in a very verbose way.
-
由 Peter Krempa 提交于
Add a structure to store the data and use a single array of the structures rather than having 3 separate arrays with shared indexes.
-
由 Peter Krempa 提交于
-
由 Martin Kletzander 提交于
When reset was called from a domain that crashed we didn't change the crashed state into a paused one which could confuse users. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1269575Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Until now we simply errored out when the translation from pool+volume failed. However, we should instead check whether that disk is needed or not since there is an option for that. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1168453Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There is an error reset following the function and check for startupPolicy before that. Let's reflect those things inside that function so that future code doesn't have to be that complex. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 01 8月, 2016 2 次提交
-
-
由 Boris Fiuczynski 提交于
The panic devices with models s390 and pseries are autogenerated. For backwards compatibility reasons the devices are to be removed when migrating. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Sascha Silbe 提交于
Ever since virDomainCreateWithFlags() was introduced by de3aadaa [drivers: add virDomainCreateWithFlags if virDomainCreate exists], the domain ID retrieved with virDomainGetID() was incorrect for several drivers after virDomainCreateWithFlags() was called. The API consumer had to look up the domain anew to retrieve the correct ID. For the ESX driver, this was fixed in 6139b274 [esx: Update ID after starting a domain]. For the openvz driver, it was fixed in fd81a097 [openvzDomainCreateWithFlags: set domain id to the correct value]. The test driver, the OpenNebula driver (removed in the meantime) and the vbox driver were already updating the domain ID correctly in domainCreate(). Copy over the ID in qemuDomainCreateWithFlags() to fix this for the qemu driver, too. Fixes: de3aadaa ("drivers: add virDomainCreateWithFlags if virDomainCreate exists") Reported-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Tested-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
-
- 29 7月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
Consider the following XML snippet: <memory model=''> <target> <size unit='KiB'>523264</size> <node>0</node> </target> </memory> Whats wrong you ask? The @model attribute. This should result in an error thrown into users faces during virDomainDefine phase. Except it doesn't. The XML validation catches this error, but if users chose to ignore that, they will end up with invalid XML. Well, they won't be able to start the machine - that's when error is produced currently. But it would be nice if we could catch the error like this earlier. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 7月, 2016 2 次提交
-
-
由 John Ferlan 提交于
The virJSONValueObjectCreate only consumes the object on success, so on failure we must free - from commit id 'f4441017' (found by Coverity).
-
由 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>
-
- 27 7月, 2016 12 次提交
-
-
由 Derbyshev Dmitry 提交于
To collect all balloon statistics for all guests it was necessary to make several libvirt requests. Now it's possible to get all balloon statiscs via single connectGetAllDomainStats call. Signed-off-by: NDerbyshev Dmitry <dderbyshev@virtuozzo.com>
-
由 Derbyshev Dmitry 提交于
Is necessary to call it from other contexts, such as qemuDomainGetStatsBalloon. Signed-off-by: NDerbyshev Dmitry <dderbyshev@virtuozzo.com>
-
由 Prasanna Kumar Kalever 提交于
To allow using failover with gluster it's necessary to specify multiple volume hosts. Add support for starting qemu with such configurations. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 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 提交于
Avoid a large block by tweaking the condition skipping empty drives and split up the switch containing two branches having different purpose.
-
由 Peter Krempa 提交于
The disk source formatting code grew rather ugly and complex and it will get worse. Extract it into a separated function to contain the mess.
-
由 Peter Krempa 提交于
Extract the code so that it can be called from multiple places. This also removes a tricky fallthrough in the large switch in qemuBuildNetworkDriveStr.
-
由 Peter Krempa 提交于
The function builds also non-uri strings for the various protocols.
-
由 Peter Krempa 提交于
Allow using 'ssh' protocol in backing chains and later for disks themselves.
-
由 Shivaprasad G Bhat 提交于
The cur_balloon also increases/decreases with dimm hotplug/unplug. To be consistent, adjust the value for coldplug too. This was inconsistently taken care when cur_ballon != memory to begin with. The patch fixes it irrespective of that. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 John Ferlan 提交于
Nothing in the code path after the removed call has needs/uses the alias anyway (as would be the case for command line building or talking to monitor). The alias is VIR_FREE'd in virDomainDeviceInfoClear which is called for any device that needs/uses an alias via virDomainDeviceDefFree or virDomainDefFree as well as during virDomainDeviceInfoFree for host devices. For persistent domains, the domain definition (including aliases) gets freed a few screens later when it's replaced with newDef. For transient domains, the definition is freed/unref'd along with the virDomainObj a few moments later.
-
由 Henning Schild 提交于
Purely cosmetic change to be consistent with the other names. Signed-off-by: NHenning Schild <henning.schild@siemens.com>
-
- 26 7月, 2016 6 次提交
-
-
由 Derbyshev Dmitry 提交于
QEMU reports timestamp along with other memory statistics, but this information is not saved into domain statistics. It could be useful to determine if the data reported is fresh or not. Balloon statistics are not reported in hrf, so no modifications are made in qemu_monitor_text.c. Signed-off-by: NDerbyshev Dmitry <dderbyshev@virtuozzo.com>
-
由 Derbyshev Dmitry 提交于
'memtotal' in virtio drivers and qemu corresponds to 'available' in libvirt. Because of that, 'stat-available-memory' is renamed into 'usable'. Balloon statistics are not reported in hrf, so no modifications are made in qemu_monitor_text.c. Signed-off-by: NDerbyshev Dmitry <dderbyshev@virtuozzo.com>
-
由 Tomasz Flendrich 提交于
Dropping the caching of ccw address set. The cached set is not required anymore, because the set is now being recalculated from the domain definition on demand, so the cache can be deleted.
-
由 Tomasz Flendrich 提交于
Dropping the caching of ccw address set. Instead of using the cached address set, functions in qemu_hotplug.c now recalculate it on demand.
-
由 Tomasz Flendrich 提交于
The address sets (pci, ccw, virtio serial) are currently cached in qemu private data, but all the information required to recreate these sets is in the domain definition. Therefore I am removing the redundant data and adding a way to recalculate these sets. Add a function that calculates the ccw address set from the domain definition.
-
由 Tomasz Flendrich 提交于
Dropping the caching of virtio serial address set. The cached set is not required anymore, because the set is now being recalculated from the domain definition on demand, so the cache can be deleted. Credit goes to Cole Robinson.
-