- 15 12月, 2014 1 次提交
-
-
由 Erik Skultety 提交于
For historical reasons, only the first <console> element might be of targetType serial, but we checked for other consoles of targetType serial in our post-parse callback if and only if we knew the first console was serial, otherwise the check was skipped. This patch moves the check one level up, so first the check for secondary console of type serial is performed and then the rest of operations continue unchanged. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1170092
-
- 13 12月, 2014 2 次提交
-
-
由 Martin Kletzander 提交于
When one domain is being undefined and at the same time started, for example, there is a possibility of a rare problem occuring. - Thread 1 does virDomainUndefine(), has the lock, checks that the domain is active and because it's not, calls virDomainObjListRemove(). - Thread 2 does virDomainCreate() and tries to lock the domain. - Thread 1 needs to lock domain list in order to remove the domain from it, but must unlock domain first (proper order is to lock domain list first and the domain itself second). - Thread 2 grabs the lock, starts the domain and releases the lock. - Thread 1 grabs the lock and removes the domain from list. With this patch: - The undefining domain gets marked as "to undefine" before it is unlocked. - If domain is found in any of the search APIs, it's returned only if it is not marked as "to undefine". The check is done while the domain is locked. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1150505Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Luyao Huang 提交于
It make no sense at all to have it there. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 12 12月, 2014 1 次提交
-
-
由 Luyao Huang 提交于
Output error when we try to set a too large max_sectors. Just like queues and cmd_per_lun here. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 11 12月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
This fixes reverting to snapshots created by older libvirt and allows libvirt not to lose track of a domain that has this in its live status XML (such as a domain restored from managedsave) https://bugzilla.redhat.com/show_bug.cgi?id=1030793 https://bugzilla.redhat.com/show_bug.cgi?id=1151885
-
由 Ján Tomko 提交于
For host-passthrough CPU we don't honor the CPU features specified in the XML, but we allow outputting them via the UPDATE_CPU flag for dumpxml, this gives user a rough idea of what features the CPU might have. After restoring a managedsave'd domain, the features might end up in the live status XML (in /var/run) without the model. This XML cannot be parsed by the daemon after restart and the domain might disappear. This fix skips formatting the features for HOST_PASSTHROUGH when UPDATE_CPU is not specified, so the newly restored domains and newly created snapshots won't be affected. Note: this doesn't fix existing snapshots or already restored running domains. https://bugzilla.redhat.com/show_bug.cgi?id=1030793 https://bugzilla.redhat.com/show_bug.cgi?id=1151885
-
- 10 12月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
It make no sense at all to have it there. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 09 12月, 2014 5 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1171582 When we edit a negative controller address number to a device, some of them will auto generate a controller with invalid index number. This will make guest disappear after restart libvirtd. Instead of allowing negative number for controller index, we should forbid negative number in these place (we did this before, but after f18c02ec, virStrToLong_ui changed to allow negative number). Therefore switch to virStrToLong_uip in these places. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Kyle DeFrancia 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=907779 A <dhcp> element can exist in only one IPv4 address and one IPv6 address per network. This patch enforces that in virNetworkUpdate.
-
由 Laine Stump 提交于
At the time that the network driver allocates a connection to a network, the tap device that will be used hasn't yet been created - that will be done later by qemu (or lxc or whoever) - but if the network has macTableManager='libvirt', then when we do get around to creating the tap device, we will need to add an entry for it to the network bridge's fdb (forwarding database) *and* turn off learning and unicast_flood for that tap device in the bridge's sysfs settings. This means that qemu needs to know both the bridge name as well as the setting of macTableManager, so we either need to create a new API to retrieve that info, or just pass it back in the ActualNetDef that is created during networkAllocateActualDevice. We choose the latter method, since it's already done for the bridge device, and it has the side effect of making the information available in domain status. (NB: in the future, I think that the tap device should actually be created by networkAllocateActualDevice(), as that will solve several other problems, but that is a battle for another day, and this information will still be useful outside the network driver)
-
由 Laine Stump 提交于
When the actualType of a virDomainNetDef is "network", it means that we are connecting to a libvirt-managed network (routed, natted, or isolated) which does use a bridge device (created by libvirt). In the past we have required drivers such as qemu to call the public API to retrieve the bridge name in this case (even though it is available in the NetDef's ActualNetDef if the actualType is "bridge" (i.e., an externally-created bridge that isn't managed by libvirt). There is no real reason for this difference, and as a matter of fact it complicates things for qemu. Also, there is another bridge-related attribute (macTableManager) that will need to be available in both cases, so this makes things consistent. In order to avoid problems when restarting libvirtd after an update from an older version that *doesn't* store the network's bridgename in the ActualNetDef, we also need to put it in place during networkNotifyActualDevice() (this function is run for each interface of each domain whenever libvirtd is restarted). Along with making the bridge name available in the internal object, it is also now reported in the <source> element of the <interface> state XML (or the <actual> subelement in the internally-stored format). The one oddity about this change is that usually there is a separate union for every different "type" in a higher level object (e.g. in the case of a virDomainNetDef there are separate "network" and "bridge" members of the union that pivots on the type), but in this case network and bridge types both have exactly the same attributes, so the "bridge" member is used for both type==network and type==bridge.
-
由 Laine Stump 提交于
The macTableManager attribute of a network's bridge subelement tells libvirt how the bridge's MAC address table (used to determine the egress port for packets) is managed. In the default mode, "kernel", management is left to the kernel, which usually determines entries in part by turning on promiscuous mode on all ports of the bridge, flooding packets to all ports when the correct destination is unknown, and adding/removing entries to the fdb as it sees incoming traffic from particular MAC addresses. In "libvirt" mode, libvirt turns off learning and flooding on all the bridge ports connected to guest domain interfaces, and adds/removes entries according to the MAC addresses in the domain interface configurations. A side effect of turning off learning and unicast_flood on the ports of a bridge is that (with Linux kernel 3.17 and newer), the kernel can automatically turn off promiscuous mode on one or more of the bridge's ports (usually only the one interface that is used to connect the bridge to the physical network). The result is better performance (because packets aren't being flooded to all ports, and can be dropped earlier when they are of no interest) and slightly better security (a guest can still send out packets with a spoofed source MAC address, but will only receive traffic intended for the guest interface's configured MAC address). The attribute looks like this in the configuration: <network> <name>test</name> <bridge name='br0' macTableManager='libvirt'/> ... This patch only adds the config knob, documentation, and test cases. The functionality behind this knob is added in later patches.
-
- 03 12月, 2014 5 次提交
-
-
由 John Ferlan 提交于
Since virStreamFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API.
-
由 John Ferlan 提交于
Since virStoragePoolFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API.
-
由 John Ferlan 提交于
Since virNodeDeviceFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API.
-
由 John Ferlan 提交于
Since virNetworkFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API.
-
由 John Ferlan 提交于
Since virDomainFree will call virObjectUnref anyway, let's just use that directly so as to avoid the possibility that we inadvertently clear out a pending error message when using the public API.
-
- 02 12月, 2014 6 次提交
-
-
由 Ján Tomko 提交于
Partially reverts commit 5754dbd5. The code in the specfile adds a MAC address to every <bridge>, even for <forward mode='bridge'> for which we don't support changing MAC addresses. Remove it completely. For new networks, we have been adding MAC addresses on definition/creation since the commit mentioned above. For existing networks (pre-0.9.0), the MAC is added by this commit. https://bugzilla.redhat.com/show_bug.cgi?id=1156367
-
由 Ján Tomko 提交于
Libvirt's RPMs have been adding it to networks which don't support it. https://bugzilla.redhat.com/show_bug.cgi?id=1156367
-
由 Pavel Hrdina 提交于
Adding non-existing nwfilter to a network interface device without any nwfilter specified will crash libvirt daemon with segfault. The reason is that the nwfilter is not found an libvirt will try to restore old nwfilter configuration but there is no nwfilter specified. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Wang Rui 提交于
Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
-
由 Laine Stump 提交于
The function virNetworkObjListExport() in network_conf.c had a call to the public API virNetworkFree() which was causing a link error: CCLD libvirt_driver_vbox_network_impl.la ./.libs/libvirt_conf.a(libvirt_conf_la-network_conf.o): In function `virNetworkObjListExport': /home/laine/devel/libvirt/src/conf/network_conf.c:4496: undefined reference to `virNetworkFree' This would happen when I added #include "network_conf.h" into domain_conf.h, then attempted to call a new function from that file (and enum converter, similar to virNetworkForwardTypeToString()) In the end, virNetworkFree() ends up just calling virObjectUnref(obj) anyway (after clearing all pending errors, which we probably *don't* want to do in the cleanup of a utility function), so this is likely more correct than the original code as well.
-
由 John Ferlan 提交于
Commit id '0d36a5d0' modified the code slightly, but removed the return value check thus causing Coverity to complain that this call was the only one where the return value wasn't checked. Since nothing was done previously if there was a failure, just use ignore_value here to pacify Coverity
-
- 01 12月, 2014 5 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1159180 The virStoragePoolSourceFindDuplicate only checks the incoming definition against the same type of pool as the def; however, for "scsi_host" and "fc_host" adapter pools, it's possible that either some pool "scsi_host" adapter definition is already using the scsi_hostN that the "fc_host" adapter definition wants to use or some "fc_host" pool adapter definition is using a vHBA scsi_hostN or parent scsi_hostN that an incoming "scsi_host" definition is trying to use. This patch adds the mismatched type checks and adds extraneous comments to describe what each check is determining. This patch also modifies the documentation to be describe what scsi_hostN devices a "scsi_host" source adapter should use and which to avoid. It also updates the parent definition to specifically call out that for mixed environments it's better to define which parent to use so that the duplicate pool checks can be done properly.
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1159180 Move the API from the backend to storage_conf and rename it to virStoragePoolGetVhbaSCSIHostParent. A future patch will need to use this functionality from storage_conf
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1169183Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1169183Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 25 11月, 2014 3 次提交
-
-
由 Cédric Bosdonnat 提交于
Resolving symlinks can fail before mounting any file system if one file system depends on another being mounted. Symlinks are now resolved in two passes: * Before any file system is mounted, but then we are more gentle if the source path can't be accessed * Right before mounting a file system, so that we are sure that we have the resolved path... but then if it can't be accessed we raise an error.
-
由 Pavel Hrdina 提交于
Add attribute to set vgamem_mb parameter of QXL device for QEMU. This value sets the size of VGA framebuffer for QXL device. Default value in QEMU is 8MB so reuse it also in libvirt to not break things. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The vram attribute was introduced to set the video memory but it is usable only for few hypervisors excluding QEMU/KVM and the old XEN driver. Only in case of QEMU the vram was used for QXL. This patch updates the documentation to reflect current code in libvirt and also changes the cases when we will set the default vram attribute. It also fixes existing strange default value for VGA devices 9MB to 16MB because the video ram should be rounded to power of two. The change of default value could affect migrations but I found out that QEMU always round the video ram to power of two internally so it's safe to change the default value to the next closest power of two and also silently correct every domain XML definition. And it's also safe because we don't pass the value to QEMU. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1076098Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 24 11月, 2014 2 次提交
-
-
由 Tomoki Sekiyama 提交于
Get mounted filesystems list, which contains hardware info of disks and its controllers, from QEMU guest agent 2.2+. Then, convert the hardware info to corresponding device aliases for the disks. Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
-
由 Peter Krempa 提交于
As qemu is now able to notify us about change of the channel state used for communication with the guest agent we now can more precisely track the state of the guest agent. To allow notifying management apps this patch implements a new event that will be triggered on changes of the guest agent state.
-
- 21 11月, 2014 4 次提交
-
-
由 Peter Krempa 提交于
To be able to express some use cases of the RBD backing with libvirt, we need to be able to specify a config file for the RBD client to qemu as that is one of the commonly used options.
-
由 Peter Krempa 提交于
Some storage systems have internal support for snapshots. Libvirt should be able to select a correct snapshot when starting a VM. This patch adds a XML element to select a storage source snapshot for the RBD protocol which supports this feature.
-
由 Peter Krempa 提交于
To track state of virtio channels this patch adds a new output-only attribute called 'state' to the <target> element of virtio channels. This will be later populated with the guest state of the channel.
-
由 Peter Krempa 提交于
Add a comment to track which values may be present in certain members of a struct _virDomainChrDef.
-
- 19 11月, 2014 2 次提交
-
-
由 Eric Blake 提交于
I noticed this while working on qemuDomainGetBlockInfo. Assigning a bool value to an int variable compiles fine, but raises red flags on the maintenance front as it becomes too easy to assign -1 or 2 or any other non-bool value to the same variable. * cfg.mk (sc_prohibit_int_assign_bool): New rule. * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix offenders. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo) (qemuDomainSnapshotCreateXML): Likewise. * src/test/test_driver.c (testDomainSnapshotAlignDisks): Likewise. * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise. * src/util/virpci.c (virPCIDeviceBindToStub): Likewise. * src/util/virutil.c (virIsCapableVport): Likewise. * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise. * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot) (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal) (cmdDetachInterface): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Anirban Chakraborty 提交于
Ethernet interfaces in libvirt currently do not support bandwidth setting. For example, following xml file for an interface will not apply these settings to corresponding qdiscs. <interface type="ethernet"> <mac address="02:36:1d:18:2a:e4"/> <model type="virtio"/> <script path=""/> <target dev="tap361d182a-e4"/> <bandwidth> <inbound average="984" peak="1024" burst="64"/> <outbound average="2000" peak="2048" burst="128"/> </bandwidth> </interface> Signed-off-by: NAnirban Chakraborty <abchak@juniper.net> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-