[libvirt] libvirt memory flags

2014-12-30 Thread Narayanan, Krishnaprasad
Hallo all, I am using libvirt version 1.1.1 on one of the nodes which has several VMs. When I executed the command, virsh dommemstat , I am getting the following flags as output: actual, swap_in and rss. The API does not return "unused memory" flag that is associated to the virtual machine / d

[libvirt] [PATCHv2] qemu: fix tc old rules will be cleaned if set tc new rules fail

2014-12-30 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1177723 If tc cmd failed (maybe value too large) when we use virDomainSetInterfaceParameters , the old rules will be clean. Restore the old rules if tc failed. Signed-off-by: Luyao Huang --- v1 make a big mistake that i used a old libvirt src/qemu/q

Re: [libvirt] [PATCH] qemu: fix tc old rules will be cleaned after set tc new rules fail

2014-12-30 Thread Luyao Huang
Please ignore this patch, i worked in a old upstream libvirt. Sorry for the noisy. Luyao - Original Message - From: "Luyao Huang" To: libvir-list@redhat.com Cc: "Luyao Huang" Sent: Tuesday, December 30, 2014 5:00:03 PM Subject: [libvirt] [PATCH] qemu: fix tc old rules will be cleaned af

[libvirt] [PATCHv5 02/18] virNetDevSetIPv4Address: libnl implementation

2014-12-30 Thread Cédric Bosdonnat
Add a default implementation of virNetDevSetIPv4Address using netlink and libnl. This avoids requiring /usr/sbin/ip or /usr/sbin/ifconfig external binaries. --- src/libvirt_private.syms | 1 + src/util/virnetdev.c | 136 +-- src/util/virnetlink.c

[libvirt] [PATCHv5 12/18] lxc conf2xml: convert ip addresses for hostdev NICs

2014-12-30 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c | 3 +++ tests/lxcconf2xmldata/lxcconf2xml-physnetwork.config | 2 ++ tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml| 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 3c8f928..edc5

[libvirt] [PATCH 1/2] Teach AppArmor, that /usr/lib64 may exist.

2014-12-30 Thread Cédric Bosdonnat
The apparmor profiles forgot about /usr/lib64 folders, just add lib64 as a possible alternative to lib in the paths --- examples/apparmor/libvirt-qemu | 2 +- examples/apparmor/usr.lib.libvirt.virt-aa-helper | 4 ++-- examples/apparmor/usr.sbin.libvirtd | 4 ++-- 3 f

[libvirt] [PATCHv5 17/18] Openvz --ipadd can be provided multiple times

2014-12-30 Thread Cédric Bosdonnat
Vzctl man page says that --ipadd can be provided multiple times to add several IP addresses. Looping over the configured ip addresses to add one --ipadd for each. This would even handle the multiple IPs handled by openvz_conf.c --- src/openvz/openvz_driver.c | 8 ++-- 1 file changed, 6 inserti

[libvirt] [PATCHv5 11/18] Allow network capabilities hostdev to configure IP addresses

2014-12-30 Thread Cédric Bosdonnat
--- docs/formatdomain.html.in| 8 docs/schemas/domaincommon.rng| 28 src/conf/domain_conf.c | 34 ++ src/conf/domain_conf.h | 2 ++ tests/lxcxml2xmldata/lxc-hostdev.xml | 2 ++

[libvirt] [PATCHv5 00/18] LXC IP configuration feature

2014-12-30 Thread Cédric Bosdonnat
Hi all, It's time for offering presents, so I'm sending you my updated patch series for IP configuration in LXC containers. The changes with v4 include: * Replacing the element by a one. * Addressing the comments you guys made I didn't forbid the use of iproute2 / ifconfig in containers if

[libvirt] [PATCHv5 10/18] lxc conf2xml: convert IP addresses

2014-12-30 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c| 144 +++- tests/lxcconf2xmldata/lxcconf2xml-simple.config | 2 + tests/lxcconf2xmldata/lxcconf2xml-simple.xml| 2 + 3 files changed, 97 insertions(+), 51 deletions(-) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_

[libvirt] [PATCHv5 05/18] virNetDevClearIPv4Address: netlink implementation

2014-12-30 Thread Cédric Bosdonnat
--- src/util/virnetdev.c | 60 +++- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index cbeba75..0948e7b 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -1052,6 +1052,47 @@

[libvirt] [PATCHv5 18/18] Report error if a driver can't handle multiple IP addresses

2014-12-30 Thread Cédric Bosdonnat
Drivers supporting one and only one IP address raise an error if more IP addresses are configured. --- src/vbox/vbox_common.c | 12 +--- src/xenconfig/xen_common.c | 12 ++-- src/xenconfig/xen_sxpr.c | 12 ++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff -

