[libvirt] [libvirt-glib 1/6] Set correct target node attribute for domain interface
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
gvir_config_domain_interface_set_ifname() should be setting 'dev'
attribute under 'target', not 'device'.
---
libvirt-gconfig/libvirt-gconfig-domain-interface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.c b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
index 85cc194..eab4313 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
@@ -57,7 +57,7 @@ void gvir_config_domain_interface_set_ifname(GVirConfigDomainInterface *interfac
g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_INTERFACE(interface));
gvir_config_object_replace_child_with_attribute(GVIR_CONFIG_OBJECT(interface),
- "target", "device", ifname);
+ "target", "dev", ifname);
}
void gvir_config_domain_interface_set_link_state(GVirConfigDomainInterface *interface,
--
1.7.7.6
12 years, 8 months
[libvirt] [PATCH v5 0/2] util: Add netlink event handling code
by D. Herrendoerfer
From: "D. Herrendoerfer" <d.herrendoerfer(a)herrendoerfer.name>
This is the updated netlink event code based upon the updated
virnetlink.[ch] files.
Also the related code to virnetdevmacvlan is included as well
as the related changes to the setup code.
D. Herrendoerfer (2):
util: Add netlink event handling to virnetlink.c
Add de-association handling to macvlan code
daemon/libvirtd.c | 8 +
src/libvirt_private.syms | 6 +
src/qemu/qemu_migration.c | 2 +-
src/util/virnetdevmacvlan.c | 315 +++++++++++++++++++++++++++-
src/util/virnetdevvportprofile.c | 33 ++-
src/util/virnetdevvportprofile.h | 3 +-
src/util/virnetlink.c | 438 +++++++++++++++++++++++++++++++++++++-
src/util/virnetlink.h | 29 +++
8 files changed, 815 insertions(+), 19 deletions(-)
--
1.7.7.5
12 years, 8 months
[libvirt] [libvirt-glib 1/6] Getters for GVirConfigDomainInterface attributes
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
---
libvirt-gconfig/libvirt-gconfig-domain-interface.c | 35 ++++++++++++++++++++
libvirt-gconfig/libvirt-gconfig-domain-interface.h | 4 ++
libvirt-gconfig/libvirt-gconfig.sym | 4 ++
3 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.c b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
index 85cc194..61d35bd 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
@@ -96,6 +96,41 @@ void gvir_config_domain_interface_set_model(GVirConfigDomainInterface *interface
"model", "type", model);
}
+const char *gvir_config_domain_interface_get_ifname(GVirConfigDomainInterface *interface)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_INTERFACE(interface), NULL);
+
+ return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(interface),
+ "target", "device");
+}
+
+GVirConfigDomainInterfaceLinkState gvir_config_domain_interface_get_link_state(GVirConfigDomainInterface *interface)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_INTERFACE(interface),
+ GVIR_CONFIG_DOMAIN_INTERFACE_LINK_STATE_DEFAULT);
+
+ return gvir_config_object_get_attribute_genum(GVIR_CONFIG_OBJECT(interface),
+ "link", "state",
+ GVIR_CONFIG_TYPE_DOMAIN_INTERFACE_LINK_STATE,
+ GVIR_CONFIG_DOMAIN_INTERFACE_LINK_STATE_DEFAULT);
+}
+
+const char *gvir_config_domain_interface_get_mac(GVirConfigDomainInterface *interface)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_INTERFACE(interface), NULL);
+
+ return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(interface),
+ "mac", "address");
+}
+
+const char *gvir_config_domain_interface_get_model(GVirConfigDomainInterface *interface)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_INTERFACE(interface), NULL);
+
+ return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(interface),
+ "model", "type");
+}
+
G_GNUC_INTERNAL GVirConfigDomainDevice *
gvir_config_domain_interface_new_from_tree(GVirConfigXmlDoc *doc,
xmlNodePtr tree)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.h b/libvirt-gconfig/libvirt-gconfig-domain-interface.h
index 6e802fb..c8c4fb3 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.h
@@ -72,6 +72,10 @@ void gvir_config_domain_interface_set_mac(GVirConfigDomainInterface *interface,
const char *mac_address);
void gvir_config_domain_interface_set_model(GVirConfigDomainInterface *interface,
const char *model);
+const char *gvir_config_domain_interface_get_ifname(GVirConfigDomainInterface *interface);
+GVirConfigDomainInterfaceLinkState gvir_config_domain_interface_get_link_state(GVirConfigDomainInterface *interface);
+const char *gvir_config_domain_interface_get_mac(GVirConfigDomainInterface *interface);
+const char *gvir_config_domain_interface_get_model(GVirConfigDomainInterface *interface);
G_END_DECLS
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 96ce58f..f91b8b0 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -145,6 +145,10 @@ LIBVIRT_GCONFIG_0.0.4 {
gvir_config_domain_interface_set_link_state;
gvir_config_domain_interface_set_mac;
gvir_config_domain_interface_set_model;
+ gvir_config_domain_interface_get_ifname;
+ gvir_config_domain_interface_get_link_state;
+ gvir_config_domain_interface_get_mac;
+ gvir_config_domain_interface_get_model;
gvir_config_domain_interface_bridge_get_type;
gvir_config_domain_interface_bridge_new;
--
1.7.7.6
12 years, 8 months
[libvirt] [PATCH 0/3] add to blockrebase implementation
by Eric Blake
0.9.10 added virDomainBlockRebase as a way to expose the pending
qemu 'block_stream' monitor command planned for qemu 1.1, including
it's optional base parameter, but didn't wire up that part of the
new API due to time constraints. RHEL 6.2 backported an earlier
version of block_stream that only supports qed, not qcow2, and which
lacked the base parameter). I still have plans to further improve
the situation in libvirt - we need to express the backing file chain
information in XML, and keep that representation up-to-date when
doing snapshot and pull operations. But this series is a bare
minimum to actually make use of the base parameter, with the
burden on the user to pass in a valid base name.
Eric Blake (3):
qemu: require json for block jobs
qemu: pass block pull backing file to monitor
virsh: expose partial pull
src/qemu/qemu_driver.c | 15 ++--
src/qemu/qemu_monitor.c | 14 ++--
src/qemu/qemu_monitor.h | 6 +-
src/qemu/qemu_monitor_json.c | 26 +++++--
src/qemu/qemu_monitor_json.h | 3 +-
src/qemu/qemu_monitor_text.c | 175 +-----------------------------------------
src/qemu/qemu_monitor_text.h | 8 +--
tools/virsh.c | 19 ++++-
tools/virsh.pod | 12 ++-
9 files changed, 63 insertions(+), 215 deletions(-)
--
1.7.7.6
12 years, 8 months
[libvirt] [PATCH] build: update to latest gnulib
by Eric Blake
It's been a while, and we're between releases, so now's as good
a time as any to resync. I didn't notice any showstopper bugs
being fixed, but we definitely get some improvements, such as
tighter syntax checks.
* .gnulib: Update to latest.
* bootstrap: Resync.
* cfg.mk (sc_prohibit_strncmp): Copy upstream changes to
sc_prohibit_strcmp.
---
* .gnulib e9e8aba...be29134 (47):
> stdalign: @samp -> @code in doc for consistency
> stdnoreturn: new module
> regex: fix false multibyte matches in some regular expressions
> maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
> streq: Rename macro.
> regex: fix typo in definition of MIN
> acl: Don't use ACL_CNT and similar ops, since they are unreliable.
> acl: Don't use GETACLCNT and similar ops, since they are unreliable.
> acl: Fix endless loop on Solaris with vxfs.
> acl: Fix copy-acl test failure on Solaris 11 2011-11.
> acl: Update doc references.
> Fix test failure in many locales on Solaris 11.
> gnulib-tool: Improve usage message.
> autoupdate
> README-release: make it easier to execute commands
> GNUmakefile: simplify detection of unconfigured trees
> autoupdate
> autoupdate
> autoupdate
> gnulib-tool: Doc fix.
> bootstrap: don't exit 0 upon gnulib-tool failure
> README-release: various improvements
> autoupdate
> maint: replace FSF snail-mail addresses with URLs
> README-release: capitalize a word and split a line
> fatal-signal: use C prototypes (with explicit void).
> regex: spelling fix
> regex: rely on stdint.h for SIZE_MAX
> regex: merge glibc changes
> maint.mk: also prohibit lower-case @var@
> autoupdate
> maint: spelling fixes
> canonicalize: avoid uninitialized memory use
> isatty: Fix test failure of ptsname_r on native Windows.
> spawn-pipe tests: Fix a NULL program name in a diagnostic.
> nonblocking-socket tests: Fix a NULL program name in a diagnostic.
> nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
> canonicalize-lgpl: fix // handling
> canonicalize: fix // handling
> ioctl: Fix test failure on native Windows.
> fsync: Avoid test failure on native Windows.
> * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
> sys_select: Avoid syntax error on OpenBSD 5.0.
> get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
> stdioext: Fix last commit.
> stdioext: Add tentative support for Plan9.
> file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
.gnulib | 2 +-
bootstrap | 6 +++---
cfg.mk | 3 ++-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/.gnulib b/.gnulib
index e9e8aba..be29134 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit e9e8aba12af3c903edd422fa036a356c5b2f313a
+Subproject commit be29134ddd011e6bcf1d73b4ae3d7ee7da60276f
diff --git a/bootstrap b/bootstrap
index 6910abf..31eb651 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2012-01-21.16; # UTC
+scriptversion=2012-02-11.09; # UTC
# Bootstrap this package from checked-out sources.
@@ -423,7 +423,7 @@ check_versions() {
$use_git || continue
fi
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
- appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+ appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
test "$appvar" = TAR && appvar=AMTAR
case $appvar in
GZIP) ;; # Do not use $GZIP: it contains gzip options.
@@ -604,7 +604,7 @@ if $bootstrap_sync; then
fi
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit
+<$gnulib_tool || exit $?
# Get translations.
diff --git a/cfg.mk b/cfg.mk
index 9759d87..ac6c527 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -346,8 +346,9 @@ sc_prohibit_access_xok:
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
# Use STREQLEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
+snp_ = strncmp *\(.+\)
sc_prohibit_strncmp:
- @grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
+ @grep -nE '! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
$$($(VC_LIST_EXCEPT)) \
| grep -vE ':# *define STR(N?EQLEN|PREFIX)\(' && \
{ echo '$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
--
1.7.7.6
12 years, 8 months
[libvirt] [PATCH] Fix typo in domain XML documentation
by Christophe Fergeau
s/Modyfing/Modifying
---
docs/formatdomain.html.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 5305f82..9e7dd08 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2580,7 +2580,7 @@ qemu-kvm -net nic,model=? /dev/null
<span class="since">Since 0.9.4</span>
</p>
- <h5><a name="elementLink">Modyfing virtual link state</a></h5>
+ <h5><a name="elementLink">Modifying virtual link state</a></h5>
<pre>
...
<devices>
--
1.7.7.6
12 years, 8 months
[libvirt] [PATCH] Support for cpu64-rhel* qemu cpu models
by Martin Kletzander
In qemu there are 2 cpu models (cpu64-rhel5 and cpu64-rhel6) not
supported by libvirt. This patch adds the support with the flags
specifications from /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf
---
src/cpu/cpu_map.xml | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 693caf1..be41253 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -327,6 +327,100 @@
<feature name='svm'/>
</model>
+ <model name='cpu64-rhel5'>
+ <vendor name='AMD'/>
+ <feature name='sse2'/>
+ <feature name='sse'/>
+ <feature name='fxsr'/>
+ <feature name='mmx'/>
+ <feature name='clflush'/>
+ <feature name='pse36'/>
+ <feature name='pat'/>
+ <feature name='cmov'/>
+ <feature name='mca'/>
+ <feature name='pge'/>
+ <feature name='mtrr'/>
+ <feature name='sep'/>
+ <feature name='apic'/>
+ <feature name='cx8'/>
+ <feature name='mce'/>
+ <feature name='pae'/>
+ <feature name='msr'/>
+ <feature name='tsc'/>
+ <feature name='pse'/>
+ <feature name='de'/>
+ <feature name='fpu'/>
+ <feature name='sse3'/>
+ <feature name='3dnow'/>
+ <feature name='3dnowext'/>
+ <feature name='lm'/>
+ <feature name='fxsr'/>
+ <feature name='mmx'/>
+ <feature name='nx'/>
+ <feature name='pat'/>
+ <feature name='cmov'/>
+ <feature name='pge'/>
+ <feature name='syscall'/>
+ <feature name='apic'/>
+ <feature name='cx8'/>
+ <feature name='mce'/>
+ <feature name='pae'/>
+ <feature name='msr'/>
+ <feature name='tsc'/>
+ <feature name='pse'/>
+ <feature name='de'/>
+ <feature name='fpu'/>
+ <feature name='svm'/>
+ </model>
+
+ <model name='cpu64-rhel6'>
+ <vendor name='AMD'/>
+ <feature name='sse2'/>
+ <feature name='sse'/>
+ <feature name='fxsr'/>
+ <feature name='mmx'/>
+ <feature name='clflush'/>
+ <feature name='pse36'/>
+ <feature name='pat'/>
+ <feature name='cmov'/>
+ <feature name='mca'/>
+ <feature name='pge'/>
+ <feature name='mtrr'/>
+ <feature name='sep'/>
+ <feature name='apic'/>
+ <feature name='cx8'/>
+ <feature name='mce'/>
+ <feature name='pae'/>
+ <feature name='msr'/>
+ <feature name='tsc'/>
+ <feature name='pse'/>
+ <feature name='de'/>
+ <feature name='fpu'/>
+ <feature name='cx16'/>
+ <feature name='sse3'/>
+ <feature name='lm'/>
+ <feature name='fxsr'/>
+ <feature name='mmx'/>
+ <feature name='nx'/>
+ <feature name='pat'/>
+ <feature name='cmov'/>
+ <feature name='pge'/>
+ <feature name='syscall'/>
+ <feature name='apic'/>
+ <feature name='cx8'/>
+ <feature name='mce'/>
+ <feature name='pae'/>
+ <feature name='msr'/>
+ <feature name='tsc'/>
+ <feature name='pse'/>
+ <feature name='de'/>
+ <feature name='fpu'/>
+ <feature name='sse4a'/>
+ <feature name='abm'/>
+ <feature name='svm'/>
+ <feature name='lahf_lm'/>
+ </model>
+
<model name='core2duo'>
<model name='pentiumpro'/>
<feature name='mtrr'/>
--
1.7.3.4
12 years, 8 months
[libvirt] [PATCH v2] Cleanup of the quick dirty fix from last week
by Martin Kletzander
Just a cleanup of commit 32f881c6c42f94da70a3782fe20a058fe3dc39cc.
---
src/lxc/lxc_container.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index e93fda5..2282eb0 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -449,8 +449,6 @@ static int lxcContainerMountBasicFS(const char *srcprefix, bool pivotRoot)
char *opts = NULL;
#if HAVE_SELINUX
security_context_t con;
-#else
- bool con = false;
#endif
VIR_DEBUG("Mounting basic filesystems %s pivotRoot=%d", NULLSTR(srcprefix), pivotRoot);
@@ -511,10 +509,17 @@ static int lxcContainerMountBasicFS(const char *srcprefix, bool pivotRoot)
* tmpfs is limited to 64kb, since we only have device nodes in there
* and don't want to DOS the entire OS RAM usage
*/
- if (virAsprintf(&opts, "mode=755,size=65536%s%s%s",
- con ? ",context=\"" : "",
- con ? (const char *)con : "",
- con ? "\"" : "") < 0) {
+
+#if HAVE_SELINUX
+ if (con)
+ ignore_value(virAsprintf(&opts,
+ "mode=755,size=65536,context=\"%s\"",
+ (const char *)con));
+ else
+#endif
+ opts = strdup("mode=755,size=65536");
+
+ if (!opts) {
virReportOOMError();
goto cleanup;
}
--
1.7.3.4
12 years, 8 months
[libvirt] [PATCH 0/2] qemu: Add pre-migration hook
by Jiri Denemark
Current dxml parameter of virDomainMigrate{,ToURI}2 requires the caller
to have deep knowlege of the environment on the target machine. In some
cases, this may be impractical or even impossible to achieve. By adding
per-migration hook which may filter incoming domain XML and change it
appropriately called during the Prepare phase the destination host may
filter incoming domain XMLs and change them to fit local environment.
For example, such hook may relocate disk images. The hook is not
allowed to make guest-visible changes to a domain XML.
Jiri Denemark (2):
hooks: Add support for capturing hook output
qemu: Add pre-migration hook
daemon/libvirtd.c | 6 +++---
docs/hooks.html.in | 35 +++++++++++++++++++++++------------
src/lxc/lxc_driver.c | 6 ++++--
src/qemu/qemu_migration.c | 40 ++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_process.c | 12 ++++++++----
src/util/hooks.c | 25 ++++++++++++++++++++-----
src/util/hooks.h | 3 ++-
7 files changed, 100 insertions(+), 27 deletions(-)
--
1.7.8.5
12 years, 8 months