- 16 3月, 2015 3 次提交
-
-
由 Peter Krempa 提交于
The memory sizes in qemu are aligned up to 1 MiB boundaries. There are two places where this was done once for the total size and then for individual NUMA cell sizes. Add a function that will align the sizes in one place so that it's clear where the sizes are aligned.
-
由 Peter Krempa 提交于
As there are two possible approaches to define a domain's memory size - one used with legacy, non-NUMA VMs configured in the <memory> element and per-node based approach on NUMA machines - the user needs to make sure that both are specified correctly in the NUMA case. To avoid this burden on the user I'd like to replace the NUMA case with automatic totaling of the memory size. To achieve this I need to replace direct access to the virDomainMemtune's 'max_balloon' field with two separate getters depending on the desired size. The two sizes are needed as: 1) Startup memory size doesn't include memory modules in some hypervisors. 2) After startup these count as the usable memory size. Note that the comments for the functions are future aware and document state that will be present after a few later patches.
-
由 Erik Skultety 提交于
We interpret port values as signed int (convert them from char *), so if a negative value is provided in network disk's configuration, we accept it as valid, however there's an 'unknown cause' error raised later. This error is only accidental because we return the port value in the return code. This patch adds just a minor tweak to the already existing check so we reject negative values the same way as we reject non-numerical strings. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1163553
-
- 12 3月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
We've never formatted them on the qemu command line. https://bugzilla.redhat.com/show_bug.cgi?id=1164053
-
- 11 3月, 2015 1 次提交
-
-
由 Luyao Huang 提交于
Error messages are already set in all code paths returning -1 from networkGetNetworkAddress, so we don't want to overwrite them. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 10 3月, 2015 1 次提交
-
-
由 Laine Stump 提交于
Commit 4bbe1029 fixed a problem in commit f7afeddc by moving the call to virNetDevGetIndex() to a location common to all interface types (so that the nicindex array would be filled in for macvtap as well as tap interfaces), but the location was *too* common, as the original call to virNetDevGetIndex() had been in a section qualified by "if (cfg->privileged)". The result was that the "fixed" libvirtd would try to call virNetDevGetIndex() even for session mode libvirtd, and end up failing with the log message: Unable to open control socket: Operation not permitted To remedy that, this patch qualifies the call to virNetDevGetIndex() in its new location with cfg->privileged. This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1198244
-
- 06 3月, 2015 3 次提交
-
-
由 Pavel Hrdina 提交于
There was a mess in the way how we store unlimited value for memory limits and how we handled values provided by user. Internally there were two possible ways how to store unlimited value: as 0 value or as VIR_DOMAIN_MEMORY_PARAM_UNLIMITED. Because we chose to store memory limits as unsigned long long, we cannot use -1 to represent unlimited. It's much easier for us to say that everything greater than VIR_DOMAIN_MEMORY_PARAM_UNLIMITED means unlimited and leave 0 as valid value despite that it makes no sense to set limit to 0. Remove unnecessary function virCompareLimitUlong. The update of test is to prevent the 0 to be miss-used as unlimited in future. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Stefan Berger 提交于
Pass the TPM file descriptor to QEMU via command line. Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the additional parameters -add-fd set=10,fd=20. This addresses the use case when QEMU is started with non-root privileges and QEMU cannot open /dev/tpm0 for example. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
Move the TPM command line build code into its own function. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 05 3月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1195660 There's been a bug report appearing on the qemu-devel list, that libvirt is unable to pass spaces in disk serial number [1]. Not only our RNG schema forbids that, the code is not prepared either. However, with a bit of escaping (if needed) we can allow spaces there. 1: https://lists.gnu.org/archive/html/qemu-devel/2015-02/msg04041.htmlSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 3月, 2015 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1142631 This patch resolves a situation where the same "<target dev='$name'...>" can be used for multiple disks in the domain. While the $name is "mostly" advisory regarding the expected order that the disk is added to the domain and not guaranteed to map to the device name in the guest OS, it still should be unique enough such that other domblk* type operations can be performed. Without the patch, the domblklist will list the same Target twice: $ virsh domblklist $dom Target Source ------------------------------------------------ sda /var/lib/libvirt/images/file.qcow2 sda /var/lib/libvirt/images/file.img Additionally, getting domblkstat, domblkerror, domblkinfo, and other block* type calls will not be able to reference the second target. Fortunately, hotplug disallows adding a "third" sda value: $ qemu-img create -f raw /var/lib/libvirt/images/file2.img 10M $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sda error: Failed to attach disk error: operation failed: target sda already exists $ BUT, it since 'sdb' doesn't exist one would get the following on the same hotplug attempt, but changing to use 'sdb' instead of 'sda' $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sdb error: Failed to attach disk error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-1' for device $ Since we cannot fix this issue at parsing time, the best that can be done so as to not "lose" a domain is to make the check prior to starting the guest with the results as follows: $ virsh start $dom error: Failed to start domain $dom error: XML error: target 'sda' duplicated for disk sources '/var/lib/libvirt/images/file.qcow2' and '/var/lib/libvirt/images/file.img' $ Running 'make check' found a few more instances in the tests where this duplicated target dev value was being used. These also exhibited some duplicated 'id=' values (negating the uniqueness argument of aliases) in the corresponding .args file and of course the *xmlout version of a few input XML files.
-
- 02 3月, 2015 4 次提交
-
-
由 Ján Tomko 提交于
Instead of tracking the number of added parameters, add a comma at the end of each one unconditionally and trim the trailing one at the end.
-
由 Ján Tomko 提交于
If we combine the boot order on the command line with other boot options, we prepend order= in front of it. Instead of checking if the number of added arguments is between 0 and 2, separate the strings for boot order and options and prepend boot order only if both strings are not empty.
-
由 Ján Tomko 提交于
It was only supported by xenner (since commit 763a59d8), for which we removed support in commit de9be0ab. Remove the code generating this command line option, refuse to parse it and delete the outdated tests. https://bugzilla.redhat.com/show_bug.cgi?id=1176050
-
- 26 2月, 2015 1 次提交
-
-
由 Laine Stump 提交于
Commit f7afeddc added code to report to systemd an array of interface indexes for all tap devices used by a guest. Unfortunately it not only didn't add code to report the ifindexes for macvtap interfaces (interface type='direct') or the tap devices used by type='ethernet', it ended up sending "-1" as the ifindex for each macvtap or hostdev interface. This resulted in a failure to start any domain that had a macvtap or hostdev interface (or actually any type other than "network" or "bridge"). This patch does the following with the nicindexes array: 1) Modify qemuBuildInterfaceCommandLine() to only fill in the nicindexes array if given a non-NULL pointer to an array (and modifies the test jig calls to the function to send NULL). This is because there are tests in the test suite that have type='ethernet' and still have an ifname specified, but that device of course doesn't actually exist on the test system, so attempts to call virNetDevGetIndex() will fail. 2) Even then, only add an entry to the nicindexes array for appropriate types, and to do so for all appropriate types ("network", "bridge", and "direct"), but only if the ifname is known (since that is required to call virNetDevGetIndex().
-
- 25 2月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
If the qemu binary on x86 does not support lsi SCSI controller, but it supports virtio-scsi, we reject the virtio-specific attributes for no reason. Move the default controller assignment before the check. https://bugzilla.redhat.com/show_bug.cgi?id=1168849
-
- 24 2月, 2015 1 次提交
-
-
由 Stefan Zimmermann 提交于
Since s390 does not support usb the default creation of a usb controller for a domain should not occur. Also adjust s390 test cases by removing usb device instances since usb devices are no longer created by default for s390 the s390 test cases need to be adjusted. Signed-off-by: NStefan Zimmermann <stzi@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
-
- 21 2月, 2015 9 次提交
-
-
由 Peter Krempa 提交于
For historical reasons data regarding NUMA configuration were split between the CPU definition and numatune. We cannot do anything about the XML still being split, but we certainly can at least store the relevant data in one place. This patch moves the NUMA stuff to the right place.
-
由 Peter Krempa 提交于
Add the helpers and refactor places where the value is accessed without them.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Add virDomainNumaGetNodeCpumask() and refactor a few places that would get the cpu mask without the helper.
-
由 Peter Krempa 提交于
Add an accessor so that a later refactor is simpler.
-
由 Peter Krempa 提交于
The function uses the cell count in 6 places. Add a temp variable to hold the count as it will greatly simplify the refactor.
-
由 Peter Krempa 提交于
Use the virDomainDefNew() helper to allocate the definition instead of doing it via VIR_ALLOC.
-
由 Peter Krempa 提交于
Name it virNumaMemAccess and add it to conf/numa_conf.[ch] Note that to avoid a circular dependency the type of the NUMA cell memAccess variable was changed to int. It will be turned back later after the circular dependency will not exist.
-
由 Peter Krempa 提交于
The structure will gradually become the only place for NUMA related config, thus rename it appropriately.
-
- 17 2月, 2015 2 次提交
-
-
由 Prerna Saxena 提交于
PowerPC : Forbid NULL CPU model with 'host-model' mode in qemu command line. This ensures that an XML such as following: ... <cpu mode='host-model'> <model fallback='allow'/> </cpu> ... will not generate a '-cpu host,compat=(null)' command line with qemu-system-ppc64. Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
-
由 Michal Privoznik 提交于
So, when building the '-numa' command line, the qemuBuildMemoryBackendStr() function does quite a lot of checks to chose the best backend, or to check if one is in fact needed. However, it returned that backend is needed even for this little fella: <numatune> <memory mode="strict" nodeset="0,2"/> </numatune> This can be guaranteed via CGroups entirely, there's no need to use memory-backend-ram to let qemu know where to get memory from. Well, as long as there's no <memnode/> element, which explicitly requires the backend. Long story short, we wouldn't have to care, as qemu works either way. However, the problem is migration (as always). Previously, libvirt would have started qemu with: -numa node,memory=X in this case and restricted memory placement in CGroups. Today, libvirt creates more complicated command line: -object memory-backend-ram,id=ram-node0,size=X -numa node,memdev=ram-node0 Again, one wouldn't find anything wrong with these two approaches. Both work just fine. Unless you try to migrated from the older libvirt into the newer one. These two approaches are, unfortunately, not compatible. My suggestion is, in order to allow users to migrate, lets use the older approach for as long as the newer one is not needed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 2月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
<interface ...> ... <model type='virtio'/> <driver ...> <host mrg_rxbuf='off'/> </driver> </interface> will result in: -device virtio-net-pci,mrg_rxbuf=off,... https://bugzilla.redhat.com/show_bug.cgi?id=1186886
-
- 10 2月, 2015 7 次提交
-
-
由 Luyao Huang 提交于
Export the required helpers and add backend code to hotplug RNG devices. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
As the RNG device is using an -object as backend refactor the code to use the JSON to commandline generator so that we can reuse the code later in hotplug.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Move the alias name right after the object type for rng-egd backend so that we can later use the JSON to commandline generator to create the command line.
-
由 Luyao Huang 提交于
Libvirt didn't prefix the random number generator backend object alias with any string thus the device alias and object alias were identical. To avoid possible problems, rename the alias for the backend object and tweak tests to comply with the change. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Luyao Huang 提交于
Rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr and change the return type so that it can be reused in the device hotplug code later. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Luyao Huang 提交于
This function is used to assign an alias for a RNG device. It will be later reused when hotplugging RNGs. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 06 2月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
It is only usable for NETWORK and BRIDGE type interfaces. Error out when trying to start a domain where the custom tap device path is specified for interfaces of other types, or when the daemon is not privileged. Note that this cannot be checked at definition time, because the comparison is against actual type. https://bugzilla.redhat.com/show_bug.cgi?id=1147195
-
- 03 2月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
Some code paths have special logic depending on the page size reported by sysconf, which in turn affects the test results. We must mock this so tests always have a consistent page size.
-
- 31 1月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
Change done by commit f309db1f wrongly assumes that qemu can start with a combination of NUMA nodes specified with the "memdev" option and the appropriate backends, and the legacy way by specifying only "mem" as a size argument. QEMU rejects such commandline though: $ /usr/bin/qemu-system-x86_64 -S -M pc -m 1024 -smp 2 \ -numa node,nodeid=0,cpus=0,mem=256 \ -object memory-backend-ram,id=ram-node1,size=12345 \ -numa node,nodeid=1,cpus=1,memdev=ram-node1 qemu-system-x86_64: -numa node,nodeid=1,cpus=1,memdev=ram-node1: qemu: memdev option must be specified for either all or no nodes To fix this issue we need to check if any of the nodes requires the new definition with the backend and if so, then all other nodes have to use it too. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1182467
-