- 04 9月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Rather than have different usages of STR function in order to determine whether the domain is s390-ccw or s390-ccw-virtio, make a single API which will check the machine.os prefix. Then use the function.
-
- 02 9月, 2015 1 次提交
-
-
由 Jonathan Toppins 提交于
Adds a new interface type using UDP sockets, this seems only applicable to QEMU but have edited tree-wide to support the new interface type. The interface type required the addition of a "localaddr" (local address), this then maps into the following xml and qemu call. <interface type='udp'> <mac address='52:54:00:5c:67:56'/> <source address='127.0.0.1' port='11112'> <local address='127.0.0.1' port='22222'/> </source> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> QEMU call: -net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222 Notice the xml "local" entry becomes the "localaddr" for the qemu call. reference: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 28 8月, 2015 1 次提交
-
-
由 Jim Fehlig 提交于
This reverts commit 1ce7c1d2, which introduced a significant semantic change to the virDomainGetInfo() API. Additionally, the change was only made to 2 of the 15 virt drivers. Conflicts: src/qemu/qemu_driver.c Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 27 8月, 2015 2 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 If the qemu monitor fails to remove the memory from the guest for any reason, the auditlog message will incorrectly use the current actual memory (via virDomainDefGetMemoryActual) instead of the value we were attempting to reduce to. The result is the 'new-mem' and 'old-mem' values for the auditlog message would be identical. This patch creates a local 'newmem' which accounts for the current memory size minus the memory which is being removed. NB, for the success case this results in the same value that would be returned by virDomainDefGetMemoryActual without the need to do the math. This follows the existing code which would subtract the size for cur_balloon. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 Prior to this patch, after successfully hot plugging memory the audit log indicated that the update failed, e.g.: type=VIRT_RESOURCE ... old-mem=1024000 new-mem=1548288 \ exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=pts/2 res=failed This patch will adjust where virDomainAuditMemory is called to ensure the proper 'ret' value is used based on success or failure. Additionally, the audit message should include the size of the memory we were attempting to change to rather than the current actual size. On failure to add, the message showed the same value for old-mem and new-mem. In order to do this, introduce a 'newmem' local which will compute the new size based on the oldmem size plus the size of memory we are about to add. NB: This would be the same as calling the virDomainDefGetMemoryActual again on success, but avoids the overhead of recalculating. Plus cur_balloon is already adjusted by the same value, so this follows that. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 26 8月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
Commit f1f68ca3 overused mdir_name() event though it was not needed in the latest version, hence labelling directory one level up in the tree and not the one it should. If anyone with SElinux managed to try run a domain with guest agent set up, it's highly possible that they will need to run 'restorecon -F /var/lib/libvirt/qemu/channel/target' to fix what was done. Reported-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Make a call virCgroupGetBlkioWeight to re-read blkio.weight right after it is set in order to keep internal data up-to-date. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 24 8月, 2015 3 次提交
-
-
由 Vasiliy Tolstov 提交于
Commit aa2cc7 modified a previously unnecessary but innocuous check for interface IP address during interface update incorrectly, causing all attempted updates (e.g. changing link state) to interfaces of type='ethernet' for QEMU to fail. This patch fixes the issue by completely removing the check for IP address, which is pointless since QEMU doesn't support setting interface IP addresses from the domain interface XML anyway. Signed-off-by: NVasiliy Tolstov <v.tolstov@selfip.ru> Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Luyao Huang 提交于
We will try to set the node to cpuset.mems without check if it is available, since we already have helper to check this. Call virNumaNodesetIsAvailable to check if node is available, then try to change it in the cgroup. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Martin Kletzander 提交于
We are automatically generating some socket paths for domains, but all those paths end up in a directory that's the same for multiple domains. The problem is that multiple domains can each run with different seclabels (users, selinux contexts, etc.). The idea here is to create a per-domain directory labelled in a way that each domain can access its own unix sockets. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146886Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 20 8月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 8月, 2015 4 次提交
-
-
由 Martin Kletzander 提交于
The problem here is that there are some values that kernel accepts, but does not set them, for example 18446744073709551615 which acts the same way as zero. Let's do the same thing we do with other tuning options and re-read them right after they are set in order to keep our internal structures up-to-date. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1165580Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Well, yet again one case of 'goto cleanup' while 'goto endjob' was needed. Sorry. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1251886 Since iothread_id == 0 is an invalid value for QEMU let's point that out specifically. For the IOThreadDel code, the failure would have ended up being a failure to find the IOThread ID; however, for the IOThreadAdd code - an IOThread 0 was added and that isn't good. It seems during many reviews/edits to the code the check for iothread_id = 0 being invalid was lost - it could have originally been in the API code, but requested to be moved - I cannot remember.
-
由 Luyao Huang 提交于
Just like in commit 704cf06a, if virCgroup*() fails, the error is already reported. There's no need to overwrite the error with a generic one and possibly hiding the true root cause of the error. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 18 8月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
It may happen that user (mistakenly) wants to rename a domain to itself. Which is no renaming at all. We should reject that with some meaningful error message. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 8月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Coverity complained that 'vm' wasn't initialized before jumping to cleanup: and calling virDomainObjEndAPI if the VIR_STRDUP fails. So I initialized vm = NULL and also moved the VIR_STRDUP closer to usage and used endjob for goto. Lots of other reasons for failures.
-
- 14 8月, 2015 3 次提交
-
-
由 Tomas Meszaros 提交于
Currently supports only renaming inactive domains without snapshots. Signed-off-by: NTomas Meszaros <exo@tty.sk> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Guido Günther 提交于
RedHat and Debian based distros use different locations Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790935
-
由 Guido Günther 提交于
Otherwise the error is just error: Failed to create domain from test1.xml error: failed to retrieve file descriptor for interface: Transport endpoint is not connected since we don't get a sensible error after the fork.
-
- 13 8月, 2015 6 次提交
-
-
由 Martin Kletzander 提交于
Pinning information returned for emulatorpin and vcpupin calls is being returned from our data without querying cgroups for some time. However, not all the data were utilized. When automatic placement is used the information is not returned for the calls mentioned above. Since the numad hint in private data is properly saved/restored, we can safely use it to return true information. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1162947Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
The numad hint stored in priv->autoNodeset is information that gets lost during daemon restart. And because we would like to use that information in the future, we also need to save it in the status XML. For the sake of tests, we need to initialize nnumaCell_max to some value, so that the restoration doesn't fail in our test suite. There is no need to fill in the actual numa cell data since the recalculating function virCapabilitiesGetCpusForNodemask() will not fail, it will just skip filling the data in the bitmap which we don't use in tests anyway. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This needs a reorder of XML option definitions. It might come in handy one day. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When parsing private domain data, there are two paths that are flawed. They are both error paths, just from different parts of the function. One of them can call free() on an uninitialized pointer. Initialization to NULL is enough here. The other one is a bit trickier to explain, but as easy as the first one to fix. We create capabilities, parse them and then assign them into the private data pointer inside the domain object. If, however, we get to fail from now on, the error path calls unrefs the capabilities and then, when the domain object is being cleaned, qemuDomainObjPrivateFree() tries to unref them as well. That causes a segfault. Settin the pointer to NULL upon successful addition to the private data is enough. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1210587 (completed) When generating the default drive address for a SCSI <disk> device, check the generated address to ensure it doesn't conflict with a SCSI <hostdev> address. The <disk> address generation algorithm uses the <target> "dev" name in order to determine which controller and unit in order to place the device. Since a SCSI <hostdev> device doesn't require a target device name, its placement on the guest SCSI address "could" conflict. For instance, if a SCSI <hostdev> exists at controller=0 unit=0 and an attempt to hotplug 'sda' into the guest made, there would be a conflict if the <hostdev> is already using /dev/sda.
-
由 Frank Schreuder 提交于
Hot-unplugging a disk from a guest that supports hot-unplugging generates an error in the libvirt log when running QEMU with the "-msg timestamp=on" flag. 2015-08-06 10:48:59.945+0000: 11662: error : qemuMonitorTextDriveDel:2594 : operation failed: deleting drive-virtio-disk4 drive failed: 2015-08-06T10:48:59.945058Z Device 'drive-virtio-disk4' not found This error is caused because the HMP results are getting prefixed with a timestamp. Parsing the output is not reliable with STRPREFIX as the results can be prefixed with a timestamp. Using strstr ensures that parsing the output works whether the results are prefixed or not. Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: NFrank Schreuder <fschreuder@transip.nl>
-
- 12 8月, 2015 2 次提交
-
-
由 Laine Stump 提交于
This reverts commit ede34470, which was apparently written based on testing performed before commits 1e15be1b and 9a12b6 were pushed upstream. Once those two patches are in place, commit ede34470 is redundant, and can even cause incorrect/unexpected behavior when auto-assigning addresses for virtio-net devices.
-
由 Laine Stump 提交于
Commit e8d55172 updated the domain post-parse to automatically add pcie-root et al for certain ARM "virt" machinetypes, but didn't update the function qemuDomainSupportsPCI() which is called later on when we are auto-assigning PCI addresses and default settings for the PCI controller <model> and <target> attributes. The result was that PCI addresses weren't assigned, and the controllers didn't have their attribute default values set, leading to an error when the domain was started, e.g.: internal error: autogenerated dmi-to-pci-bridge options not set This patch adds the same check made in the earlier patch to qemuDomainSupportsPCI(), so that PCI address auto-assignment and target/model default values will be set.
-
- 11 8月, 2015 3 次提交
-
-
由 Michal Privoznik 提交于
Well, there are just two places that needs adjustment: qemuDomainGetInterfaceParameters - to report the @floor qemuDomainSetInterfaceParameters - now that the function has been fixed, we can allow updating @floor too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
As sketched in previous commits, imagine the following scenario: virsh # domiftune gentoo vnet0 inbound.average: 100 inbound.peak : 0 inbound.burst : 0 outbound.average: 100 outbound.peak : 0 outbound.burst : 0 virsh # domiftune gentoo vnet0 --inbound 0 virsh # shutdown gentoo Domain gentoo is being shutdown virsh # list --all error: Failed to list domains error: Cannot recv data: Connection reset by peer Program received signal SIGSEGV, Segmentation fault. 0x00007fffe80ea221 in networkUnplugBandwidth (net=0x7fff9400c1a0, iface=0x7fff940ea3e0) at network/bridge_driver.c:4881 4881 net->floor_sum -= ifaceBand->in->floor; This is rather unfortunate. We should not SIGSEGV here. The problem is, that while in the second step the inbound QoS was cleared out, the network part of it was not updated (moreover, we don't report that vnet0 had inbound.floor set). Internal structure therefore still had some fragments left (e.g. class_id). So when qemuProcessStop() started to clean up the environment it got to networkUnplugBandwidth(). Here, class_id is set therefore function assumes that there is an inbound QoS. This actually is a fair assumption to make, there's no need for a special QoS box in network's QoS when there's no QoS to set. Anyway, the problem is not the networkUnplugBandwidth() rather than qemuDomainSetInterfaceParameters() which completely forgot about QoS being disperse (some parts are set directly on interface itself, some on bridge the interface is plugged into). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
nwfilter uses iptables and ebtables, which only work properly on tap-based network connections (*not* on macvtap, for example), but we just ignore any <filterref> elements for other types of networks, potentially giving users a false sense of security. This patch checks the network type and fails/logs an error if any domain <interface> has a <filterref> when the connection isn't using a tap device. This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1180011
-
- 10 8月, 2015 9 次提交
-
-
由 Martin Kletzander 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1150484Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Cao jin 提交于
There's no need to set mon->fd to a dummy value since it's initialized to proper value just a few lines below. Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com>
-
由 Laine Stump 提交于
This is backed by the qemu device xio3130-downstream. It can only be connected to a pcie-switch-upstream-port (x3130-upstream) on the upstream side.
-
由 Laine Stump 提交于
This controller can be connected only to a port on a pcie-switch-upstream-port. It provides a single hotpluggable port that will accept any PCI or PCIe device, as well as any device requiring a pcie-*-port (the only current example of such a device is the pcie-switch-upstream-port).
-
由 Laine Stump 提交于
The downstream ports of an x3130-upstream switch can each have one of these plugged into them (and that is the only place they can be connected). Each xio3130-downstream provides a single PCIe port that can have PCI or PCIe devices hotplugged into it. Apparently an entire set of x3130-upstream + several xio3130-downstreams can be hotplugged as a unit, but it's not clear to me yet how that would be done, since qemu only allows attaching a single device at a time. This device will be used to implement the "pcie-switch-downstream-port" model of pci controller.
-
由 Laine Stump 提交于
this is backed by the qemu device x3130-upstream. It can only plug into a pcie-root-port or pcie-switch-downstream-port.
-
由 Laine Stump 提交于
This controller can be connected only to a pcie-root-port or a pcie-switch-downstream-port (which will be added in a later patch), which is the reason for the new connect type VIR_PCI_CONNECT_TYPE_PCIE_PORT. A pcie-switch-upstream-port provides 32 ports (slot=0 to slot=31) on the downstream side, which can only have pci controllers of model "pcie-switch-downstream-port" plugged into them, which is the reason for the other new connect type VIR_PCI_CONNECT_TYPE_PCIE_SWITCH.
-
由 Laine Stump 提交于
This is the upstream part of a PCIe switch. It connects to a PCIe port (but not PCI) on the upstream side, and can have up to 31 xio3130-downstream controllers (but no other types of devices) connected to its downstream side. This device will be used to implement the "pcie-switch-upstream-port" model of pci controller.
-
由 Laine Stump 提交于
This is backed by the qemu device ioh3420. chassis and port from the <target> subelement are used to store/set the respective qemu device options for the ioh3420. Currently, chassis is set to be the index of the controller, and port is set to "(slot << 3) + function" (per suggestion from Alex Williamson).
-