- 20 2月, 2018 10 次提交
-
-
由 Andrea Bolognani 提交于
There's no need to perform checks before conversion, we can just call virDomainControllerPCIModelNameTypeToString() and check the results later on. Since the variables involved are only used for PCI controllers, we can declare them in the 'case' scope rather than in the function scope to make everything a bit nicer while at it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Performing the skip earlier will help us making the function nicer later on. We also make the condition for the skip a bit more precise, though that'a more for self-documenting purposes and doesn't change anything in practice. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Even when we skip part of the processing, we still want error checking on the buffer. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
This function returns nothing but zero. Therefore it makes no sense to have it returning an integer. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
If formatting of storage encryption or private data fails we must jump to the error label instead of returning immediately otherwise @attrBuf and @childBuf might be leaked. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The src/Makefile.am rules all re-generate the RPC dispatch code whenever the Makefile.am changes, so for consistency do that for daemon/Makefile.am too. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
When you add a bunch of pcie-root-port controllers to a q35 guest in order to have hotplug capabilities, you also need to make sure you're adding the pcie-root controller at the same time or you will get an error. Document this fact. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Laine Stump 提交于
This file was modified in an editor buffer but not saved prior to commit e62cb4a9 (which removed virMacAddr::generated), so the bhyve build would fail. Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Laine Stump 提交于
Commit 7e62c4cd (first appearing in libvirt-3.9.0 as a resolution to rhbz #1343919) added a "generated" attribute to virMacAddr that was set whenever a mac address was auto-generated by libvirt. This knowledge was used in a single place - when trying to match a NetDef from the Domain to Delete with user-provided XML. Since the XML parser always auto-generates a MAC address for NetDefs when none is provided, it was previously impossible to make a search where the MAC address isn't significant, but the addition of the "generated" attribute made it possible for the search function to ignore auto-generated MACs. This implementation had a problem though - it was adding a field to a "low level" struct - virMacAddr - which is used in other places with the assumption that it contains exactly a 6 byte MAC address and nothing else. In particular, virNWFilterSnoopEthHdr uses virMacAddr as part of the definition of an ethernet packet header, whose layout must of course match an actual ethernet packet. Adding the extra bools into virNWFilterSnoopEthHdr caused the nwfilter driver's "IP discovery via DHCP packet snooping" functionality to mysteriously stop working. In order to fix that behavior, and prevent potential future similar odd behavior, this patch moves the "generated" member out of virMacAddr (so that it is again really is just a MAC address) into virDomainNetDef, and sets it only when virDomainNetGenerateMAC() is called from virDomainNetDefParseXML() (which is the only time we care about it). Resolves: https://bugzilla.redhat.com/1529338 (It should also be applied to any maintenance branch that applies commit 7e62c4cd and friends to resolve https://bugzilla.redhat.com/1343919) Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 19 2月, 2018 15 次提交
-
-
由 Daniel P. Berrangé 提交于
It is very difficult while reading the migration code trying to understand whether a particular function is being called on the src side or the dst side, or either. Putting "Src" or "Dst" in the method names will make this much more obvious. "Any" is used in a few helpers which can be called from both sides. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
QEMU code does not work well with too big numbers on the JSON monitor so our monitor code supports sending only numbers up to LLONG_MAX. Avoid a weird error message by limiting the size of the 'bandwidth' parameter for block copy. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1532542Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The variable names for the options and information about a command should have an underscore in places where the virsh command has a hyphen. The function callback name should capitalize the letter after the hyphen. This was not used in 'blockcommit', 'blockcopy', 'blockjob', 'blockpull', and 'blockresize' commands. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Andrea Bolognani 提交于
Commit 2d43f0a2 dropped virDomainDiskTranslateSourcePool()'s first argument but failed to update callers in the bhyve driver. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Daniel P. Berrangé 提交于
Further cleanup from commit 0c63c117 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Fri Feb 9 15:08:53 2018 +0000 conf: reimplement virDomainNetResolveActualType in terms of public API Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The qemuxml2argvtest does not need to link to the network driver after this commit: commit 0c63c117 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Fri Feb 9 15:08:53 2018 +0000 conf: reimplement virDomainNetResolveActualType in terms of public API Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
These APIs are not required anywhere outside the migration code so need not be exported to the rest of the QEMU driver. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The qemuMigrationPrecreateStorage method needs a connection to access the storage driver. Instead of passing it around, open it at time of use. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
There's a few places in startup code paths which pass around a virConnectPtr which is no longer required. Specifically, the qemuProcessStart() method now only requires a non-NULL connection if autodestroy is requested. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
When setting up graphics, we sometimes need to resolve networks, requiring the caller to pass in a virConnectPtr, except sometimes they pass in NULL. Use virGetConnectNetwork() to acquire the connection to the network driver when it is needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
During domain startup there are many places where we need to acquire secrets. Currently code passes around a virConnectPtr, except in the places where we pass in NULL. So there are a few codepaths where ability to start guests using secrets will fail. Change to acquire a handle to the secret driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Rather than expecting callers to pass a virConnectPtr into the virDomainDiskTranslateSourcePool() method, just acquire a connection to the storage driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
There is a long standing hack to pass a virConnectPtr into the qemuMonitorStartCPUs method, so that when the text monitor prompts for a disk password, we can lookup virSecretPtr objects. This causes us to have to pass a virConnectPtr around through countless methods up the call chain....except some places don't have any virConnectPtr available so have always just passed NULL. We can finally fix this disastrous design by using virGetConnectSecret() to open a connection to the secret driver at time of use. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Now that we have the ability to easily open connections to secondary drivers, eg network:///system, it is possible to reimplement the virDomainNetResolveActualType method in terms of the public API. This avoids the need to have the network driver provide a callback for it. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
When the test suite is running, we don't want to be triggering the startup of daemons for the secondary drivers. Thus we must provide a way to set a custom connection for the secondary drivers, to override the default logic which opens a new connection. This will also be useful for code where we have a whole set of separate functions calls all needing the secret driver. Currently the connection to the secret driver is opened & closed many times in quick succession. This will allow us to pre-open a connection temporarily, improving the performance of startup. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 2月, 2018 3 次提交
-
-
由 Zhuang Yanying 提交于
Signed-off-by: NZhuang Yanying <ann.zhuangyanying@huawei.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Zhuang Yanying 提交于
This wires up the previously added Chassis strings XML schema to be able to generate comamnd line args for QEMU. This requires QEMU >= 2.1 release containing this patch: SMBIOS: Build aggregate smbios tables and entry point https://git.qemu.org/?p=qemu.git;a=commit;h=c97294ec1b9e36887e119589d456557d72ab37b5Signed-off-by: NZhuang Yanying <ann.zhuangyanying@huawei.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Zhuang Yanying 提交于
This type of information defines attributes of a system chassis, such as SMBIOS Chassis Asset Tag. access inside VM (for example) Linux: /sys/class/dmi/id/chassis_asset_tag. Windows: (Get-WmiObject Win32_SystemEnclosure).SMBIOSAssetTag wirhin Windows PowerShell. As an example, add the following to the guest XML <chassis> <entry name='manufacturer'>Dell Inc.</entry> <entry name='version'>2.12</entry> <entry name='serial'>65X0XF2</entry> <entry name='asset'>40000101</entry> <entry name='sku'>Type3Sku1</entry> </chassis> Signed-off-by: NZhuang Yanying <ann.zhuangyanying@huawei.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 16 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The -Wextra flag bundle gained a new warning -Wcast-function-type. This complains if you cast between two function prototypes where the number of parameters or their data types are not compatible. Unfortunately we need such "bad" function casts for our event callbacks. It is possible to silence the warning by first casting to the generic "void (*)(void)" function prototype, but that is rather ugly to add throughout libvirt code. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 2月, 2018 11 次提交
-
-
由 Peter Krempa 提交于
Previously we've removed the data only in virshUpdateDiskXML when changing the disk source for the CDROM since the backing store would be invalid. Move the code into a separate function and callit from virshFindDisk which is also used when detaching disk. The detaching code does not necessarily need to get the full backing chain since it will need to act on the one managed by libvirt anyways and this also takes care of problems when parts of the backing store were invalid due to buggy RBD detection code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
We can't really detect all the authentication data in a sane manner for disk backing chains. Since the old RBD parser parses it in some cases as the argv->XML convertor requires it, we can't just drop it. Instead clear any detected authentication data in the code paths related to disk backing chain lookup and fix the tests to cope with the change. https://bugzilla.redhat.com/show_bug.cgi?id=1544659Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Similarly to other commands add an argument which allows to check the XML which would be used to execute the operation instead. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Use the new syntax which uses the 'UnixSocket' type in qemu. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The documentation for the JSON/qapi type 'UnixSocketAddress' states that the unix socket path field is named 'path'. Unfortunately qemu uses 'socket' in case of the gluster driver (despite documented otherwise). Add logic which will format the correct fields while keeping support of the old spelling. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1544325Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Jiri Denemark 提交于
The postun trigger for libvirt-daemon was defined twice for overlapping ranges of package verions if systemd support was switched off (which happens when building on something ancient, such as RHEL-6). Let's combine the two triggers into the one which is called when libvirt-daemon < 1.3.0 is uninstalled. As a side effect, virtlockd and virtlogd might be reloaded twice after an upgrade from libvirt newer than 1.2.1 and older than 1.3.0 (by postun script from the old libvirt and postun trigger from the new libvirt). Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jiri Denemark 提交于
The oldest Fedora release supported by the spec file is 26. Checking for anything older makes no sense. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Building virt-login-shell doesn't really make any sense without LXC and doing so even breaks "make rpm" since the associated files are installed but unpackaged (the login-shell sub package already depends on LXC). Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Enabling fuse without LXC does not make a lot of sense because fuse is used only by LXC. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-