[libvirt] [PATCHv5 01/18] Forgot to cleanup ifname_guest* in domain network def parsing

2014-12-30 Thread Cédric Bosdonnat
--- src/conf/domain_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index aafc05e..914faf9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7903,6 +7903,8 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,

[libvirt] [PATCHv5 15/18] LXC: use the new net devices routes definition

2014-12-30 Thread Cédric Bosdonnat
Actually set routes in lxc containers if there are defined ones. --- src/lxc/lxc_container.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 6152df8..55096fb 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/l

[libvirt] [PATCHv5 14/18] lxc conf2xml: convert lxc.network.ipv[46].gateway

2014-12-30 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c | 57 +- .../lxcconf2xmldata/lxcconf2xml-physnetwork.config | 2 + tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 2 + tests/lxcconf2xmldata/lxcconf2xml-simple.config| 2 + tests/lxcconf2xmldata/lxcconf2xml-sim

[libvirt] [PATCHv5 08/18] IP doc

2014-12-30 Thread Cédric Bosdonnat
--- docs/formatdomain.html.in | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 9261f24..a17cd8b 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4328,18 +4328,19 @@ qemu-kvm -net ni

[libvirt] [PATCH 2/2] Fix error when starting a container after an error

2014-12-30 Thread Cédric Bosdonnat
The typical case for the problem is starting a domain needing a network that isn't started. Even after starting the network, we get an unknown error when starting the container. This is due to dynamic security label not being removed. --- src/lxc/lxc_process.c | 1 + 1 file changed, 1 insertion(+

[libvirt] [PATCHv5 13/18] Domain network devices can now have a element

2014-12-30 Thread Cédric Bosdonnat
Network interfaces devices and host devices with net capabilities can now have IPv4 and/or an IPv6 routes configured. --- docs/formatdomain.html.in| 19 - docs/schemas/domaincommon.rng| 31 src/conf/domain_conf.c | 135 ++

[libvirt] [PATCHv5 16/18] LXC: honour network devices link state

2014-12-30 Thread Cédric Bosdonnat
Don't activate LXC network device if has been set in its configuration. --- src/lxc/lxc_container.c | 46 -- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 55096fb..380d136 100644

[libvirt] [PATCHv5 06/18] Renamed virNetDevClearIPv4Address to virNetDevClearIPAddress

2014-12-30 Thread Cédric Bosdonnat
Make clear that virNetDevClearIPv4Address can also handle IPv6 addresses by changing the name --- src/libvirt_private.syms | 2 +- src/util/virnetdev.c | 14 +++--- src/util/virnetdev.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libvirt_priva

[libvirt] [PATCHv5 09/18] LXC: set IP addresses to veth devices in the container

2014-12-30 Thread Cédric Bosdonnat
Uses the new virDomainNetDef ips to set the IP addresses on the network interfaces in the container. --- src/lxc/lxc_container.c | 20 +++- src/util/virsocketaddr.h | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_contai

[libvirt] [PATCHv5 07/18] Domain conf: allow more than one IP address for net devices

2014-12-30 Thread Cédric Bosdonnat
Add the possibility to have more than one IP address configured for a domain network interface. IP addresses can also have a prefix to define the corresponding netmask. --- docs/formatdomain.html.in | 22 docs/schemas/domaincommon.rng | 16 ++- src/co

[libvirt] [PATCH 0/2] Misc fixes

2014-12-30 Thread Cédric Bosdonnat
Hi there, Here are 2 patches fixing tiny annoying problems. One of them, makes apparmor profiles handle /usr/lib64 folder and the other one fixes an uncleaned piece of domain config. Cédric Bosdonnat (2): Teach AppArmor, that /usr/lib64 may exist. Fix error when starting a container after an

[libvirt] [PATCHv5 03/18] Renamed virNetDevSetIPv4Address to virNetDevSetIPAddress

2014-12-30 Thread Cédric Bosdonnat
Renamed virNetDevSetIPv4Address as it also handles IPv6 addresses. --- src/libvirt_private.syms| 2 +- src/network/bridge_driver.c | 4 ++-- src/util/virnetdev.c| 14 +++--- src/util/virnetdev.h| 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --gi

[libvirt] [PATCHv5 04/18] virNetDevAddRoute: implementation using netlink

2014-12-30 Thread Cédric Bosdonnat
--- src/util/virnetdev.c | 105 +++ 1 file changed, 90 insertions(+), 15 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 26e5fa4..cbeba75 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -963,6 +963,95 @@ i

[libvirt] [PATCH] qemu: fix tc old rules will be cleaned after set tc new rules fail

2014-12-30 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1177723 If tc cmd failed when we use qemuDomainSetInterfaceParameters, the old rules will be clean. Restore the old rules if tc failed. Signed-off-by: Luyao Huang --- src/qemu/qemu_driver.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) d