[libvirt] [PATCH] docs: document <controller> element
by Eric Blake
* docs/formatdomain.html.in: Talk about <controller> and <address>
throughout.
---
Adding a new <controller type='ccid' index='0'/> and use of
<smartcard><address/></smartcard> for use by smartcard will be a lot
easier if I can compare the changes to existing <controller> and
<address> locations. To my surprise, there wasn't any documentation
for existing uses. Suggestions for polishing this are welcome, but
it's strictly an improvement over the nothingness that was there
previously ;)
docs/formatdomain.html.in | 99 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 2516c16..8d6b69e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -645,6 +645,7 @@
</source>
<target dev="hdb" bus="ide"/>
<boot order='1'/>
+ <address type='drive' controller='0' bus='1' unit='0'/>
</disk>
</devices>
...</pre>
@@ -773,8 +774,69 @@
</tr>
</table>
</dd>
+ <dt><code>address</code></dt>
+ <dd>If present, the <code>address</code> element ties the disk
+ to a given slot of a controller (the
+ actual <code><controller></code> device can often be
+ inferred by libvirt, although it can
+ be <a href="#elementsControllers">explicitly specified</a>).
+ The <code>type</code> attribute is mandatory, and is typically
+ "pci" or "drive". For a "pci" controller, additional
+ attributes for <code>bus</code>, <code>slot</code>,
+ and <code>function</code> must be present, as well as an
+ optional <code>domain</code>. For a "drive" controller, an
+ additional attribute <code>unit</code> is required, along with
+ optional <code>controller</code> and <code>bus</code>.
+ </dd>
</dl>
+ <h4><a name="elementsControllers">Controllers</a></h4>
+
+ <p>
+ Any device that has an <code><address></code> sub-element
+ generally requires a bus controller to manage all of the devices
+ associated with the same bus. Normally, libvirt can
+ automatically infer such controllers without requiring explicit
+ XML markup, but sometimes it is necessary to provide an explicit
+ controller element.
+ </p>
+
+<pre>
+ ...
+ <devices>
+ <controller type='ide' index='0'/>
+ <controller type='virtio-serial' index='0' ports='16' vectors='4'/>
+ <controller type='virtio-cerial' index='1'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+ </controller>
+ ...
+ </devices>
+ ...</pre>
+
+ <p>
+ Each controller has a mandatory attribute <code>type</code>,
+ which must be one of "ide", "fdc", "scsi", "sata", or
+ "virtio-serial", and a mandatory attribute <code>index</code>
+ which is the decimal integer describing in which order the bus
+ controller is encountered (for use in <code>bus</code>
+ attributes of <code><address></code> elements). The
+ "virtio-serial" controller has two additional optional
+ attributes <code>ports</code> and <code>vectors</code>, which
+ control how many devices can be connected through the
+ controller. Some controllers have an optional
+ attribute <code>model</code>, which is one of "auto",
+ "buslogic", "lsilogic", "lsias1068", or "vmpvscsi".
+ </p>
+
+ <p>
+ For controllers that are themselves devices on another bus, an
+ optional sub-element <code><address></code> can specify
+ the exact relationship of the controller to its master bus, with
+ semantics like any other device's <code>address</code>
+ sub-element.
+ </p>
+
+
<h4><a name="elementsUSB">USB and PCI devices</a></h4>
<p>
@@ -857,6 +919,16 @@
</devices>
...</pre>
+ <p>
+ There are several possibilities for specifying a network
+ interface visible to the guest. Each subsection below provides
+ more details about common setup options. Additionally,
+ each <code><interface></code> element has an
+ optional <code><address></code> sub-element that can tie
+ the interface to a
+ particular <a href="#elementsControllers">controller</a>.
+ </p>
+
<h5><a name="elementsNICSVirtual">Virtual network</a></h5>
<p>
@@ -1178,6 +1250,12 @@ qemu-kvm -net nic,model=? /dev/null
It takes values "xen" (paravirtualized), "ps2" and "usb".</dd>
</dl>
+ <p>
+ The <code>input</code> element has an optional
+ sub-element <code><address></code> which can tie the
+ device to a
+ particular <a href="#elementsControllers">controller</a>.
+ </p>
<h4><a name="elementsGraphics">Graphical framebuffers</a></h4>
@@ -1314,6 +1392,13 @@ qemu-kvm -net nic,model=? /dev/null
<code>accel3d</code> and <code>accel2d</code> attributes in the
<code>acceleration</code> element.
</dd>
+
+ <dt><code>address</code></dt>
+ <dd>
+ The optional <code>address</code> sub-element can be used to
+ tie the video device to a
+ particular <a href="#elementsControllers">controller</a>.
+ </dd>
</dl>
<h4><a name="elementsConsole">Consoles, serial, parallel & channel devices</a></h4>
@@ -1358,6 +1443,13 @@ qemu-kvm -net nic,model=? /dev/null
configured by the <code>source</code> element.
</p>
+ <p>
+ Each character device element has an optional
+ sub-element <code><address></code> which can tie the
+ device to a
+ particular <a href="#elementsControllers">controller</a>.
+ </p>
+
<h5><a name="elementsCharGuestInterface">Guest interface</a></h5>
<p>
@@ -1736,6 +1828,13 @@ qemu-kvm -net nic,model=? /dev/null
</dd>
</dl>
+ <p>
+ Each <code>sound</code> element has an optional
+ sub-element <code><address></code> which can tie the
+ device to a
+ particular <a href="#elementsControllers">controller</a>.
+ </p>
+
<h4><a name="elementsWatchdog">Watchdog device</a></h4>
<p>
--
1.7.3.4
13 years, 11 months
[libvirt] Fwd: [PATCH] Add support for multiple serial ports to Xen driver
by Michal Novotny
Hi,
I've been posting this patch using git send-email but unfortunately it
didn't arrive to the list but I saw some other mails arrive to the list
AFAIK so I'm posting this one just to make sure it wasn't my sendmail issue.
Michal
-------- Original Message --------
Subject: [PATCH] Add support for multiple serial ports to Xen driver
Date: Thu, 20 Jan 2011 13:20:50 +0100
From: Michal Novotny <minovotn(a)redhat.com>
To: libvir-list(a)redhat.com
CC: Michal Novotny <minovotn(a)redhat.com>
Hi,
this is the patch for to support multiple serial ports
for Xen driver. The definition for Xen has been
introduced in BZ #614004 and this is adding
support to libvirt-based tools.
The patch was originally written for RHEL-5 and libvirt
0.8.2 (RHEL-5.6) where it has been tested using
the virsh command and correct device creation has
been confirmed in the xend.log to have the same data
for serial ports using both `xm create` and `virsh
start` commands. Also, domains with both single and
multiple serial ports has been tested to confirm
it won't introduce any regression and everything
was working fine according to my testing. This patch
is the forward-port of RHEL-5 version of the patch.
Michal
Signed-off-by: Michal Novotny<minovotn(a)redhat.com>
---
src/xen/xend_internal.c | 19 ++++++++++++-
src/xen/xm_internal.c | 66 +++++++++++++++++++++++++++++++++++++++--------
3 files changed, 73 insertions(+), 14 deletions(-)
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 44d5a22..35cdd3c 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -5959,8 +5959,23 @@ xenDaemonFormatSxpr(virConnectPtr conn,
}
if (def->serials) {
virBufferAddLit(&buf, "(serial ");
- if (xenDaemonFormatSxprChr(def->serials[0],&buf)< 0)
- goto error;
+ /*
+ * If domain doesn't have multiple serial ports defined we
+ * keep the old-style formatting not to fail the sexpr tests
+ */
+ if (def->nserials> 1) {
+ for (i = 0; i< def->nserials; i++) {
+ virBufferAddLit(&buf, "(");
+ if (xenDaemonFormatSxprChr(def->serials[i],&buf)< 0)
+ goto error;
+ virBufferAddLit(&buf, ")");
+ }
+ }
+ else {
+ if (xenDaemonFormatSxprChr(def->serials[0],&buf)< 0)
+ goto error;
+ }
+
virBufferAddLit(&buf, ")");
} else {
virBufferAddLit(&buf, "(serial none)");
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index bfb6698..1bb62d7 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -1432,20 +1432,64 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
chr = NULL;
}
- if (xenXMConfigGetString(conf, "serial",&str, NULL)< 0)
- goto cleanup;
- if (str&& STRNEQ(str, "none")&&
- !(chr = xenDaemonParseSxprChar(str, NULL)))
- goto cleanup;
+ /* Try to get the list of values to support multiple serial ports */
+ list = virConfGetValue(conf, "serial");
+ if (list&& list->type == VIR_CONF_LIST) {
+ list = list->list;
+ while (list) {
+ char *port;
+
+ if ((list->type != VIR_CONF_STRING) || (list->str == NULL))
+ goto skipport;
+
+ port = list->str;
+ if (VIR_ALLOC(chr)< 0)
+ goto no_memory;
- if (chr) {
- if (VIR_ALLOC_N(def->serials, 1)< 0) {
+ if (!(chr = xenDaemonParseSxprChar(port, NULL)))
+ goto skipport;
+
+ if (VIR_REALLOC_N(def->serials, def->nserials+1)< 0)
+ goto no_memory;
+
+ chr->targetType = VIR_DOMAIN_CHR_TARGET_TYPE_SERIAL;
+ chr->type = VIR_DOMAIN_CHR_TYPE_PTY;
+
+ /* Implement device type of serial port when appropriate */
+ if (STRPREFIX(port, "/dev")) {
+ chr->type = VIR_DOMAIN_CHR_TYPE_DEV;
+ chr->target.port = def->nserials;
+ chr->data.file.path = strdup(port);
+
+ if (!chr->data.file.path)
+ goto no_memory;
+ }
+
+ def->serials[def->nserials++] = chr;
+ chr = NULL;
+
+ skipport:
+ list = list->next;
virDomainChrDefFree(chr);
- goto no_memory;
}
- chr->deviceType = VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL;
- def->serials[0] = chr;
- def->nserials++;
+ }
+ /* If domain is not using multiple serial ports we parse data old way */
+ else {
+ if (xenXMConfigGetString(conf, "serial",&str, NULL)< 0)
+ goto cleanup;
+ if (str&& STRNEQ(str, "none")&&
+ !(chr = xenDaemonParseSxprChar(str, NULL)))
+ goto cleanup;
+
+ if (chr) {
+ if (VIR_ALLOC_N(def->serials, 1)< 0) {
+ virDomainChrDefFree(chr);
+ goto no_memory;
+ }
+ chr->targetType = VIR_DOMAIN_CHR_TARGET_TYPE_SERIAL;
+ def->serials[0] = chr;
+ def->nserials++;
+ }
}
} else {
if (!(def->console = xenDaemonParseSxprChar("pty", NULL)))
--
1.7.3.2
13 years, 11 months
[libvirt] Installing libvirt 0.8.6 Ubuntu 9.10
by Marcela Castro León
Hello
When installing libvirt 0.8.6, I've passed ./configure, but when I execute
make, I've got
CCLD libvirtd
../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_driver.o): In
function `qemudVPAssociatePortProfiles':
/home/chubut/libvirt-0.8.6/src/qemu/qemu_driver.c:11881: undefined reference
to `vpAssociatePortProfileId'
/home/chubut/libvirt-0.8.6/src/qemu/qemu_driver.c:11898: undefined reference
to `vpDisassociatePortProfileId'
collect2: ld returned 1 exit status
make[3]: *** [libvirtd] Error 1
make[3]: Leaving directory `/home/chubut/libvirt-0.8.6/daemon'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/chubut/libvirt-0.8.6/daemon'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/chubut/libvirt-0.8.6'
make: *** [all] Error 2
chubut@chubut:~/libvirt-0.8.6$
Do you have any help?
Thank you.
Marcela
13 years, 11 months
[libvirt] [PATCH] docs: move the apps page to the top level as its good promo
by Justin Clift
---
docs/sitemap.html.in | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/docs/sitemap.html.in b/docs/sitemap.html.in
index 7077038..bcce62f 100644
--- a/docs/sitemap.html.in
+++ b/docs/sitemap.html.in
@@ -19,6 +19,10 @@
</ul>
</li>
<li>
+ <a href="apps.html">Applications</a>
+ <span>Applications known to use libvirt</span>
+ </li>
+ <li>
<a href="downloads.html">Downloads</a>
<span>Get the latest source releases, binary builds and get access to the source repository</span>
<ul>
@@ -313,12 +317,6 @@
<li>
<a href="relatedlinks.html">Related Links</a>
<span>Miscellaneous links of interest related to libvirt</span>
- <ul>
- <li>
- <a href="apps.html">Applications</a>
- <span>Overview of applications using the libvirt APIs</span>
- </li>
- </ul>
</li>
<li>
<a href="sitemap.html">Sitemap</a>
--
1.7.3.5
13 years, 11 months
[libvirt] [PATCH] Re: Minor php errors in the libvirt search script?
by Daniel Veillard
[ Cc'ing back the list ]
On Sun, Jan 09, 2011 at 03:11:29AM +1100, Justin Clift wrote:
> Hi Daniel,
>
> Noticing these php warning's showing up in the apache libvirt.org error log:
>
> [Sat Jan 08 17:09:24 2011] [error] [client 64.217.19.104] PHP Notice: Undefined variable: HTTP_GET_VARS in /data/www/libvirt.org/search.php on line 21, referer: http://libvirt.org/formatdomain.html
> [Sat Jan 08 17:09:24 2011] [error] [client 64.217.19.104] PHP Notice: Undefined variable: HTTP_GET_VARS in /data/www/libvirt.org/search.php on line 22, referer: http://libvirt.org/formatdomain.html
> [Sat Jan 08 17:09:24 2011] [error] [client 64.217.19.104] PHP Notice: Undefined variable: PHP_SELF in /data/www/libvirt.org/search.php on line 37, referer: http://libvirt.org/formatdomain.html
>
> Any idea if they're something we need to care about?
Yup, the search php was designed in php4 time frame and those global
variables are not turned off by default for security reasons
http://fr.php.net/manual/en/security.registerglobals.php
The following patch should fix those,
thanks for raising the issue,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 11 months
[libvirt] [RFC/PATCH v1] Adding entry for cpu tunable shares in xml
by Nikunj A. Dadhania
From: Nikunj A. Dadhania <nikunj(a)linux.vnet.ibm.com>
Make cpu share persistent and add support for parsing them.
docs/formatdomain.html.in: Document cputune element
src/conf/domain_conf.c,src/conf/domain_conf.h: Add cputune element parsing
src/lxc/lxc_controller.c: Use the parsed cputune shares value
src/qemu/qemu_cgroup.c: Use the parsed cputune shares value
Signed-off-by: Nikunj A. Dadhania <nikunj(a)linux.vnet.ibm.com>
---
docs/formatdomain.html.in | 11 +++++++++++
src/conf/domain_conf.c | 14 ++++++++++++++
src/conf/domain_conf.h | 3 +++
src/lxc/lxc_controller.c | 10 ++++++++++
src/qemu/qemu_cgroup.c | 15 +++++++++++++++
5 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 55e2cbd..522dc06 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -280,6 +280,9 @@
<swap_hard_limit>2097152</swap_hard_limit>
<min_guarantee>65536</min_guarantee>
</memtune>
+ <cputune>
+ <shares>1024</shares>
+ </cputune>
<vcpu cpuset="1-4,^3,6" current="1">2</vcpu>
...</pre>
@@ -317,6 +320,14 @@
<dd> The optional <code>min_guarantee</code> element is the guaranteed
minimum memory allocation for the guest. The units for this value are
kilobytes (i.e. blocks of 1024 bytes)</dd>
+ <dt><code>cputune</code></dt>
+ <dd> The optional <code>cputune</code> element provides details
+ regarding the cpu tuneable parameters for the domain. If this is
+ omitted, it defaults to the OS provided defaults.</dd>
+ <dt><code>shares</code></dt>
+ <dd> The optional <code>shares</code> element is the proportional
+ weighted share for the domain. If this is omitted, it defaults to the OS
+ provided defaults.</dd>
<dt><code>vcpu</code></dt>
<dd>The content of this element defines the maximum number of virtual
CPUs allocated for the guest OS, which must be between 1 and
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 645767e..63c8927 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4904,6 +4904,11 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
&def->mem.swap_hard_limit) < 0)
def->mem.swap_hard_limit = 0;
+ /* Extract cpu tunables */
+ if (virXPathULong("string(./cputune/shares[1])", ctxt,
+ &def->cputune.shares) < 0)
+ def->cputune.shares = 0;
+
n = virXPathULong("string(./vcpu[1])", ctxt, &count);
if (n == -2) {
virDomainReportError(VIR_ERR_XML_ERROR, "%s",
@@ -7313,6 +7318,15 @@ char *virDomainDefFormat(virDomainDefPtr def,
def->mem.swap_hard_limit)
virBufferVSprintf(&buf, " </memtune>\n");
+ if (def->cputune.shares)
+ virBufferVSprintf(&buf, " <cputune>\n");
+ if (def->cputune.shares) {
+ virBufferVSprintf(&buf, " <shares>%lu</shares>\n",
+ def->cputune.shares);
+ }
+ if (def->cputune.shares)
+ virBufferVSprintf(&buf, " </cputune>\n");
+
if (def->mem.hugepage_backed) {
virBufferAddLit(&buf, " <memoryBacking>\n");
virBufferAddLit(&buf, " <hugepages/>\n");
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index cf7bdc0..a2c83d3 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -981,6 +981,9 @@ struct _virDomainDef {
unsigned short maxvcpus;
int cpumasklen;
char *cpumask;
+ struct {
+ unsigned long shares; /* proportional weight */
+ } cputune;
/* These 3 are based on virDomainLifeCycleAction enum flags */
int onReboot;
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index af0b70c..24edb49 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -144,6 +144,16 @@ static int lxcSetContainerResources(virDomainDefPtr def)
}
}
+ if(def->cputune.shares) {
+ rc = virCgroupSetCpuShares(cgroup, def->cputune.shares);
+ if (rc != 0) {
+ virReportSystemError(-rc,
+ _("Unable to set cpu shares for domain %s"),
+ def->name);
+ goto cleanup;
+ }
+ }
+
rc = virCgroupDenyAllDevices(cgroup);
if (rc != 0) {
virReportSystemError(-rc,
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index e5536c0..d4e73bd 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -304,6 +304,21 @@ int qemuSetupCgroup(struct qemud_driver *driver,
vm->def->name);
}
+ if ((rc = qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPU))) {
+ if (vm->def->cputune.shares != 0) {
+ rc = virCgroupSetCpuShares(cgroup, vm->def->cputune.shares);
+ if (rc != 0) {
+ virReportSystemError(-rc,
+ _("Unable to set cpu shares for domain %s"),
+ vm->def->name);
+ goto cleanup;
+ }
+ }
+ } else {
+ VIR_WARN("CPU cgroup is disabled in qemu configuration file: %s",
+ vm->def->name);
+ }
+
done:
virCgroupFree(&cgroup);
return 0;
13 years, 11 months
[libvirt] virsh fails to define a domain
by Nikunj A. Dadhania
I am using the git version of libvirt. The domain file was working
previously.
[nikunj@dhruv ~]$ rpm -q qemu-kvm
qemu-kvm-0.12.3-8.fc13.x86_64
Some more debugging suggested that qemuCapsExtractDeviceStr is returning
an error. The output of the "pci-assign,?" is not returning any useful
information on my system.
[nikunj@dhruv ~]$ qemu-kvm -device "pci-assign,?"
property "pci-assign.?" not found
can't set property "?" to "on" for "pci-assign"
[nikunj@dhruv ~]$
This is supposedly related to f892f5a562cbb6e5b914adced1000df20c3174d6
commit. Don't know what could be a valid fix for this tough.
Regards
Nikunj
13 years, 11 months
[libvirt] [PATCH] docs: added new entries to apps page, plus adjusted a few existing
by Justin Clift
Added new entries for Hudson, LCFG, Tivoli Provisioning Manager,
virt-what, and Zenoss. Adjusted the existing entries for BuildBot
and vmware2libvirt.
---
docs/apps.html.in | 94 ++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 76 insertions(+), 18 deletions(-)
diff --git a/docs/apps.html.in b/docs/apps.html.in
index 054e8c2..09a1a7f 100644
--- a/docs/apps.html.in
+++ b/docs/apps.html.in
@@ -23,18 +23,6 @@
<img src="madeWith.png" alt="Made with libvirt"/>
</p>
- <h2><a name="automatedtesting">Automated compile/testing</a></h2>
-
- <dl>
- <dt><a href="http://buildbot.net">BuildBot</a></dt>
- <dd>
- BuildBot is a system to automate the compile/test cycle required
- by most software projects. CVS commits trigger new builds, run on
- a variety of client machines. Build status (pass/fail/etc) are
- displayed on a web page or through other protocols.
- </dd>
- </dl>
-
<h2><a name="clientserver">Client/Server applications</a></h2>
<dl>
@@ -103,6 +91,56 @@
Watch the CPU, memory, network and disk utilization of all
virtual machines running on a host.
</dd>
+ <dt>
+ <a href="http://people.redhat.com/~rjones/virt-what/">virt-what</a>
+ </dt>
+ <dd>
+ virt-what is a shell script for detecting if the program is running
+ in a virtual machine. It prints out a list of facts about the
+ virtual machine, derived from heuristics.
+ </dd>
+ </dl>
+
+ <h2><a name="configmgmt">Configuration Management</a></h2>
+
+ <dl>
+ <dt><a href="https://wiki.lcfg.org/bin/view/LCFG/LcfgLibvirt">LCFG</a></dt>
+ <dd>
+ LCFG is a system for automatically installing and managing the
+ configuration of large numbers of Unix systems. It is particularly
+ suitable for sites with very diverse and rapidly changing
+ configurations.
+ </dd>
+ <dd>
+ The lcfg-libvirt package adds support for virtualized systems to
+ LCFG, with both Xen and KVM known to work. Cloning guests is
+ supported, as are the bridged, routed, and isolated modes for
+ Virtual Networking.
+ </dd>
+ </dl>
+
+ <h2><a name="continuousintegration">Continuous Integration</a></h2>
+
+ <dl>
+ <dt><a href="http://buildbot.net/buildbot/docs/current/Libvirt.html">BuildBot</a></dt>
+ <dd>
+ BuildBot is a system to automate the compile/test cycle required
+ by most software projects. CVS commits trigger new builds, run on
+ a variety of client machines. Build status (pass/fail/etc) are
+ displayed on a web page or through other protocols.
+ </dd>
+ </dl>
+
+ <dl>
+ <dt><a href="http://wiki.hudson-ci.org/display/HUDSON/Libvirt+Slaves+Plugin">Hudson</a></dt>
+ <dd>
+ This plugin for Hudson adds a way to control guest domains hosted
+ on Xen or QEMU/KVM. You configure a Hudson Slave,
+ selecting the guest domain and hypervisor. When you need to build a
+ job on a specific Slave, its guest domain is started, then the job is
+ run. When the build process is finished, the guest domain is shut
+ down, ready to be used again as required.
+ </dd>
</dl>
<h2><a name="conversion">Conversion</a></h2>
@@ -133,9 +171,10 @@
possible. This conversion requires some Microsoft signed pieces,
that Red Hat can provide.
</dd>
- <dt><a href="http://bazaar.launchpad.net/~ubuntu-virt/virt-goodies/trunk/annotate/head...">vmware2libvirt</a></dt>
+ <dt><a href="https://launchpad.net/virt-goodies">vmware2libvirt</a></dt>
<dd>
- A Python script for migrating a vmware image to libvirt.
+ Part of the <i>virt-goodies</i> package, vmware2libvirt is a python
+ script for migrating a vmware image to libvirt.
</dd>
</dl>
@@ -188,9 +227,9 @@
</dd>
</dl>
- <h2><a name="monitoring">Monitoring plugins</a></h2>
+ <h2><a name="monitoring">Monitoring</a></h2>
<dl>
- <dt><a href="http://collectd.org/plugins/libvirt.shtml">for collectd</a></dt>
+ <dt><a href="http://collectd.org/plugins/libvirt.shtml">collectd</a></dt>
<dd>
The libvirt-plugin is part of <a href="http://collectd.org/">collectd</a>
and gathers statistics about virtualized guests on a system. This
@@ -199,13 +238,13 @@
For a full description, please refer to the libvirt section in the
collectd.conf(5) manual page.
</dd>
- <dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">for munin</a></dt>
+ <dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">Munin</a></dt>
<dd>
The plugins provided by Guido Günther allow to monitor various things
like network and block I/O with
<a href="http://munin.projects.linpro.no/">Munin</a>.
</dd>
- <dt><a href="http://et.redhat.com/~rjones/nagios-virt/">nagios-virt</a></dt>
+ <dt><a href="http://et.redhat.com/~rjones/nagios-virt/">Nagios-virt</a></dt>
<dd>
Nagios-virt is a configuration tool to add monitoring of your
virtualised domains to <a href="http://www.nagios.org/">Nagios</a>.
@@ -213,8 +252,27 @@
your Xen or QEMU/KVM guests, or to integrate with your existing Nagios
installation.
</dd>
+ <dt><a href="http://community.zenoss.org/docs/DOC-4687">Zenoss</a></dt>
+ <dd>
+ The Zenoss libvirt Zenpack adds support for monitoring virtualization
+ servers. It has been tested with KVM, QEMU, VMware ESX, and VMware
+ GSX.
+ </dd>
</dl>
+ <h2><a name="provisioning">Provisioning</a></h2>
+
+ <dl>
+ <dt><a href="http://www.ibm.com/software/tivoli/products/prov-mgr/">Tivoli Provisioning Manager</a></dt>
+ <dd>
+ Part of the IBM Tivoli family, Tivoli Provisioning Manager (TPM) is
+ an IT lifecycle automation product. It
+ <a href="http://publib.boulder.ibm.com/infocenter/tivihelp/v38r1/index.jsp?topic=/...">uses libvirt</a>
+ for communication with virtualization hosts and guest domains.
+ </dd>
+ </dl>
+
+
<h2><a name="web">Web applications</a></h2>
<dl>
--
1.7.3.5
13 years, 11 months
[libvirt] [PATCH] docs: document <sysinfo> and <symbios> elements
by Eric Blake
* docs/formatdomain.html.in: Talk about <sysinfo> throughout.
---
More in the vein of adding missing documentation.
docs/formatdomain.html.in | 79 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 78 insertions(+), 1 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8d6b69e..9719346 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -48,7 +48,10 @@
a globally unique identifier for the virtual machine.
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
If omitted when defining/creating a new machine, a random
- UUID is generated. <span class="since">Since 0.0.1</span></dd>
+ UUID is generated. It is also possible to provide the UUID
+ via a <a href="#elementsSysinfo"><code>sysinfo</code></a>
+ specification. <span class="since">Since 0.0.1, sysinfo
+ since 0.8.7</span></dd>
<dt><code>description</code></dt>
<dd>The content of the <code>description</code> element provides a
@@ -81,6 +84,7 @@
<boot dev='hd'/>
<boot dev='cdrom'/>
<bootmenu enable='yes'/>
+ <smbios mode='sysinfo'/>
</os>
...</pre>
@@ -115,6 +119,16 @@
If not specified, the hypervisor default is used. <span class="since">
Since 0.8.3</span>
</dd>
+ <dt><code>smbios</code></dt>
+ <dd>How to populate SMBIOS information visible in the guest.
+ The <code>mode</code> attribute must be specified, and is either
+ "emulate" (let the hypervisor generate all values), "host" (copy
+ all of Block 0 and Block 1, except for the UUID, from the host's
+ SMBIOS values), or "sysinfo" (use the values in
+ the <a href="#elementsSysinfo">sysinfo</a> element). If not
+ specified, the hypervisor default is used. <span class="since">
+ Since 0.8.7</span>
+ </dd>
</dl>
<h4><a name="elementsOSBootloader">Host bootloader</a></h4>
@@ -188,6 +202,69 @@
installation media source / kickstart file</dd>
</dl>
+ <h3><a name="elementsSysinfo">SMBIOS System Information</a></h3>
+
+ <p>
+ Some hypervisors allow control over what system information is
+ presented to the guest (for example, SMBIOS fields can be
+ populated by a hypervisor and inspected via
+ the <code>dmidecode</code> command in the guest). The
+ optional <code>sysinfo</code> element covers all such categories
+ of information. <span class="since">Since 0.8.7</span>
+ </p>
+
+<pre>
+ ...
+ <os>
+ <smbios mode='sysinfo'/>
+ ...
+ </os>
+ <sysinfo type='smbios'>
+ <bios>
+ <entry name='vendor'>LENOVO</entry>
+ </bios>
+ <system>
+ <entry name='manufacturer'>Fedora</entry>
+ <entry name='vendor'>Virt-Manager</entry>
+ </system>
+ </sysinfo>
+ ...</pre>
+
+ <p>
+ The <code>sysinfo</code> element has a mandatory
+ attribute <code>type</code> that determine the layout of
+ sub-elements, with supported values of:
+ </p>
+
+ <dl>
+ <dt><code>smbios</code></dt>
+ <dd>Sub-elements call out specific SMBIOS values, which will
+ affect the guest if used in conjunction with
+ the <code>smbios</code> sub-element of
+ the <a href="#elementsOS"><code>os</code></a> element. Each
+ sub-element of <code>sysinfo</code> names a SMBIOS block, and
+ within those elements can be a list of <code>entry</code>
+ elements that describe a field within the block. The following
+ blocks and entries are recognized:
+ <dl>
+ <dt><code>bios</code></dt>
+ <dd>
+ This is block 0 of SMBIOS, with entry names drawn from
+ "vendor", "version", "date", and "release".
+ </dd>
+ <dt><code>system</code></dt>
+ <dd>
+ This is block 1 of SMBIOS, with entry names drawn from
+ "manufacturer", "product", "version", "serial", "uuid",
+ "sku", and "family". If a "uuid" entry is provided
+ alongside a
+ top-level <a href="#elementsMetadata"><code>uuid</code>
+ element</a>, the two values must match.
+ </dd>
+ </dl>
+ </dd>
+ </dl>
+
<h3><a name="elementsResources">Basic resources</a></h3>
<pre>
--
1.7.3.4
13 years, 11 months
[libvirt] [PATCH] qemu: Avoid sending STOPPED event twice
by Jiri Denemark
In some circumstances, libvirtd would issue two STOPPED events after it
stopped a domain. This was because an EOF event can arrive after a qemu
process is killed but before qemuMonitorClose() is called.
qemuHandleMonitorEOF() should ignore EOF when the domain is not running.
I wasn't able to reproduce this bug directly, only after adding an
artificial sleep() into qemudShutdownVMDaemon().
---
src/qemu/qemu_driver.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 22dc272..cff7a43 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -356,6 +356,12 @@ qemuHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virDomainObjLock(vm);
+ if (!virDomainObjIsActive(vm)) {
+ VIR_DEBUG("Domain %p is not active, ignoring EOF", vm);
+ virDomainObjUnlock(vm);
+ return;
+ }
+
priv = vm->privateData;
if (!hasError && priv->monJSON && !priv->gotShutdown) {
VIR_DEBUG("Monitor connection to '%s' closed without SHUTDOWN event; "
--
1.7.4.rc2
13 years, 11 months