[libvirt] [PATCH 0/2] Prefer -machine accel={tcg, kvm} over -{dis, en}able-kvm
by Jiri Denemark
Jiri Denemark (2):
qemu: Move -enable-kvm and friends earlier in the command line
qemu: Use -machine accel=tcg|kvm when available
src/qemu/qemu_command.c | 141 ++++++++++++---------
.../qemuxml2argv-cpu-host-kvmclock.args | 2 +-
.../qemuxml2argv-cpu-kvmclock.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-kvm.args | 4 +
tests/qemuxml2argvdata/qemuxml2argv-kvm.xml | 22 ++++
.../qemuxml2argv-machine-core-off.args | 2 +-
.../qemuxml2argv-machine-core-on.args | 2 +-
.../qemuxml2argv-machine-usb-opt.args | 2 +-
tests/qemuxml2argvtest.c | 1 +
9 files changed, 113 insertions(+), 65 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvm.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvm.xml
--
1.8.2.1
11 years, 7 months
Re: [libvirt] [PATCHv2] Configure native vlan modes on Open vSwitch ports
by james robson
> Date: Thu, 18 Apr 2013 14:14:32 -0400
> From: Laine Stump <laine(a)laine.org>
> To: libvir-list(a)redhat.com
> Subject: Re: [libvirt] [PATCHv2] Configure native vlan modes on Open
> vSwitch ports
> Message-ID: <51703808.2000504(a)laine.org>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 04/18/2013 01:44 PM, james robson wrote:
> > Hello,
> > Has any one been able to review this yet? I realise that the 'Since
> > 1.0.3' in the doc page is now out of date, but is the code itself
> > acceptable?
>
> I was hoping that someone with more knowledge of Open vSwitch and/or
> vlan tagging/trunking/native mode would repond to the message (Kyle?)
> but there was silence instead...
>
>
> >
> >
> > diff --git a/tests/networkxml2xmlin/openvswitch-net.xml
> > b/tests/networkxml2xmlin/openvswitch-net.xml
> > index a3d82b1..93c49d5 100644
> > --- a/tests/networkxml2xmlin/openvswitch-net.xml
> > +++ b/tests/networkxml2xmlin/openvswitch-net.xml
> > @@ -21,4 +21,13 @@
> > <parameters profileid='alice-profile'/>
> > </virtualport>
> > </portgroup>
> > + <portgroup name='tagged'>
> > + <vlan native_mode='tagged' native_tag='123'>
> > + <tag id='555'/>
> > + <tag id='444'/>
> > + </vlan>
> > + <virtualport>
> > + <parameters profileid='tagged-profile'/>
> > + </virtualport>
> > + </portgroup>
>
> As brought up again in a separate conversation today, we prefer to use
> camelCase rather than underscored in attribute and element names. So, if
> we were to use the layout you're proposing, the attributes should be
> called "nativeMode" and "nativeTag".
>
> However, I'm wondering if there might be a better way to structure it.
> What about this?
>
>
> <vlan trunk='yes'>
> <tag id='123' native='tagged|untagged'/> (or whatever values are
> appropriate)
> <tag id='555'/>
> <tag id='444'/>
> </vlan>
>
> Do I understand correctly that native mode is telling what to do with
> packets that come in untagged, and that (using your nomenclature
> "native_mode='yes' native_tag='123'" means "when an untagged packet come
> in from this interface, it should be tagged as 123 before forwarding"?
That is correct, setting the native vlan changes how an untagged packet
is handled when it enters the port. The difference between the 'tagged'
and 'untagged' modes is in how packets on the native vlan are processed
before exiting the port.
> And what happens when native_mode='yes' but there is no native_tag?
In that case you configuration is invalid, and will get an error.
> (that's what I was trying to describe with <tag id='123'
> native='untagged'/>, but I don't even know if that makes sense, because
> I don't know exactly what is the native vlan tag and what is done with
> it :-)
That arrangement would make sense, I chose the arrangement I did for two
main reasons. There can only be one native vlan on a port, making it an
attribute of the 'vlan' tag enforces this. Also, I wanted to keep the
validation and processing separate rather than add 'if native' branches
to the loops that operate on the vlan id list.
I can see the advantage of having a single setting to configure the
native vlan, rather than the two attributes I proposed. If the new
suggestion is preferred I can rework my patch to use that format.
> Also, is it valid to have a native_mode/native_tag if trunk='no'? (right
> now trunk is automatically set to 'yes' if there is more than one vlan tag)
It isn't valid to have trunk='no' and the native settings. Therefore
"<vlan trunk='no' native_mode='tagged' native_tag='123'>" will get an
error if you try to enter it.
If no "trunk" attribute is set explicitly then it will be set to 'yes'.
This means "<vlan native_mode='tagged' native_tag='123'>" is equivalent
to "<vlan trunk='yes' native_mode='tagged' native_tag='123'>".
>
> > </network>
> > diff --git a/tests/networkxml2xmlout/openvswitch-net.xml
> > b/tests/networkxml2xmlout/openvswitch-net.xml
> > index a3d82b1..ab3d797 100644
> > --- a/tests/networkxml2xmlout/openvswitch-net.xml
> > +++ b/tests/networkxml2xmlout/openvswitch-net.xml
> > @@ -21,4 +21,13 @@
> > <parameters profileid='alice-profile'/>
> > </virtualport>
> > </portgroup>
> > + <portgroup name='tagged'>
> > + <vlan trunk='yes' native_mode='tagged' native_tag='123'>
> > + <tag id='555'/>
> > + <tag id='444'/>
> > + </vlan>
> > + <virtualport>
> > + <parameters profileid='tagged-profile'/>
> > + </virtualport>
> > + </portgroup>
> > </network>
>
>
>
Protected by Websense Hosted Email Security -- www.websense.com
11 years, 7 months
[libvirt] [PATCHv2 0/6] Add support for guest-agent based cpu hot(un)plug
by Peter Krempa
This version contains fixes requested by Eric on patches 1/6, 3/6 and 4/6. Patch
2/6 is new in the series. I tweaked some details in 5/6 and 6/6 but they weren't
reviewed in version 1.
Changes are described in the patches themselves.
Peter Krempa (6):
virsh-domain: Refactor cmdVcpucount and fix output on inactive domains
conf: Reword error message to be more universal
qemu_agent: Introduce helpers for agent based CPU hot(un)plug
API: Introduce VIR_DOMAIN_VCPU_AGENT, for agent based CPU hot(un)plug
qemu: Implement request of vCPU state using the guest agent
qemu: Implement support for VIR_DOMAIN_VCPU in qemuDomainSetVcpusFlags
include/libvirt/libvirt.h.in | 1 +
src/conf/domain_conf.c | 2 +-
src/libvirt.c | 24 +++-
src/qemu/qemu_agent.c | 148 ++++++++++++++++++++++
src/qemu/qemu_agent.h | 12 ++
src/qemu/qemu_driver.c | 189 +++++++++++++++++++++++++---
tools/virsh-domain.c | 292 +++++++++++++++++++++----------------------
tools/virsh.pod | 13 +-
8 files changed, 510 insertions(+), 171 deletions(-)
--
1.8.1.5
11 years, 7 months
[libvirt] What about next release ?
by Daniel Veillard
We are getting quite close to the end of the month, if we want
to stick to the 'end of month release' I guess we need to enter the
freeze for 1.0.5 at the end of the week say Friday, and then push
the release, assuming there is no big problem on Thursday next week
(May 2, I could probably do it on May 1 but most civilized people
will enjoy the May 1 day off so that should not change that much ;-)
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 7 months
[libvirt] domblkstat not reporting disk errors
by SHREE DUTH AWASTHI
Hi All,
We are using libvirt 0.10.2 with hypervisor QEMU 0.14.1
We see that our hardware doesnt report any disk errors ( virsh domblkstat)
CENTOS(Libvirt version 0.9.4)
virsh # domblkstat fp-cla0 hda
hda rd_req 59837
hda rd_bytes 477478400
hda wr_req 462795
hda wr_bytes 5631972352
*hda errs 0
*
Our hardware (libvirt version 0.10.2)
virsh # domblkstat CLA-0 hda
hda rd_req 11
hda rd_bytes 217088
hda wr_req 0
hda wr_bytes 0
Could you please let us know if it is a known issue or does libvirt have
any dependency for this ?
Please throw more light on this.
Thanks and Regards,
Shree Duth Awasthi.
11 years, 7 months
[libvirt] [PATCH] Omitting braces with a single-line body
by harryxiyou@gmail.com
From: Harry Wei <harryxiyou(a)gmail.com>
After i read libvirt/HACKING file, i find we should
Omit braces with a single-line body. So this patch
fix this coding style problem for Sheepdog storage
backend driver.
Signed-off-by: Harry Wei <harryxiyou(a)gmail.com>
---
src/storage/storage_backend_sheepdog.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c
index 35a3a04..15fa29c 100644
--- a/src/storage/storage_backend_sheepdog.c
+++ b/src/storage/storage_backend_sheepdog.c
@@ -97,12 +97,10 @@ virStorageBackendSheepdogAddHostArg(virCommandPtr cmd,
const char *address = "localhost";
int port = 7000;
if (pool->def->source.nhost > 0) {
- if (pool->def->source.hosts[0].name != NULL) {
+ if (pool->def->source.hosts[0].name != NULL)
address = pool->def->source.hosts[0].name;
- }
- if (pool->def->source.hosts[0].port) {
+ if (pool->def->source.hosts[0].port)
port = pool->def->source.hosts[0].port;
- }
}
virCommandAddArg(cmd, "-a");
virCommandAddArgFormat(cmd, "%s", address);
@@ -210,11 +208,10 @@ virStorageBackendSheepdogParseVdiList(virStorageVolDefPtr vol,
continue;
/* skip space */
- if (p + 2 < next) {
+ if (p + 2 < next)
p += 2;
- } else {
+ else
return -1;
- }
/* skip name */
while (*p != '\0' && *p != ' ') {
--
1.7.9.5
11 years, 7 months
[libvirt] [libvirt-designer] Add missing files to EXTRA_DIST
by Christophe Fergeau
This fixes make distcheck
---
I've pushed this under the trivial rule.
Christophe
Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 9ef319a..726d475 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,8 @@ EXTRA_DIST = \
$(PACKAGE).spec \
$(pkgconfig_DATA:%.pc=%.pc.in) \
AUTHORS.in \
+ GNUmakefile \
+ maint.mk \
README.in \
$(NULL)
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH 0/3] Ignore libvirt logs when reading QEMU error output
by Jiri Denemark
Jiri Denemark (3):
qemu: Move QEMU log reading into a separate function
qemu: Ignore libvirt logs when reading QEMU error output
logging: Make log regexp more compact (and readable)
src/qemu/qemu_process.c | 81 +++++++++++++++++++++++++------------------------
src/util/virlog.c | 4 +--
2 files changed, 44 insertions(+), 41 deletions(-)
--
1.8.2.1
11 years, 7 months
[libvirt] [PATCH] update input ip processing
by Gene Czarcinski
1. Handle invalid ULong prefix specified.
When parsing for @prefix as a ULong, a -2 can be returned
if the specification is not a valid ULong.
2. Error out if address= is not specified.
3. Merge netmask process/tests under family tests.
4. Max sure that prefix does not exceed maximum.
.
Signed-off-by: Gene Czarcinski <gene(a)czarc.net>
---
src/conf/network_conf.c | 118 +++++++++++++++++++++++++++---------------------
1 file changed, 66 insertions(+), 52 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 2b56ca7..1503ece 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -1136,7 +1136,8 @@ virNetworkIPDefParseXML(const char *networkName,
xmlNodePtr cur, save;
char *address = NULL, *netmask = NULL;
- unsigned long prefix;
+ unsigned long prefix = 0;
+ int prefixRc;
int result = -1;
save = ctxt->node;
@@ -1144,14 +1145,8 @@ virNetworkIPDefParseXML(const char *networkName,
/* grab raw data from XML */
def->family = virXPathString("string(./@family)", ctxt);
- address = virXPathString("string(./@address)", ctxt);
- if (virXPathULong("string(./@prefix)", ctxt, &prefix) < 0)
- def->prefix = 0;
- else
- def->prefix = prefix;
-
- netmask = virXPathString("string(./@netmask)", ctxt);
+ address = virXPathString("string(./@address)", ctxt);
if (address) {
if (virSocketAddrParse(&def->address, address, AF_UNSPEC) < 0) {
virReportError(VIR_ERR_XML_ERROR,
@@ -1160,23 +1155,66 @@ virNetworkIPDefParseXML(const char *networkName,
goto cleanup;
}
+ } else {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Network address must be specified in definition of network '%s'"),
+ networkName);
+ goto cleanup;
+ }
+
+ netmask = virXPathString("string(./@netmask)", ctxt);
+ if (netmask) {
+ if (virSocketAddrParse(&def->netmask, netmask, AF_UNSPEC) < 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Bad netmask '%s' in definition of network '%s'"),
+ netmask, networkName);
+ goto cleanup;
+ }
+
+ }
+
+ prefixRc = virXPathULong("string(./@prefix)", ctxt, &prefix);
+ if (prefixRc == -2) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Invalid ULong value specified for prefix in definition of network '%s'"),
+ networkName);
+ goto cleanup;
}
+ if (prefixRc < 0)
+ def->prefix = 0;
+ else
+ def->prefix = prefix;
- /* validate family vs. address */
- if (def->family == NULL) {
+ /* validate address, etc. for each family */
+ if ((def->family == NULL) || (STREQ(def->family, "ipv4"))) {
if (!(VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET) ||
VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_UNSPEC))) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("no family specified for non-IPv4 address '%s' in network '%s'"),
- address, networkName);
+ _("%s family specified for non-IPv4 address '%s' in network '%s'"),
+ def->family == NULL? "no" : "ipv4", address, networkName);
goto cleanup;
}
- } else if (STREQ(def->family, "ipv4")) {
- if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("family 'ipv4' specified for non-IPv4 address '%s' in network '%s'"),
- address, networkName);
- goto cleanup;
+ if (netmask) {
+ if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->netmask, AF_INET)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("network '%s' has invalid netmask '%s' for address '%s' (both must be IPv4)"),
+ networkName, netmask, address);
+ goto cleanup;
+ }
+ if (def->prefix > 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("network '%s' cannot have both a prefix and a netmask"),
+ networkName);
+ goto cleanup;
+ }
+ }
+ else {
+ if (def->prefix > 32 ) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Invalid IPv4 prefix '%lu'specified in network'%s'"),
+ prefix, networkName);
+ goto cleanup;
+ }
}
} else if (STREQ(def->family, "ipv6")) {
if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET6)) {
@@ -1185,47 +1223,23 @@ virNetworkIPDefParseXML(const char *networkName,
address, networkName);
goto cleanup;
}
- } else {
- virReportError(VIR_ERR_XML_ERROR,
- _("Unrecognized family '%s' in definition of network '%s'"),
- def->family, networkName);
- goto cleanup;
- }
-
- /* parse/validate netmask */
- if (netmask) {
- if (address == NULL) {
- /* netmask is meaningless without an address */
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("netmask specified without address in network '%s'"),
- networkName);
- goto cleanup;
- }
-
- if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->address, AF_INET)) {
+ if (netmask) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("netmask not supported for address '%s' in network '%s' (IPv4 only)"),
+ _("specifying netmask invalid for IPv6 address '%s' in network '%s'"),
address, networkName);
goto cleanup;
}
-
- if (def->prefix > 0) {
- /* can't have both netmask and prefix at the same time */
+ if (def->prefix > 128 ) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("network '%s' cannot have both prefix='%u' and a netmask"),
- networkName, def->prefix);
- goto cleanup;
- }
-
- if (virSocketAddrParse(&def->netmask, netmask, AF_UNSPEC) < 0)
- goto cleanup;
-
- if (!VIR_SOCKET_ADDR_IS_FAMILY(&def->netmask, AF_INET)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("network '%s' has invalid netmask '%s' for address '%s' (both must be IPv4)"),
- networkName, netmask, address);
+ _("Invalid IPv6 prefix '%lu'specified in network'%s'"),
+ prefix, networkName);
goto cleanup;
}
+ } else {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("Unrecognized family '%s' in definition of network '%s'"),
+ def->family, networkName);
+ goto cleanup;
}
cur = node->children;
--
1.8.1.4
11 years, 7 months