[libvirt] [PATCH] qemu: don't fill in nicindexes for session mode libvirtd
by Laine Stump
Commit 4bbe1029f fixed a problem in commit f7afeddc by moving the call
to virNetDevGetIndex() to a location common to all interface types (so
that the niceindex 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
---
If someone (Rich?) needs this pushed before I am awake, please feel
free to push it. (also push to the 1.2.13-maint branch if you do)
src/qemu/qemu_command.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 1510797..3d1483e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7861,6 +7861,7 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
char **tapfdName = NULL;
char **vhostfdName = NULL;
int actualType = virDomainNetGetActualType(net);
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
virNetDevBandwidthPtr actualBandwidth;
size_t i;
@@ -7936,7 +7937,7 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
/* network and bridge use a tap device, and direct uses a
* macvtap device
*/
- if (nicindexes && nnicindexes && net->ifname) {
+ if (cfg->privileged && nicindexes && nnicindexes && net->ifname) {
if (virNetDevGetIndex(net->ifname, &nicindex) < 0 ||
VIR_APPEND_ELEMENT(*nicindexes, *nnicindexes, nicindex) < 0)
goto cleanup;
--
2.1.0
10 years, 3 months
[libvirt] [PATCH] virnet*: Don't unlock object in dispose
by Michal Privoznik
As of bba93d40 all of our RPC objects are derived from
virObjectLockable. However, during rewrite some errors sneaked
in. For instance, the dispose functions to virNetClient and
virNetServerClient objects were not only freeing allocated
memory, but unlocking themselves. This is wrong. Object should
never disappear while locked.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/rpc/virnetclient.c | 2 --
src/rpc/virnetserverclient.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index d7455b5..7fca055 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -622,8 +622,6 @@ void virNetClientDispose(void *obj)
#endif
virNetMessageClear(&client->msg);
-
- virObjectUnlock(client);
}
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index b2a4fdf..f5259c2 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -866,7 +866,6 @@ void virNetServerClientDispose(void *obj)
virObjectUnref(client->tlsCtxt);
#endif
virObjectUnref(client->sock);
- virObjectUnlock(client);
}
--
2.0.5
10 years, 3 months
[libvirt] [PATCH v3 00/10] Network enhancements and other fixes
by Maxim Nestratov
Maxim Nestratov (9):
parallels: don't forget to unlock domain if unregister fails
parallels: fix home directory for VMs
parallels: minor cleanup
parallels: introduce and use string constants for network types and
names
parallels: fix parallelsLoadNetworks
parallels: better bridge network interface support
parallels: set network adapter device status to connected
parallels: make E1000 network adapter type default
parallels: switch off offline management feature
Mikhail Feoktistov (1):
parallels: set cpu mode when applying xml configuration
10 years, 3 months
[libvirt] [PATCH 0/7] parallels: bridge network support enhancement and other network fixes
by Maxim Nestratov
Maxim Nestratov (7):
parallels: introduce and use string constants for network types and
names
parallels: fix parallelsLoadNetworks
parallels: better bridge network interface support
parallels: set network adapter device status to connected
parallels: make E1000 network adapter type default
parallels: switch off offline management feature
parallels: don't prevent domain start if VIR_DOMAIN_NET_TYPE_BRIDGE
10 years, 3 months
[libvirt] [PATCH 0/4] parallels: fixes and cleanups
by Maxim Nestratov
Maxim Nestratov (3):
parallels: don't forget to unlock domain if unregister fails
parallels: fix home directory for VMs
parallels: minor cleanup
Mikhail Feoktistov (1):
parallels: set cpu mode when applying xml configuration
10 years, 3 months
[libvirt] OVMF whitepaper released
by Laszlo Ersek
http://people.redhat.com/~lersek/ovmf-whitepaper-c770f8c.txt
(An official Red Hat whitepaper PDF edition, for graphical displays, is
in the works. As time and technical hurdles allow, both the plain text
and the PDF editions shall appear under
<http://www.linux-kvm.org/page/OVMF> too, replacing the stale article
currently visible there.)
Feedback is welcome.
For public feedback, please trim the address list to
<edk2-devel(a)lists.sourceforge.net> and yours truly; my intent is to spam
qemu-devel, linux-efi and libvir-list just this once. (Appropriate
levels of embarrassment are already being felt for spamming those.)
Thanks
Laszlo
10 years, 3 months
[libvirt] [PATCH v2] docs: add a note that spice channel is usable only with spice graphics
by Pavel Hrdina
To prevent a confusion about missing chardev argument in qemu
command line add a note about that behavior into documentation.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
docs/formatdomain.html.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index fb0a0d1..2f2976c 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5372,6 +5372,10 @@ qemu-kvm -net nic,model=? /dev/null
under a channel name specified in the <code>channel</code>
attribute. <span class="since">Since 1.2.2</span>
</p>
+ <p>
+ Note: in order for the spiceport to be usable, the domain must have
+ spice graphics as well.
+ </p>
<pre>
...
--
2.0.5
10 years, 3 months
[libvirt] [PATCH v9 0/4] Introduce API to query IP addresses for given domain
by Daniel P. Berrange
This polishes off Nehal's long standing work to add IP address
reporting to libvirt. In v9 I address John's coverity comments
and switched to use an dedicated parameter for selecting the
data source, instead of flags.
Nehal J Wani (4):
domifaddr: Implement the public APIs
domifaddr: Implement the remote protocol
domifaddr: Implement the API for qemu
domifaddr: Add virsh support
daemon/remote.c | 135 ++++++++++++++++++++++++++
include/libvirt/libvirt-domain.h | 28 ++++++
src/driver-hypervisor.h | 6 ++
src/libvirt-domain.c | 123 +++++++++++++++++++++++
src/libvirt_public.syms | 2 +
src/qemu/qemu_agent.c | 204 +++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_agent.h | 4 +
src/qemu/qemu_driver.c | 175 +++++++++++++++++++++++++++++++++
src/remote/remote_driver.c | 104 ++++++++++++++++++++
src/remote/remote_protocol.x | 37 ++++++-
src/remote_protocol-structs | 25 +++++
tests/qemuagenttest.c | 188 ++++++++++++++++++++++++++++++++++++
tools/virsh-domain-monitor.c | 146 ++++++++++++++++++++++++++++
tools/virsh.pod | 16 +++
14 files changed, 1192 insertions(+), 1 deletion(-)
--
2.1.0
10 years, 3 months
[libvirt] [PATCH] network_conf: check sysfs if the bridge exists on host for user created bridges
by Shivaprasad G Bhat
The patch fixes the below problem.
==============================
If the bridge name is not mentioned in the <network> xml, the bridge name is
auto generated from virNetworkAllocateBridge(). If the default template named
bridge is created manually by a user, the bridge start will fail with
"File exists".
bash-4.3$ sudo brctl addbr virbr1
bash-4.3$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
virbr0 8000.525400a91d03 yes virbr0-nic
virbr1 8000.000000000000 no
bash-4.3$ sudo virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
default active no yes
bash-4.3$ cat /tmp/isolated # Notice that the <bridge> intentionally not given.
<network>
<name>isolated</name>
<forward/>
<ip address="192.168.123.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.123.2" end="192.168.123.254"/>
</dhcp>
</ip>
</network>
bash-4.3$ sudo virsh net-create /tmp/isolated
error: Failed to create network from isolated
error: Unable to create bridge virbr1: File exists
===============================
---
The following series implements...
Shivaprasad G Bhat (1):
network_conf: check sysfs if the bridge exists on host for user created bridges
src/conf/network_conf.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--
Signature
10 years, 3 months
[libvirt] [PATCH 0/3] update and unify some documentation texts
by Pavel Hrdina
Pavel Hrdina (3):
iface-define: update and unify documentation
pool-define: update and unify documentation
net-define: update or unify documentation
src/libvirt-interface.c | 3 ++-
src/libvirt-network.c | 3 ++-
src/libvirt-storage.c | 4 ++--
tools/virsh-interface.c | 5 +++--
tools/virsh-network.c | 5 +++--
tools/virsh-pool.c | 5 +++--
tools/virsh.pod | 11 ++++++-----
7 files changed, 21 insertions(+), 15 deletions(-)
--
2.0.5
10 years, 3 months