* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
* .x-sc_trailing_blank: New file, to exempt the few binary files.
--- /dev/null
+\.png$
+\.fig$
+\.gif$
+Tue Feb 3 20:26:53 CET 2008 Jim Meyering <meyering@redhat.com>
+
+ Remove all trailing blanks; turn on the rule to detect them.
+ * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
+ * .x-sc_trailing_blank: New file, to exempt the few binary files.
+
Tue Feb 3 11:21:45 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/xml.c, src/xend_internal.c: Allow use of kernel+initrd
makefile-check \
sc_no_have_config_h \
sc_tight_scope \
- sc_trailing_blank \
sc_GPL_version \
sc_always_defined_macros \
sc_cast_of_alloca_return_value \
various english fixes (Bruce Montague), OCaml docs links (Richard Jones),
describe the various bindings add Ruby link, Windows support page
(Richard Jones), authentication documentation updates (Daniel Berrange)
-
+
- Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
- migration source after failure (Jim Paris), negative integer in config
+ migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
- (Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
+ (Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
parameter setting in XM config (Saori Fukuta), credential handling
fixes (Daniel Berrange), fix compatibility with Xen 3.2.0 (Daniel
Berrange)
-
+
- Improvements: /etc/libvirt/qemu.conf configuration for QEMU driver
(Daniel Berrange), NUMA cpu pinning in config files (DV and Saori Fukuta),
CDRom media change in KVM/QEMU (Daniel Berrange), tests for
<shareable/> in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
- NUMA, add extra utility functions to buffer (Richard Jones),
+ NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
-
- - Code cleanups: remove virDomainRestart from API as it was never used
+
+ - Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
port (Richard Jones), disable the proxy if using PolicyKit, readline
availability detection, test libvirtd's config-processing code (Jim
Meyering), use a variable name as sizeof argument (Jim Meyering)
-
+
0.3.3: Sep 30 2007:
- New features: Avahi mDNS daemon export (Daniel Berrange),
- NUMA support (Beth Kan)
- - Documentation: cleanups (Toth Istvan), typos (Eduardo Pereira),
+ NUMA support (Beth Kan)
+ - Documentation: cleanups (Toth Istvan), typos (Eduardo Pereira),
- Bug fixes: memory corruption on large dumps (Masayuki Sunou), fix
virsh vncdisplay command exit (Masayuki Sunou), Fix network stats
TX/RX result (Richard Jones), warning on Xen 3.0.3 (Richard Jones),
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
- handling for remote URIs (Fabian Deutsch), fix potential crash
+ handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)
- Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
0.3.2: Aug 21 2007:
- - New features: KVM migration and save/restore (Jim Paris),
+ - New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).
- Documentation: examples for XML network APIs,
speedup of domain queries on Xen (Daniel berrange), augment XML dumps
with interface devices names (Richard Jones), internal API to query
drivers for features (Richard Jones).
-
+
- Cleanups: Improve virNodeGetInfo implentation (Daniel berrange),
general UUID code cleanup (Daniel berrange), fix API generator
- file selection.
+ file selection.
0.3.1: Jul 24 2007:
- Secure Remote support (Richard Jones).
See the remote page
of the documentation
-
+
- Documentation: remote support (Richard Jones), description of
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)
- - Bug fixes: examples Makefile.am generation (Richard Jones),
- SetMem fix (Mark Johnson), URI handling and ordering of
+ - Bug fixes: examples Makefile.am generation (Richard Jones),
+ SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
XML serialization bugs
- Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
- (Richard Jones), new entry points virDomainGetConnect and
- virNetworkGetConnect useful for bindings (Richard Jones),
+ (Richard Jones), new entry points virDomainGetConnect and
+ virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)
- Cleanups: parsing of connection URIs (Richard Jones), messages
- from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
+ from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
0.2.3: Jun 8 2007:
- Documentation: documentation for upcoming remote access (Richard Jones),
virConnectNumOfDefinedDomains doc (Jan Michael), virsh help messages
- for dumpxml and net-dumpxml (Chris Wright),
+ for dumpxml and net-dumpxml (Chris Wright),
- Bug fixes: RelaxNG schemas regexp fix (Robin Green), RelaxNG arch bug
(Mark McLoughlin), large buffers bug fixes (Shigeki Sakamoto), error
on out of memory condition (Shigeki Sakamoto), virshStrdup fix, non-root
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
- (Masayuki Sunou), allow init even if the daemon is not running,
+ (Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)
- Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
0.2.2: Apr 17 2007:
- - Documentation: fix errors due to Amaya (with Simon Hernandez),
+ - Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
- strings typos (Nikolay Sivov), ilocalization probalem raised by
+ strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot
- Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
- avoid memory explosion bug (Daniel Berrange), integer overflow
+ avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)
- Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
- snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
+ snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
- Berrange),
+ Berrange),
- Improvements: more regression tests on XML (Daniel Berrange), Python
bindings now generate exception in error cases (Richard Jones),
Python bindings for vir*GetAutoStart (Daniel Berrange),
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
- devices for HVM (Daniel Berrange),
-
+ devices for HVM (Daniel Berrange),
+
0.2.1: Mar 16 2007:
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)
- Add support for network autostart and init scripts (Mark McLoughlin)
- - New API virConnectGetCapabilities() to detect the virtualization
+ - New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)
- Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
parsing (Richard Jones)
- Add support for QEmu and KVM virtualization (Daniel Berrange)
- Add support for network configuration (Mark McLoughlin)
- - Minor improvements: regression testing (Daniel Berrange),
+ - Minor improvements: regression testing (Daniel Berrange),
localization string updates
- Support for localization of strings using gettext (Daniel Berrange)
- Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)
- Support for setting VNC port when creating domains with new
- xend config files (Daniel Berrange)
+ xend config files (Daniel Berrange)
- Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig)
- Fix reconnection problem when talking directly to http xend
floppy and cdrom (Daniel Berrange), features block in XML to report/ask
PAE, ACPI, APIC for HVM domains (Daniel Berrange), fail saide-effect
operations when using read-only connection, large improvements to test
- driver (Daniel Berrange)
+ driver (Daniel Berrange)
- documentation: spelling (Daniel Berrange), test driver examples.
Other environment:
- support for UML
-
+
+ UML control layer should be easy at least for one user but incomplete
Probable TODOs:
Cleanup:
- now that libxml2 is linked in, drop hash.[ch] and get back to libxml2 ones ?
- same for the buffers
+ same for the buffers
Autoconf:
- On Debian and other platforms, C++ compiler is required because
./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
--enable-test-coverage \
- --enable-compile-warnings=error
+ --enable-compile-warnings=error
make
make install
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
fi
$srcdir/configure "$@" && {
- echo
+ echo
echo "Now type 'make' to compile libvirt."
}
sub(/[0-9][0-9][0-9][0-9][0-9]+/, "<bug number='&'/>", str)
return(str)
}
-BEGIN {
+BEGIN {
nb_entry = 0
in_entry = 0
in_item = 0
print "</log>"
}
/^[ \t]*$/ { next }
-/^[A-Za-z0-9]/ {
+/^[A-Za-z0-9]/ {
match($0, "\(.*\) \([A-Z]+\) \([0-9][0-9][0-9][0-9]\) \(.*\) <\(.*\)>", loge)
if (in_item == 1) printf("%s</item>\n", translate(item))
if (in_entry == 1) print " </entry>"
match($0, "[ \t]*. *\(.*\)", loge)
item = loge[1]
}
-/^[ \t]*[a-zA-Z0-9\#]/ {
+/^[ \t]*[a-zA-Z0-9\#]/ {
if (in_item == 1) {
match($0, "[ \t]*\(.*\)[ \t]*", loge)
item = sprintf("%s %s", item, loge[1])
<ul><!-- style="margin-left: -1em" -->
<li><a style="font-weight:bold"
href="{$href_base}index.html">Main Menu</a></li>
- <li><a style="font-weight:bold"
+ <li><a style="font-weight:bold"
href="{$href_base}html/index.html">Modules Index</a></li>
<li><a style="font-weight:bold"
href="index.html">API Menu</a></li>
<a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id={@number}">
<xsl:value-of select="@number"/></a>
</xsl:template>
-
+
<xsl:template match="item">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="entry">
-
+
<p>
<b><xsl:value-of select="@who"/></b>
<xsl:text> </xsl:text>
rebuild: api all
-install-data-local:
+install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
$(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \
self.analyze_dict("structs", self.structs)
self.analyze_dict("typedefs", self.typedefs)
self.analyze_dict("macros", self.macros)
-
+
class CLexer:
"""A lexer for the C language, tokenize the input by reading and
analyzing it line by line"""
else:
line = line + n
return line
-
+
def getlineno(self):
return self.lineno
else:
break
self.tokens.append(('name', line[s:i]))
-
+
tok = self.tokens[0]
self.tokens = self.tokens[1:]
self.last = tok
return tok
-
+
class CParser:
"""The C module parser"""
def __init__(self, filename, idx = None):
l = string.strip(l)
desc = desc + " " + l
del lines[0]
-
+
desc = string.strip(desc)
if quiet == 0:
l = string.strip(l)
desc = desc + " " + l
del lines[0]
-
+
desc = string.strip(desc)
if quiet == 0:
else:
desc = desc + " " + l
del lines[0]
-
+
retdesc = string.strip(retdesc)
desc = string.strip(desc)
try:
self.defines.append(apstr)
if string.find(apstr, 'ENABLED') != -1:
- self.conditionals.append("defined(%s)" % apstr)
+ self.conditionals.append("defined(%s)" % apstr)
except:
pass
elif name == "#ifndef":
try:
self.defines.append(apstr)
if string.find(apstr, 'ENABLED') != -1:
- self.conditionals.append("!defined(%s)" % apstr)
+ self.conditionals.append("!defined(%s)" % apstr)
except:
pass
elif name == "#if":
return token
token = self.token()
return token
-
+
#
# Parse a C code block, used for functions it parse till
# the balancing } included
elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXEN_":
self.index_add_ref(oldtok[1], self.filename,
0, "typedef")
-
+
else:
token = self.token()
return token
if token == None:
return token
- while token[0] == "name" and (
+ while token[0] == "name" and (
token[1] == "const" or \
token[1] == "unsigned" or \
token[1] == "signed"):
else:
self.type = self.type + " " + token[1]
- # some read ahead for long long
+ # some read ahead for long long
oldtmp = token
token = self.token()
if token[0] == "name" and token[1] == "long":
self.type = tmp[1]
else:
self.type = self.type + " " + tmp[1]
-
+
elif token[0] == "name" and token[1] == "struct":
if self.type == "":
self.type = token[1]
token = self.token()
else:
break
-
+
return token
def parse(self):
return
self.parseTopComment(self.top_comment)
return self.index
-
+
class docBuilder:
"""A documentation builder"""
self.headers[file] = None;
self.scanHeaders()
self.scanModules()
-
+
def modulename_file(self, file):
module = os.path.basename(file)
if module[-2:] == '.h':
else:
output.write(" <variable name='%s' file='%s'/>\n" % (
name, self.modulename_file(id.header)))
-
+
def serialize_function(self, output, name):
id = self.idx.functions[name]
if name == debugsym:
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o $(srcdir)/libvirt.devhelp devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
-install-data-local:
+install-data-local:
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 libvirt.devhelp $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 $(EXTRA_FORMAT) $(DESTDIR)$(DEVHELP_DIR)
-.synopsis, .classsynopsis
+.synopsis, .classsynopsis
{
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
-.programlisting
+.programlisting
{
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
-.variablelist
+.variablelist
{
padding: 4px;
margin-left: 3em;
{
vertical-align: top;
}
-table.navigation
+table.navigation
{
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
-.navigation a
+.navigation a
{
color: #770000;
}
-.navigation a:visited
+.navigation a:visited
{
color: #550000;
}
-.navigation .title
+.navigation .title
{
font-size: 200%;
}
-div.refnamediv
+div.refnamediv
{
margin-top: 2em;
}
-div.gallery-float
+div.gallery-float
{
float: left;
padding: 10px;
}
-div.gallery-float img
+div.gallery-float img
{
border-style: none;
}
-div.gallery-spacer
+div.gallery-spacer
{
clear: both;
}
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \
$(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
-EXTRA_DIST=examples.xsl index.py examples.xml
+EXTRA_DIST=examples.xsl index.py examples.xml
-noinst_PROGRAMS=info1 suspend
+noinst_PROGRAMS=info1 suspend
info1_SOURCES=info1.c
info1_LDFLAGS=
suspend_DEPENDENCIES= $(DEPS)
suspend_LDADD= $(LDADDS)
-valgrind:
+valgrind:
$(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS)
</form>
<ul><!-- style="margin-left: -1em" -->
<li><a href="{$href_base}index.html">Home</a></li>
- <li><a style="font-weight:bold"
+ <li><a style="font-weight:bold"
href="{$href_base}docs.html">Developer Menu</a></li>
- <li><a style="font-weight:bold"
+ <li><a style="font-weight:bold"
href="{$href_base}html/index.html">API Menu</a></li>
<xsl:for-each select="/examples/sections/section">
<li><a href="#{@name}"><xsl:value-of select="@name"/> Examples</a></li>
dominfo.py - print information about a running domU based on the results of
virDomainGetInfo and virDomainGetXMLDesc
-domstart.py - create a domU from an XML description if the domU isn't
- running yet
+domstart.py - create a domU from an XML description if the domU isn't
+ running yet
domsave.py - save all running domU's into a directory
domrestore.py - restore domU's from their saved files in a directory
value = res[0].content
print_entry(key, value)
return value
-
+
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)
print "done"
else:
print "error %d" % ret
-
+
#pdb.set_trace()
doc = libxml2.parseDoc(xmldesc)
name = doc.xpathNewContext().xpathEval("/domain/name")[0].content
return (name, xmldesc)
-
+
def usage():
print 'Usage: %s domain.xml' % sys.argv[0]
print ' Check that the domain described by DOMAIN.XML is running'
checkDomainState(virDomainPtr dom) {
virDomainInfo info; /* the informations being fetched */
int ret;
-
+
ret = virDomainGetInfo(dom, &info);
if (ret < 0) {
return(-1);
fprintf(stderr, "Failed find a running guest domain\n");
goto error;
}
-
+
SuspendAndResumeDomain(id);
error:
VMs to have outgoing access. Example configs are:</p>
<pre><interface type='user'/></pre>
<pre>
-<interface type='user'>
- <mac address="11:22:33:44:55:66"/>
+<interface type='user'>
+ <mac address="11:22:33:44:55:66"/>
</interface>
</pre>
</li>
<source dev='br0'/>
<target dev='vnet7'/>
<mac address="11:22:33:44:55:66"/>
-</interface></pre>
+</interface></pre>
</li>
<li>Generic connection to LAN
<p>Provides a means for the administrator to execute an arbitrary script
unsigned long long cpuTime : the CPU time used in nanoseconds
}</pre>
a virDomainInfoPtr is a pointer to a virDomainInfo structure.
-
+
A pointe to a virDomainInterfaceStats structure
<h3><a name="virDomainInterfaceStatsStruct" id="virDomainInterfaceStatsStruct">Structure virDomainInterfaceStatsStruct</a></h3><pre class="programlisting">Structure virDomainInterfaceStatsStruct<br />struct _virDomainInterfaceStats {
long long rx_bytes
# Bye
#
# Then run the script in the doc subdir, it will create the symbols and
-# word tables and populate them with informations extracted from
+# word tables and populate them with informations extracted from
# the libvirt-api.xml API description, and make then accessible read-only
# by nobody@loaclhost the user expected to be Apache's one
#
except:
pass
return 0
-
+
def openMySQL(db="libvir", passwd=None, verbose = 1):
global DB
print "UPDATE words SET relevance = %d where name = '%s' and symbol = '%s'" % (relevance, name, symbol)
print sys.exc_type, sys.exc_value
return -1
-
+
return ret
def updateSymbol(name, module, type, desc):
print """UPDATE symbols SET module='%s', type='%s', descr='%s' where name='%s'""" % (module, type, desc, name)
print sys.exc_type, sys.exc_value
return -1
-
+
return ret
-
+
def addFunction(name, module, desc = ""):
return updateSymbol(name, module, 'function', desc)
print """UPDATE pages SET title='%s' WHERE resource='%s'""" % (title, resource)
print sys.exc_type, sys.exc_value
return -1
-
+
return ret
def updateWordHTML(name, resource, desc, id, relevance):
print """UPDATE wordsHTML SET section='%s', id='%s', relevance='%d' where name='%s' and resource='%s'""" % (desc, id, relevance, name, resource)
print sys.exc_type, sys.exc_value
return -1
-
+
return ret
def checkXMLMsgArchive(url):
return -1
except:
return -1
-
+
return row[0]
-
+
def addXMLMsgArchive(url, title):
global DB
except:
print "addXMLMsgArchive failed command: %s" % (cmd)
return -1
-
+
return((int)(row[0]))
def updateWordArchive(name, id, relevance):
print """UPDATE wordsArchive SET relevance='%d' where name='%s' and ID='%d'""" % (relevance, name, id)
print sys.exc_type, sys.exc_value
return -1
-
+
return ret
#########################################################################
str = string.replace(str, "\xc2", " ")
str = string.replace(str, "\xa0", " ")
return str
-
+
def cleanupDescrString(str):
str = string.replace(str, "'", " ")
str = string.replace(str, "\n", " ")
wordsDict[word] = {}
wordsDict[word][(module, symbol)] = relevance
return relevance
-
+
def addString(str, module, symbol, relevance):
if str == None or len(str) < 3:
return -1
d = wordsDictHTML[word];
d[resource] = (relevance, id, section)
return relevance
-
+
def addStringHTML(str, resource, id, section, relevance):
if str == None or len(str) < 3:
return -1
d = wordsDictArchive[word];
d[id] = relevance
return relevance
-
+
def addStringArchive(str, id, relevance):
if str == None or len(str) < 3:
return -1
for word in l:
addWord(word, file, symbol, 10)
return 1
-
+
def analyzeAPIFile(top):
count = 0
name = top.prop("name")
def analyzeAPIFiles(top):
count = 0
cur = top.children
-
+
while cur != None:
if cur.type == 'text':
cur = cur.next
def analyzeAPISymbols(top):
count = 0
cur = top.children
-
+
while cur != None:
if cur.type == 'text':
cur = cur.next
pass
return newmsg
-
+
#########################################################################
# #
- stop
- suspend
- resume
- - monitor
+ - monitor
More advanced features should be allowed as future extensions, but
are not expected to be provided in first shipment.
-
+
Open enough Licence that customers can link their apps to it (LGPL)
Small and contained enough that we can use it as a way to
are not uncommon, and it is very low level usually without comment about
the function or its arguments. They are usually only called once in the
whole tree by the python bindings. In essence it looks like the Xen project
-was not implemented with the idea of reusing that part of the code by
-applications.
+was not implemented with the idea of reusing that part of the code by
+applications.
Indeed most of the userland code coming with Xen is built on Python,
like xend the xen daemon running on domain 0 or the xenstored daemon which
manage the state of the domains launched.
------------
Here is supposition about code that I can't instanciate except by looking
-at said code but it looks that IBM also needed a C programmatic API to
+at said code but it looks that IBM also needed a C programmatic API to
manage the Xen domain definitions. Their solution was to build (Rusty
Russell did this) an LGPL C API connecting directly to the xenstore
daemon (./tools/xenstore/*). In a way this is quite more fragile as it depends
<li>Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
- migration source after failure (Jim Paris), negative integer in config
+ migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
- (Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
+ (Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
<shareable/> in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
- NUMA, add extra utility functions to buffer (Richard Jones),
+ NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
</li>
- <li>Code cleanups: remove virDomainRestart from API as it was never used
+ <li>Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
- handling for remote URIs (Fabian Deutsch), fix potential crash
+ handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)</li>
<li>Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
</ul>
<h3>0.3.2: Aug 21 2007</h3>
<ul>
- <li>New features: KVM migration and save/restore (Jim Paris),
+ <li>New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).</li>
<li>Documentation: examples for XML network APIs,
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)</li>
- <li>Bug fixes: examples Makefile.am generation (Richard Jones),
- SetMem fix (Mark Johnson), URI handling and ordering of
+ <li>Bug fixes: examples Makefile.am generation (Richard Jones),
+ SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
XML serialization bugs</li>
<li>Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
- (Richard Jones), new entry points virDomainGetConnect and
- virNetworkGetConnect useful for bindings (Richard Jones),
+ (Richard Jones), new entry points virDomainGetConnect and
+ virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)</li>
<li>Cleanups: parsing of connection URIs (Richard Jones), messages
- from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
+ from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
- (Masayuki Sunou), allow init even if the daemon is not running,
+ (Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)</li>
<li>Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
</ul>
<h3>0.2.2: Apr 17 2007</h3>
<ul>
- <li>Documentation: fix errors due to Amaya (with Simon Hernandez),
+ <li>Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
- strings typos (Nikolay Sivov), ilocalization probalem raised by
+ strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot</li>
<li>Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
- avoid memory explosion bug (Daniel Berrange), integer overflow
+ avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)</li>
<li>Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
- snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
+ snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
- devices for HVM (Daniel Berrange),
+ devices for HVM (Daniel Berrange),
</li>
</ul>
<h3>0.2.1: Mar 16 2007</h3>
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)</li>
<li>Add support for network autostart and init scripts (Mark McLoughlin)</li>
- <li>New API virConnectGetCapabilities() to detect the virtualization
+ <li>New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)</li>
<li>Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
parsing (Richard Jones)</li>
<li>Add support for QEmu and KVM virtualization (Daniel Berrange)</li>
<li>Add support for network configuration (Mark McLoughlin)</li>
- <li>Minor improvements: regression testing (Daniel Berrange),
+ <li>Minor improvements: regression testing (Daniel Berrange),
localization string updates</li>
</ul>
VMs to have outgoing access. Example configs are:</p>
<pre><interface type='user'/></pre>
<pre>
-<interface type='user'>
- <mac address="11:22:33:44:55:66"/>
+<interface type='user'>
+ <mac address="11:22:33:44:55:66"/>
</interface>
</pre>
</li>
<source dev='br0'/>
<target dev='vnet7'/>
<mac address="11:22:33:44:55:66"/>
-</interface></pre>
+</interface></pre>
</li>
<li>Generic connection to LAN
<p>Provides a means for the administrator to execute an arbitrary script
<ol>
<li>
- <p>Run Cygwin
+ <p>Run Cygwin
<a href="http://www.cygwin.com/setup.exe">setup.exe</a>.
When it starts up it will show a dialog like this:
</p>
</p>
<p>
-The <code>libvirtd</code> daemon should be started by the
+The <code>libvirtd</code> daemon should be started by the
init scripts when the machine boots. It should appear as
a process <code>libvirtd --daemon</code> running as root
in the background and will handle qemu instances on behalf
<ref name='domain'/>
</start>
- <!--
+ <!--
We handle only document defining a domain
Currently the virtualization types supported are:
- xen, either paravirualized with a linux os or fully virtualized (hvm)
</group>
</define>
- <!--
+ <!--
The Identifiers can be:
- an optional id attribute with a number on the domain element
- a mandatory name
</define>
<!--
- Disk may use a special driver for access. Currently this is
+ Disk may use a special driver for access. Currently this is
only defined for Xen for tap/aio and file, but will certainly be
extended in the future, and libvirt doesn't look for specific values.
-->
<xsl:sort select='@symbol'/>
</xsl:apply-templates>
</xsl:template>
-
+
<xsl:template match="file">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>
<li>Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
- migration source after failure (Jim Paris), negative integer in config
+ migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
- (Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
+ (Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
<shareable/> in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
- NUMA, add extra utility functions to buffer (Richard Jones),
+ NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
</li>
- <li>Code cleanups: remove virDomainRestart from API as it was never used
+ <li>Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
- handling for remote URIs (Fabian Deutsch), fix potential crash
+ handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)</li>
<li>Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
statistics</li>
<li>Code cleanups: virDrvOpenRemoteFlags definition (Richard Jones),
configure tests and output (Daniel Berrange)</li>
-</ul><h3>0.3.2: Aug 21 2007</h3><ul><li>New features: KVM migration and save/restore (Jim Paris),
+</ul><h3>0.3.2: Aug 21 2007</h3><ul><li>New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).</li>
<li>Documentation: examples for XML network APIs,
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)</li>
- <li>Bug fixes: examples Makefile.am generation (Richard Jones),
- SetMem fix (Mark Johnson), URI handling and ordering of
+ <li>Bug fixes: examples Makefile.am generation (Richard Jones),
+ SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
XML serialization bugs</li>
<li>Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
- (Richard Jones), new entry points virDomainGetConnect and
- virNetworkGetConnect useful for bindings (Richard Jones),
+ (Richard Jones), new entry points virDomainGetConnect and
+ virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)</li>
<li>Cleanups: parsing of connection URIs (Richard Jones), messages
- from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
+ from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
- (Masayuki Sunou), allow init even if the daemon is not running,
+ (Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)</li>
<li>Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
Jones), export __virGetDomain and __virGetNetwork for libvirtd only
(Richard Jones), ignore old VNC config for HVM on recent Xen (Daniel
Berrange), various code cleanups, -Werror cleanup (Hugh Brock)</li>
-</ul><h3>0.2.2: Apr 17 2007</h3><ul><li>Documentation: fix errors due to Amaya (with Simon Hernandez),
+</ul><h3>0.2.2: Apr 17 2007</h3><ul><li>Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
- strings typos (Nikolay Sivov), ilocalization probalem raised by
+ strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot</li>
<li>Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
- avoid memory explosion bug (Daniel Berrange), integer overflow
+ avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)</li>
<li>Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
- snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
+ snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
- devices for HVM (Daniel Berrange),
+ devices for HVM (Daniel Berrange),
</li>
</ul><h3>0.2.1: Mar 16 2007</h3><ul><li>Various internal cleanups (Richard Jones,Daniel Berrange,Mark McLoughlin)</li>
<li>Bug fixes: libvirt_qemud daemon path (Daniel Berrange), libvirt
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)</li>
<li>Add support for network autostart and init scripts (Mark McLoughlin)</li>
- <li>New API virConnectGetCapabilities() to detect the virtualization
+ <li>New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)</li>
<li>Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
parsing (Richard Jones)</li>
<li>Add support for QEmu and KVM virtualization (Daniel Berrange)</li>
<li>Add support for network configuration (Mark McLoughlin)</li>
- <li>Minor improvements: regression testing (Daniel Berrange),
+ <li>Minor improvements: regression testing (Daniel Berrange),
localization string updates</li>
</ul><h3>0.1.11: Jan 22 2007</h3><ul><li>Finish XML <-> XM config files support</li>
<li>Remove memory leak when freeing virConf objects</li>
</xsl:template>
<xsl:template match="xhtml:a">
<xsl:value-of select="."/>
- <xsl:text> at
+ <xsl:text> at
</xsl:text>
<xsl:value-of select="@href"/>
<xsl:text>
$result = mysql_query ("SELECT words.relevance, symbols.name, symbols.type, symbols.module, symbols.descr FROM words, symbols WHERE LCASE(words.name) LIKE LCASE('$word') and words.symbol = symbols.name ORDER BY words.relevance DESC LIMIT 75");
if ($result) {
$j = mysql_num_rows($result);
- if ($j == 0)
+ if ($j == 0)
mysql_free_result($result);
}
logQueryWord($word);
$result = mysql_query ("SELECT relevance, name, id, resource, section FROM wordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
if ($result) {
$j = mysql_num_rows($result);
- if ($j == 0)
+ if ($j == 0)
mysql_free_result($result);
}
logQueryWord($word);
$result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'libvir-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
if ($result) {
$j = mysql_num_rows($result);
- if ($j == 0)
+ if ($j == 0)
mysql_free_result($result);
}
logQueryWord($word);
</xsl:template>
<!--
- - The top section
+ - The top section
-->
<xsl:template name="top">
<div id="top">
<xsl:template name="bottom">
<div id="bottom">
<p class="p1"></p>
- </div>
+ </div>
</xsl:template>
<!--
<node>
-<!-- This file gives an example config for the mock 'test' backend
+<!-- This file gives an example config for the mock 'test' backend
driver to libvirt. This is intended to allow relible unit testing
of applications using libvirt. To use this with virsh, run something
like:
in releases prior to 0.3.0). The purpose of this
daemon is to manage qemu instances.
</p><p>
-The <code>libvirtd</code> daemon should be started by the
+The <code>libvirtd</code> daemon should be started by the
init scripts when the machine boots. It should appear as
a process <code>libvirtd --daemon</code> running as root
in the background and will handle qemu instances on behalf
This prints a small synopsis about all commands available for B<virsh>
B<help> I<command> will print out a detailed help message on that command.
-=item B<quit>
+=item B<quit>
quit this interactive terminal
-=item B<version>
+=item B<version>
-Will print out the major version info about what this built from.
+Will print out the major version info about what this built from.
=over 4
-B<Example>
+B<Example>
-B<virsh> version
+B<virsh> version
-Compiled against library: libvir 0.0.6
+Compiled against library: libvir 0.0.6
Using library: libvir 0.0.6
Returns basic information about the node, like number and type of CPU,
and size of the physical memory.
-=item B<capabilities>
+=item B<capabilities>
Print an XML document describing the capabilities of the hypervisor
we are currently connected to. This includes a section on the host
L<http://libvirt.org/format.html#Capa1>
The XML also show the NUMA topology informations if available.
-=item B<list>
+=item B<list>
Prints information about one or more domains. If no domains are
specified it prints out information about all domains.
An example format for the list is as follows:
B<virsh> list
- Id Name State
+ Id Name State
-----------------------------------
+----------------------------------
- 0 Domain-0 running
- 2 fedora paused
+ 0 Domain-0 running
+ 2 fedora paused
-Name is the name of the domain. ID the domain numeric id.
- State is the run state (see below).
+Name is the name of the domain. ID the domain numeric id.
+ State is the run state (see below).
=item B<freecell> optional I<cellno>
-Prints the available amount of memory on the machine or within a
+Prints the available amount of memory on the machine or within a
NUMA cell if I<cellno> is provided.
=over 4
=item B<s - shutdown>
The domain is in the process of shutting down, i.e. the guest operating system
-has been notified and should be in the process of stopping its operations
+has been notified and should be in the process of stopping its operations
gracefully.
=item B<c - crashed>
Connect the virtual serial console for the guest.
-=item B<create> I<FILE>
+=item B<create> I<FILE>
-Create a domain from an XML <file> an easy way to create one if you have a pre-existing xen guest created via B<xm> create <XMLFILE>.
+Create a domain from an XML <file> an easy way to create one if you have a pre-existing xen guest created via B<xm> create <XMLFILE>.
B<Example>
-virsh dumpxml <domain-id> > file.
+virsh dumpxml <domain-id> > file.
=item B<define> I<FILE>
cord out on a physical machine. In most cases you will want to use
the B<shutdown> command instead.
-=item B<dominfo> I<domain-id>
+=item B<dominfo> I<domain-id>
Returns basic information about the domain.
=item B<dumpxml> I<domain-id>
-Output the domain informations as an XML dump to stdout, this format can be used by the B<create> command.
+Output the domain informations as an XML dump to stdout, this format can be used by the B<create> command.
=item B<reboot> I<domain-id>
=item B<setmaxmem> I<domain-id> B<kilobytes>
Change the maximum memory allocation limit in the guest domain. This should
-not change the current memory use. The memory limit is specified in
+not change the current memory use. The memory limit is specified in
kilobytes.
=item B<setvcpus> I<domain-id> I<count>
Change the number of virtual CPUs active in the guest domain. Note that
-I<count> may be limited by host, hypervisor or limit coming from the
+I<count> may be limited by host, hypervisor or limit coming from the
original description of domain.
For Xen, you can only adjust the virtual CPUs of a running domain if
Gracefully shuts down a domain. This coordinates with the domain OS
to perform graceful shutdown, so there is no guarantee that it will
succeed, and may take a variable length of time depending on what
-services must be shutdown in the domain.
+services must be shutdown in the domain.
For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
I<on_shutdown> parameter of the xmdomain.cfg file when the domain was
=item B<net-create> I<file>
Create a virtual network from an XML I<file>, see the documentation to get
-a description of the XML network format used by libvirt.
+a description of the XML network format used by libvirt.
=item B<net-define> I<file>
=head1 AUTHOR
- Andrew Puch <apuch @ redhat.com>
+ Andrew Puch <apuch @ redhat.com>
Daniel Veillard <veillard @ redhat.com>
- Based on the xm man paged by
+ Based on the xm man paged by
Sean Dague <sean at dague dot net>
Daniel Stekloff <dsteklof at us dot ibm dot com>
=head1 BUGS
-Bugs can be view on the RedHat buzilla page under the libvirt
+Bugs can be view on the RedHat buzilla page under the libvirt
L<https://bugzilla.redhat.com/>
L<https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr>
-
+
=end
These are the steps to take to compile libvirt from
source on Windows:
</p><ol><li>
- <p>Run Cygwin
+ <p>Run Cygwin
<a href="http://www.cygwin.com/setup.exe">setup.exe</a>.
When it starts up it will show a dialog like this:
</p>
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
- * the informations for the Node.
+ * the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
* @param cred list of virConnectCredential object to fetch from user
* @param ncred size of cred list
* @param cbdata opaque data passed to virConnectOpenAuth
- *
+ *
* When authentication requires one or more interactions, this callback
* is invoked. For each interaction supplied, data must be gathered
* from the user and filled in to the 'result' and 'resultlen' fields.
/**
* LIBVIR_VERSION_NUMBER:
*
- * Macro providing the version of the library as
+ * Macro providing the version of the library as
* version * 1,000,000 + minor * 1000 + micro
*/
*/
int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info);
-
+
/*
* Return scheduler type in effect 'sedf', 'credit', 'linux'
*/
unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
-int virDomainGetUUIDString (virDomainPtr domain,
+int virDomainGetUUIDString (virDomainPtr domain,
char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
- * the informations for the Node.
+ * the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
* @param cred list of virConnectCredential object to fetch from user
* @param ncred size of cred list
* @param cbdata opaque data passed to virConnectOpenAuth
- *
+ *
* When authentication requires one or more interactions, this callback
* is invoked. For each interaction supplied, data must be gathered
* from the user and filled in to the 'result' and 'resultlen' fields.
/**
* LIBVIR_VERSION_NUMBER:
*
- * Macro providing the version of the library as
+ * Macro providing the version of the library as
* version * 1,000,000 + minor * 1000 + micro
*/
*/
int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info);
-
+
/*
* Return scheduler type in effect 'sedf', 'credit', 'linux'
*/
unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
-int virDomainGetUUIDString (virDomainPtr domain,
+int virDomainGetUUIDString (virDomainPtr domain,
char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
%description python
The libvirt-python package contains a module that permits applications
written in the Python programming language to use the interface
-supplied by the libvirt library to use the virtualization capabilities
+supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).
%prep
- add patch to address dom0_ops API breakage in Xen 3.0.3 tree
* Mon Aug 28 2006 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
-- add patch to support paravirt framebuffer in Xen
+- add patch to support paravirt framebuffer in Xen
* Mon Aug 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-3
- another patch to fix network handling in non-HVM guests
- fixes some problems in 0.0.3 due to the change of names
* Wed Feb 8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1
-- changed library name to libvirt from libvir, complete and test the python
+- changed library name to libvirt from libvir, complete and test the python
bindings
* Sun Jan 29 2006 Daniel Veillard <veillard@redhat.com> 0.0.2-1
-# translation of ru.po to
+# translation of ru.po to
# translation of ru.po to
# translation of ru.po to
# translation of ru.po to
# Swedish translation of libvirt.
# Copyright (C) 2006 Free Software Foundation, Inc.
# Magnus Larsson <fedoratrans@gmail.com>, 2006, 2007.
-#
-#
-#
+#
+#
+#
msgid ""
msgstr ""
"Project-Id-Version: libvirt\n"
if (fdServer < 0)
return(0);
-
+
ret = close(fdServer);
if (debug > 0)
fprintf(stderr, "closing unix socket %d: %d\n", fdServer, ret);
}
/*
- * Abstract socket do not hit the filesystem, way more secure and
+ * Abstract socket do not hit the filesystem, way more secure and
* garanteed to be atomic
*/
memset(&addr, 0, sizeof(addr));
if (debug)
fprintf(stderr, "wrote %d bytes to client %d on socket %d\n",
ret, nr, pollInfos[nr].fd);
-
+
return(0);
}
/**
if (debug)
fprintf(stderr, "read %d bytes from client %d on socket %d\n",
ret, nr, pollInfos[nr].fd);
-
+
if ((req->version != PROXY_PROTO_VERSION) ||
(req->len < sizeof(virProxyPacket)) ||
(req->len > sizeof(virProxyFullPacket)))
goto comm_error;
-
+
if (debug)
fprintf(stderr, "Got command %d from client %d\n", req->command, nr);
/**
* proxyProcessRequests:
*
- * process requests and timers
+ * process requests and timers
*/
static void
proxyProcessRequests(void) {
proxyCloseClientSocket(i);
}
}
-
+
}
}
* open, serve client requests, and process timing events.
*/
-static void
+static void
proxyMainLoop(void) {
while (! done) {
if (proxyListenUnixSocket(PROXY_SOCKET_PATH) < 0)
CLEANFILES= $(GENERATED) libvirt.py
else
-all:
+all:
endif
dummy:
str = str + c
if self.in_function == 1:
self.function_cond = str
-
-
+
+
def function(name, desc, ret, args, file, cond):
functions[name] = (desc, ret, args, file, cond)
if not classes_processed.has_key(tinfo[2]):
classes_list.append(tinfo[2])
classes_processed[tinfo[2]] = ()
-
+
ctypes.append(type)
ctypes_processed[type] = ()
func = nameFixup(name, "None", file, file)
info = (0, func, name, ret, args, file)
function_classes['None'].append(info)
-
+
classes = open("libvirtclass.py", "w")
txt = open("libvirtclass.txt", "w")
c_retval = virConnectNumOfDefinedDomains(conn);
if (c_retval < 0)
return VIR_PY_NONE;
-
+
if (c_retval) {
names = malloc(sizeof(*names) * c_retval);
if (!names)
c_retval = virConnectNumOfDefinedNetworks(conn);
if (c_retval < 0)
return VIR_PY_NONE;
-
+
if (c_retval) {
names = malloc(sizeof(*names) * c_retval);
if (!names)
}
py_retval = PyList_New(c_retval);
for (i = 0;i < c_retval;i++) {
- PyList_SetItem(py_retval, i,
+ PyList_SetItem(py_retval, i,
libvirt_longlongWrap((long long) freeMems[i]));
}
free(freeMems);
okay = 0
t = -1
break;
-
+
if t == 0:
break
if dom2.name() != name0:
print 'lookup of %s based on UUID brings a different domain %s' % (
name0, dom2.name())
-
+
print "OK"
sys.exit(0)
#endif
ret = PyLong_FromLong(val);
return (ret);
-}
+}
PyObject *
libvirt_longlongWrap(long long val)
# If you want to use the non-TLS socket, then you *must* include
-# the GSSAPI or DIGEST-MD5 mechanisms, because they are the only
+# the GSSAPI or DIGEST-MD5 mechanisms, because they are the only
# ones that can offer session encryption as well as authentication.
#
# If you're only using TLS, then you can turn on any mechanisms
group->name,
entry->type,
NULL,
- NULL,
+ NULL,
entry->port,
NULL)) < 0) {
- AVAHI_DEBUG("Failed to add %s service on port %d: %s",
+ AVAHI_DEBUG("Failed to add %s service on port %d: %s",
entry->type, entry->port, avahi_strerror(ret));
avahi_entry_group_reset(group->handle);
return;
/**
* Starts the mdns client, advertizing any groups/entries currently registered
- *
+ *
* @mdns: manager to start advertizing
*
* Starts the mdns client. Services may not be immediately visible, since
* @ctl: bridge control pointer
* @bridge: the bridge name
* @iface: the network interface name
- *
+ *
* Adds an interface to a bridge
*
* Returns 0 in case of success or an errno code in case of failure.
* @ctl: bridge control pointer
* @bridge: the bridge name
* @iface: the network interface name
- *
+ *
* Removes an interface from a bridge
*
* Returns 0 in case of success or an errno code in case of failure.
*
* Returns 0 in case of success or an errno code in case of failure.
*/
-
+
int
brSetForwardDelay(brControl *ctl ATTRIBUTE_UNUSED,
const char *bridge,
virBufferContentAndFree (virBufferPtr buf)
{
char *content;
-
+
if (buf == NULL)
return(NULL);
return(NULL);
if ((comm == NULL) && (name == NULL))
return(NULL);
-
+
ret = calloc(1, sizeof(*ret));
if (ret == NULL) {
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"), 0);
*
* Lookup the value associated to this entry in the configuration file
*
- * Returns a pointer to the value or NULL if the lookup failed, the data
+ * Returns a pointer to the value or NULL if the lookup failed, the data
* associated will be freed when virConfFree() is called
*/
virConfValuePtr
virConfSaveEntry(buf, cur);
cur = cur->next;
}
-
+
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR );
if (fd < 0) {
virConfError(NULL, VIR_ERR_WRITE_FAILED, _("failed to open file"), 0);
virConfSaveEntry(buf, cur);
cur = cur->next;
}
-
+
if ((int) buf->use >= *len) {
*len = buf->use;
ret = -1;
/*
- * driver.h: description of the set of interfaces provided by a
+ * driver.h: description of the set of interfaces provided by a
* entry point to the virtualization engine
*/
(*virDrvDomainGetSchedulerType) (virDomainPtr domain,
int *nparams);
-typedef int
+typedef int
(*virDrvDomainGetSchedulerParameters)
(virDomainPtr domain,
virSchedParameterPtr params,
table->size = size;
/* If the two loops are merged, there would be situations where
- * a new entry needs to allocated and data copied into it from
+ * a new entry needs to allocated and data copied into it from
* the main table. So instead, we run through the array twice, first
* copying all the elements in the main array (where we can't get
* conflicts) and then the rest, so we only free (and don't allocate)
* @network: the source network name
* @iface: the source interface name
* @physdev: the physical output device
- *
+ *
* Add a rule to the IP table context to allow the traffic for the
* network @network via interface @iface to be forwarded to
* @physdev device. This allow the outbound traffic on a bridge.
* @network: the source network name
* @iface: the source interface name
* @physdev: the physical output device
- *
+ *
* Remove a rule from the IP table context hence forbidding forwarding
* of the traffic for the network @network via interface @iface
* to the @physdev device output. This stops the outbound traffic on a bridge.
* @network: the source network name
* @iface: the output interface name
* @physdev: the physical input device or NULL
- *
+ *
* Add rules to the IP table context to allow the traffic for the
* network @network on @physdev device to be forwarded to
* interface @iface. This allow the inbound traffic on a bridge.
* @network: the source network name
* @iface: the output interface name
* @physdev: the physical input device or NULL
- *
+ *
* Remove rules from the IP table context hence forbidding the traffic for
* network @network on @physdev device to be forwarded to
* interface @iface. This stops the inbound traffic on a bridge.
* @ctx: pointer to the IP table context
* @network: the source network name
* @physdev: the physical input device or NULL
- *
+ *
* Add rules to the IP table context to allow masquerading
* network @network on @physdev. This allow the bridge to
* masquerade for that network (on @physdev).
* @ctx: pointer to the IP table context
* @network: the source network name
* @physdev: the physical input device or NULL
- *
+ *
* Remove rules from the IP table context to stop masquerading
* network @network on @physdev. This stops the bridge from
* masquerading for that network (on @physdev).
#ifdef WITH_TEST
if (testRegister() == -1) return -1;
#endif
-#ifdef WITH_QEMU
+#ifdef WITH_QEMU
if (qemudRegister() == -1) return -1;
#endif
#ifdef WITH_XEN
* Provides two information back, @libVer is the version of the library
* while @typeVer will be the version of the hypervisor type @type against
* which the library was compiled. If @type is NULL, "Xen" is assumed, if
- * @type is unknown or not availble, an error code will be returned and
+ * @type is unknown or not availble, an error code will be returned and
* @typeVer will be 0.
*
* Returns -1 in case of failure, 0 otherwise, and values for @libVer and
(res == VIR_DRV_OPEN_ERROR ? "ERROR" : "unknown status")));
if (res == VIR_DRV_OPEN_ERROR) {
if (STREQ(virNetworkDriverTab[i]->name, "remote")) {
- virLibConnWarning (NULL, VIR_WAR_NO_NETWORK,
+ virLibConnWarning (NULL, VIR_WAR_NO_NETWORK,
"Is the daemon running ?");
}
break;
* virConnectOpen:
* @name: URI of the hypervisor
*
- * This function should be called first to get a connection to the
+ * This function should be called first to get a connection to the
* Hypervisor and xen store
*
* Returns a pointer to the hypervisor connection or NULL in case of error
* virConnectOpenReadOnly:
* @name: URI of the hypervisor
*
- * This function should be called first to get a restricted connection to the
+ * This function should be called first to get a restricted connection to the
* libbrary functionalities. The set of APIs usable are then restricted
* on the available methods to control the domains.
*
* @auth: Authenticate callback parameters
* @flags: Open flags
*
- * This function should be called first to get a connection to the
+ * This function should be called first to get a connection to the
* Hypervisor. If neccessary, authentication will be performed fetching
* credentials via the callback
*
* @conn: pointer to the hypervisor connection
* @hvVer: return value for the version of the running hypervisor (OUT)
*
- * Get the version level of the Hypervisor running. This may work only with
+ * Get the version level of the Hypervisor running. This may work only with
* hypervisor call, i.e. with priviledged access to the hypervisor, not
* with a Read-Only connection.
*
* Launch a new Linux guest domain, based on an XML description similar
* to the one returned by virDomainGetXMLDesc()
* This function may requires priviledged access to the hypervisor.
- *
+ *
* Returns a new domain object or NULL in case of failure
*/
virDomainPtr
if (uuidstr == NULL) {
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
-
+
}
- /* XXX: sexpr_uuid() also supports 'xxxx-xxxx-xxxx-xxxx' format.
- * We needn't it here. Right?
+ /* XXX: sexpr_uuid() also supports 'xxxx-xxxx-xxxx-xxxx' format.
+ * We needn't it here. Right?
*/
ret = sscanf(uuidstr,
"%02x%02x%02x%02x-"
raw + 4, raw + 5, raw + 6, raw + 7,
raw + 8, raw + 9, raw + 10, raw + 11,
raw + 12, raw + 13, raw + 14, raw + 15);
-
+
if (ret!=VIR_UUID_BUFLEN) {
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
for (i = 0; i < VIR_UUID_BUFLEN; i++)
uuid[i] = raw[i] & 0xFF;
-
+
return virDomainLookupByUUID(conn, &uuid[0]);
}
* @domain: a domain object
*
* Suspends an active domain, the process is frozen without further access
- * to CPU resources and I/O but the memory used by the domain at the
+ * to CPU resources and I/O but the memory used by the domain at the
* hypervisor level will stay allocated. Use virDomainResume() to reactivate
* the domain.
* This function may requires priviledged access.
/**
* virDomainRestore:
* @conn: pointer to the hypervisor connection
- * @from: path to the
+ * @from: path to the
*
* This method will restore a domain saved to disk by virDomainSave().
*
* @domain: a domain object
* @buf: pointer to a VIR_UUID_STRING_BUFLEN bytes array
*
- * Get the UUID for a domain as string. For more information about
+ * Get the UUID for a domain as string. For more information about
* UUID see RFC4122.
*
* Returns -1 in case of error, 0 in case of success
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
-
+
if (virDomainGetUUID(domain, &uuid[0]))
return (-1);
/**
* virDomainGetMaxMemory:
* @domain: a domain object or NULL
- *
+ *
* Retrieve the maximum amount of physical memory allocated to a
* domain. If domain is NULL, then this get the amount of memory reserved
* to Domain0 i.e. the domain where the application runs.
* virDomainSetMaxMemory:
* @domain: a domain object or NULL
* @memory: the memory size in kilobytes
- *
+ *
* Dynamically change the maximum amount of physical memory allocated to a
* domain. If domain is NULL, then this change the amount of memory reserved
* to Domain0 i.e. the domain where the application runs.
* virDomainSetMemory:
* @domain: a domain object or NULL
* @memory: the memory size in kilobytes
- *
+ *
* Dynamically change the target amount of physical memory allocated to a
* domain. If domain is NULL, then this change the amount of memory reserved
* to Domain0 i.e. the domain where the application runs.
* virDomainGetInfo:
* @domain: a domain object
* @info: pointer to a virDomainInfo structure allocated by the user
- *
+ *
* Extract information about a domain. Note that if the connection
* used to get the domain is limited only a partial set of the information
* can be extracted.
* virNodeGetInfo:
* @conn: pointer to the hypervisor connection
* @info: pointer to a virNodeInfo structure allocated by the user
- *
+ *
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
/**
* virNodeGetFreeMemory:
* @conn: pointer to the hypervisor connection
- *
+ *
* provides the free memory availble on the Node
*
* Returns the available free memory in kilobytes or 0 in case of error
* Returns -1 in case of error, 0 in case of success.
*/
int
-virDomainSetSchedulerParameters(virDomainPtr domain,
+virDomainSetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr params, int nparams)
{
virConnectPtr conn;
* @maxnames: size of the array
*
* list the defined domains, stores the pointers to the names in @names
- *
+ *
* Returns the number of names provided in the array or -1 in case of error
*/
int
* underlying virtualization system (Xen...).
* If maplen < size, missing bytes are set to zero.
* If maplen > size, failure code is returned.
- *
+ *
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
* This function requires priviledged access to the hypervisor.
*
* virDomainPinVcpu() API.
* @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
- *
+ *
* Extract information about virtual CPUs of domain, store it in info array
* and also in cpumaps if this pointer is'nt NULL.
*
/**
* virDomainGetMaxVcpus:
* @domain: pointer to domain object
- *
+ *
* Provides the maximum number of virtual CPUs supported for
* the guest VM. If the guest is inactive, this is basically
* the same as virConnectGetMaxVcpus. If the guest is running
* virDomainAttachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of one device
- *
+ *
* Create a virtual device attachment to backend.
*
* Returns 0 in case of success, -1 in case of failure.
* virDomainDetachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of one device
- *
+ *
* Destroy a virtual device attachment to backend.
*
* Returns 0 in case of success, -1 in case of failure.
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Authors:
+ * Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
errmsg, info);
}
-struct openvz_vm
+struct openvz_vm
*openvzFindVMByID(const struct openvz_driver *driver, int id) {
struct openvz_vm *vm = driver->vms;
return NULL;
}
-struct openvz_vm
+struct openvz_vm
*openvzFindVMByUUID(const struct openvz_driver *driver,
const unsigned char *uuid) {
struct openvz_vm *vm = driver->vms;
return NULL;
}
-struct openvz_vm
+struct openvz_vm
*openvzFindVMByName(const struct openvz_driver *driver,
const char *name) {
struct openvz_vm *vm = driver->vms;
/* Check for various possible errors */
if ((endptr == str) /* "No digits were found" */
- ||((*endptr != '\0')
+ ||((*endptr != '\0')
&& (*endptr != ' ')) /*"Name contain characters other than integers" */ )
return 0;
return val;
}
}
-/* Free all memory associated with a openvz_vm structure
+/* Free all memory associated with a openvz_vm structure
* @checkCallee == 0 then openvzFreeDriver() is callee else some other function
*/
void
}
else
{
- openvzLog(OPENVZ_ERR, "Error already an active OPENVZ VM having id '%s'",
+ openvzLog(OPENVZ_ERR, "Error already an active OPENVZ VM having id '%s'",
def->name);
openvzFreeVMDef(def);
return NULL; /* can't redefine an active domain */
}
if (!(vm = calloc(1, sizeof(*vm)))) {
- openvzFreeVMDef(def);
+ openvzFreeVMDef(def);
error(conn, VIR_ERR_NO_MEMORY, "vm");
return NULL;
}
return vm;
}
-struct openvz_vm_def
+struct openvz_vm_def
*openvzParseVMDef(virConnectPtr conn,
const char *xmlStr, const char *displayName)
{
xmlDocPtr xml;
struct openvz_vm_def *def = NULL;
- xml = xmlReadDoc(BAD_CAST xmlStr, displayName ? displayName : "domain.xml", NULL,
+ xml = xmlReadDoc(BAD_CAST xmlStr, displayName ? displayName : "domain.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET | XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
if (!xml) {
error(conn, VIR_ERR_XML_ERROR, NULL);
* Parses a libvirt XML definition of a guest, and populates the
* the openvz_vm struct with matching data about the guests config
*/
-static struct openvz_vm_def
+static struct openvz_vm_def
*openvzParseXML(virConnectPtr conn,
xmlDocPtr xml) {
xmlNodePtr root = NULL;
error(conn, VIR_ERR_INTERNAL_ERROR,"invalid domain name");
goto bail_out;
}
-
+
/* rejecting VPS ID <= OPENVZ_RSRV_VM_LIMIT for they are reserved */
if (strtoI((const char *) obj->stringval) <= OPENVZ_RSRV_VM_LIMIT) {
- error(conn, VIR_ERR_INTERNAL_ERROR,
+ error(conn, VIR_ERR_INTERNAL_ERROR,
"VPS ID Error (must be an integer greater than 100");
goto bail_out;
}
/* Extract filesystem info */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/filesystem/template[1])", ctxt);
- if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
+ if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0)) {
error(conn, VIR_ERR_OS_TYPE, NULL);
goto bail_out;
/* Extract network */
/* Extract ipaddress */
obj = xmlXPathEval(BAD_CAST"string(/domain/container/network/ipaddress[1])", ctxt);
- if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
+ if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0)) {
- openvzLog(OPENVZ_WARN, "No IP address in the given xml config file '%s'",
+ openvzLog(OPENVZ_WARN, "No IP address in the given xml config file '%s'",
xml->name);
}
if (xmlStrlen(obj->stringval) >= (OPENVZ_IP_MAX)) {
obj = xmlXPathEval(BAD_CAST "string(/domain/container/network/netmask[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING)
|| (obj->stringval == NULL) || (obj->stringval[0] == 0))
- openvzLog(OPENVZ_WARN, "No Netmask address in the given xml config file '%s'",
+ openvzLog(OPENVZ_WARN, "No Netmask address in the given xml config file '%s'",
xml->name);
-
+
if (strlen((const char *) obj->stringval) >= (OPENVZ_IP_MAX)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
/* Extract hostname */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/network/hostname[1])", ctxt);
- if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
+ if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0))
openvzLog(OPENVZ_WARN, "No hostname in the given xml config file '%s'", xml->name);
-
+
if (strlen((const char *) obj->stringval) >= (OPENVZ_HOSTNAME_MAX - 1)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
/* Extract gateway */
obj = xmlXPathEval(BAD_CAST"string(/domain/container/network/gateway[1])", ctxt);
- if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
+ if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0))
- openvzLog(OPENVZ_WARN, "No Gateway address in the given xml config file '%s'",
+ openvzLog(OPENVZ_WARN, "No Gateway address in the given xml config file '%s'",
xml->name);
-
+
if (strlen((const char *) obj->stringval) >= (OPENVZ_IP_MAX)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
/* Extract nameserver */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/network/nameserver[1])", ctxt);
- if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
+ if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0))
- openvzLog(OPENVZ_WARN, "No Nameserver address inthe given xml config file '%s'",
+ openvzLog(OPENVZ_WARN, "No Nameserver address inthe given xml config file '%s'",
xml->name);
-
+
if (strlen((const char *) obj->stringval) >= (OPENVZ_IP_MAX)) {
char errorMessage[OPENVZ_MAX_ERROR_LEN];
/* Extract profile */
obj = xmlXPathEval(BAD_CAST "string(/domain/container/profile[1])", ctxt);
- if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
+ if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL)
|| (obj->stringval[0] == 0)) {
error(conn, VIR_ERR_INTERNAL_ERROR, NULL);
goto bail_out;
driver = conn->privateData;
driver->num_active = 0;
driver->num_inactive = 0;
-
+
if((fp = popen(VZLIST " -a -ovpsid,status -H 2>/dev/null", "r")) == NULL) {
error(conn, VIR_ERR_INTERNAL_ERROR, "popen failed");
return NULL;
}
- pnext = &vm;
- while(!feof(fp)) {
+ pnext = &vm;
+ while(!feof(fp)) {
*pnext = calloc(1, sizeof(**pnext));
if(!*pnext) {
error(conn, VIR_ERR_INTERNAL_ERROR, "calloc failed");
goto error;
}
-
+
if(!vm)
vm = *pnext;
free(*pnext);
goto error;
}
- if(strcmp(status, "stopped")) {
+ if(strcmp(status, "stopped")) {
(*pnext)->status = VIR_DOMAIN_RUNNING;
driver->num_active ++;
(*pnext)->vpsid = veid;
* inactive domains don't have their ID set in libvirt,
* thought this doesn't make sense for OpenVZ
*/
- (*pnext)->vpsid = -1;
+ (*pnext)->vpsid = -1;
}
vmdef = calloc(1, sizeof(*vmdef));
free(*pnext);
goto error;
}
-
+
snprintf(vmdef->name, OPENVZ_NAME_MAX, "%i", veid);
openvzGetVPSUUID(veid, uuidstr);
ret = virUUIDParse(uuidstr, vmdef->uuid);
return NULL;
}
-static char
+static char
*openvzLocateConfDir(void)
{
const char *conf_dir_list[] = {"/etc/vz/conf", "/usr/local/etc/conf", NULL};
}
/* Richard Steven's classic readline() function */
-int
+int
openvz_readline(int fd, char *ptr, int maxlen)
{
int n, rc;
return n;
}
-static int
+static int
openvzGetVPSUUID(int vpsid, char *uuidstr)
{
char conf_file[PATH_MAX];
* assign if not present.
*/
-static int
+static int
openvzSetUUID(int vpsid)
{
char conf_file[PATH_MAX];
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Authors:
+ * Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
}
int openvz_readline(int fd, char *ptr, int maxlen);
-struct openvz_vm *openvzFindVMByID(const struct openvz_driver *driver, int id);
-struct openvz_vm *openvzFindVMByUUID(const struct openvz_driver *driver,
+struct openvz_vm *openvzFindVMByID(const struct openvz_driver *driver, int id);
+struct openvz_vm *openvzFindVMByUUID(const struct openvz_driver *driver,
const unsigned char *uuid);
struct openvz_vm *openvzFindVMByName(const struct openvz_driver *driver, const char *name);
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Authors:
+ * Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
static int openvzActive(void);
static virDomainPtr openvzDomainDefineXML(virConnectPtr conn, const char *xml);
-static virDomainPtr openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
+static virDomainPtr openvzDomainCreateLinux(virConnectPtr conn, const char *xml,
unsigned int flags ATTRIBUTE_UNUSED);
static int openvzDomainUndefine(virDomainPtr dom);
info->state = vm->status;
/* TODO These need to be calculated differently for OpenVZ */
- //info->cpuTime =
+ //info->cpuTime =
//info->maxMem = vm->def->maxmem;
//info->memory = vm->def->memory;
//info->nrVirtCpu = vm->def->vcpus;
error(dom->conn, VIR_ERR_INVALID_DOMAIN, "no domain with matching id");
return -1;
}
-
+
if (vm->status != VIR_DOMAIN_RUNNING) {
error(dom->conn, VIR_ERR_OPERATION_DENIED, "domain is not in running state");
return -1;
}
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " stop %d ", dom->id);
-
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out;
- }
-
+ }
+
ret = virExec(dom->conn, (char **)cmdExec, &pid, -1, &outfd, &errfd);
if(ret == -1) {
error(dom->conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
-
+
vm->vpsid = -1;
vm->status = VIR_DOMAIN_SHUTOFF;
ovz_driver.num_inactive ++;
ovz_driver.num_active --;
-
+
bail_out:
cmdExecFree(cmdExec);
error(dom->conn, VIR_ERR_INVALID_DOMAIN, "no domain with matching id");
return -1;
}
-
+
if (vm->status != VIR_DOMAIN_RUNNING) {
error(dom->conn, VIR_ERR_OPERATION_DENIED, "domain is not in running state");
return -1;
}
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " restart %d ", dom->id);
-
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out1;
error(dom->conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
-
-bail_out1:
+
+bail_out1:
cmdExecFree(cmdExec);
-
+
return ret;
}
vm = openvzFindVMByID(driver, strtoI(vmdef->name));
if (vm) {
- openvzLog(OPENVZ_ERR, "Already an OPENVZ VM active with the id '%s'",
+ openvzLog(OPENVZ_ERR, "Already an OPENVZ VM active with the id '%s'",
vmdef->name);
goto bail_out2;
}
strcat(cmdbuf, cmdOption);
}
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out2;
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
goto bail_out2;
}
-
+
waitpid(pid, NULL, 0);
cmdExecFree(cmdExec);
-
+
dom = virGetDomain(conn, vm->vmdef->name, vm->vmdef->uuid);
if (dom)
dom->id = vm->vpsid;
vm = openvzFindVMByID(driver, strtoI(vmdef->name));
if (vm) {
openvzFreeVMDef(vmdef);
- openvzLog(OPENVZ_ERR, "Already an OPENVZ VM defined with the id '%d'",
+ openvzLog(OPENVZ_ERR, "Already an OPENVZ VM defined with the id '%d'",
strtoI(vmdef->name));
return NULL;
}
strcat(cmdbuf, cmdOption);
}
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out3;
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return NULL;
}
-
+
waitpid(pid, NULL, 0);
cmdExecFree(cmdExec);
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " start %s ", vmdef->name);
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out3;
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return NULL;
}
-
+
sscanf(vmdef->name, "%d", &vm->vpsid);
vm->status = VIR_DOMAIN_RUNNING;
ovz_driver.num_inactive--;
dom->id = vm->vpsid;
return dom;
bail_out3:
- cmdExecFree(cmdExec);
+ cmdExecFree(cmdExec);
return NULL;
}
error(dom->conn, VIR_ERR_INVALID_DOMAIN, "no domain with matching id");
return -1;
}
-
+
if (vm->status != VIR_DOMAIN_SHUTOFF) {
error(dom->conn, VIR_ERR_OPERATION_DENIED, "domain is not in shutoff state");
return -1;
vmdef = vm->vmdef;
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " start %s ", vmdef->name);
-
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out4;
error(dom->conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
-
- sscanf(vmdef->name, "%d", &vm->vpsid);
+
+ sscanf(vmdef->name, "%d", &vm->vpsid);
vm->status = VIR_DOMAIN_RUNNING;
ovz_driver.num_inactive --;
ovz_driver.num_active ++;
-
+
waitpid(pid, NULL, 0);
-bail_out4:
+bail_out4:
cmdExecFree(cmdExec);
return ret;
return -1;
}
snprintf(cmdbuf, CMDBUF_LEN - 1, VZCTL " destroy %s ", vm->vmdef->name);
-
- if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
+
+ if((ret = convCmdbufExec(cmdbuf, cmdExec)) == -1)
{
openvzLog(OPENVZ_ERR, "Error in parsing Options to OPENVZ");
goto bail_out5;
error(conn, VIR_ERR_INTERNAL_ERROR, "Could not exec " VZLIST);
return -1;
}
-
+
waitpid(pid, NULL, 0);
openvzRemoveInactiveVM(driver, vm);
-bail_out5:
+bail_out5:
cmdExecFree(cmdExec);
return ret;
}
};
static int openvzClose(virConnectPtr conn) {
-
+
struct openvz_driver *driver = (struct openvz_driver *)conn->privateData;
struct openvz_vm *vm = driver->vms;
vm = vm->next;
free(prev);
}
-
+
conn->privateData = NULL;
return 0;
}
static int openvzNumDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED) {
- return ovz_driver.num_inactive;
+ return ovz_driver.num_inactive;
}
static int openvzStartup(void) {
openvzAssignUUIDs();
-
+
return 0;
}
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Authors:
+ * Authors:
* Shuveb Hussain <shuveb@binarykarma.com>
* Anoop Joe Cyriac <anoop@binarykarma.com>
*
* virProxyFindServerPath:
*
* Tries to find the path to the gam_server binary.
- *
+ *
* Returns path on success or NULL in case of error.
*/
static const char *
}
/*
- * Abstract socket do not hit the filesystem, way more secure and
+ * Abstract socket do not hit the filesystem, way more secure and
* garanteed to be atomic
*/
memset(&addr, 0, sizeof(addr));
/**
* virProxyReadClientSocket:
- * @fd: the socket
+ * @fd: the socket
* @buffer: the target memory area
* @len: the lenght in bytes
* @quiet: quiet access
/**
* virProxyWriteClientSocket:
- * @fd: the socket
+ * @fd: the socket
* @data: the data
* @len: the lenght of data in bytes
*
return 0;
}
-static int
+static int
xenProxyCommand(virConnectPtr conn, virProxyPacketPtr request,
virProxyFullPacketPtr answer, int quiet) {
static int serial = 0;
int ret;
int fd;
xenUnifiedPrivatePtr priv;
-
+
if (!(flags & VIR_CONNECT_RO))
return(-1);
* xenProxyNodeGetInfo:
* @conn: pointer to the Xen Daemon block
* @info: pointer to a virNodeInfo structure allocated by the user
- *
+ *
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
/**
* xenProxyGetCapabilities:
* @conn: pointer to the Xen Daemon block
- *
+ *
* Extract capabilities of the hypervisor.
*
* Returns capabilities in case of success (freed by caller)
*
* This method generates an XML description of a domain.
*
- * Returns the XML document on success, NULL otherwise.
+ * Returns the XML document on success, NULL otherwise.
*/
char *
xenProxyDomainDumpXML(virDomainPtr domain, int flags ATTRIBUTE_UNUSED)
typedef virProxyPacket *virProxyPacketPtr;
/*
- * If there is extra data sent from the proxy to the client,
+ * If there is extra data sent from the proxy to the client,
* they are appended after the packet.
* the size may not be fixed, it's passed as len and includes the
* extra data.
# The default TLS configuration only uses certificates for the server
# allowing the client to verify the server's identity and establish
-# and encrypted channel.
+# and encrypted channel.
#
# It is possible to use x509 certificates for authentication too, by
# issuing a x509 certificate to every client who needs to connect.
-#
+#
# Enabling this option will reject any client who does not have a
# certificate signed by the CA in /etc/pki/libvirt-vnc/ca-cert.pem
#
};
/* The archicture tables for supported QEMU archs */
-const struct qemu_arch_info const qemudArchs[] = {
+const struct qemu_arch_info const qemudArchs[] = {
/* i686 must be in position 0 */
{ "i686", 32, arch_info_x86_machines, "qemu", arch_info_i686_flags },
/* x86_64 must be in position 1 */
}
device = xmlGetProp(node, BAD_CAST "device");
-
+
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if ((source == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "source"))) {
-
+
if (typ == QEMUD_DISK_FILE)
source = xmlGetProp(cur, BAD_CAST "file");
else
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "Invalid floppy device name: %s", target);
goto error;
}
-
+
if (device &&
!strcmp((const char *)device, "cdrom") &&
strcmp((const char *)target, "hdc")) {
}
closedir(dir);
-
+
return 0;
}
qemudRemoveInactiveVM(qemu_driver, vm);
vm = next;
}
-
+
/* free inactive VMs */
vm = qemu_driver->vms;
while (vm) {
qemudShutdownNetworkDaemon(NULL, qemu_driver, network);
network = next;
}
-
+
/* free inactive networks */
network = qemu_driver->networks;
while (network) {
} else { /* root */
if (STRNEQ (uri->path, "/system") &&
STRNEQ (uri->path, "/session"))
- goto decline;
+ goto decline;
}
conn->privateData = qemu_driver;
return VIR_DRV_OPEN_SUCCESS;
decline:
- return VIR_DRV_OPEN_DECLINED;
+ return VIR_DRV_OPEN_DECLINED;
}
static int qemudClose(virConnectPtr conn) {
if (header.version > QEMUD_SAVE_VERSION) {
qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
- "image version is not supported (%d > %d)",
+ "image version is not supported (%d > %d)",
header.version, QEMUD_SAVE_VERSION);
close(fd);
return -1;
* remoteFindServerPath:
*
* Tries to find the path to the libvirtd binary.
- *
+ *
* Returns path on success or NULL in case of error.
*/
static const char *
if (flags & VIR_DRV_OPEN_REMOTE_USER) {
struct passwd *pw;
uid_t uid = getuid();
-
+
if (!(pw = getpwuid(uid))) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (errno));
goto failed;
}
-
+
if (asprintf (&sockname, "@%s" LIBVIRTD_USER_UNIX_SOCKET, pw->pw_dir) < 0) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (errno));
goto failed;
int err;
gnutls_session_t session;
- /* Initialize TLS session
+ /* Initialize TLS session
*/
err = gnutls_init (&session, GNUTLS_CLIENT);
if (err) {
error (conn, VIR_ERR_GNUTLS_ERROR, gnutls_strerror (ret));
return -1;
}
-
+
if ((now = time(NULL)) == ((time_t)-1)) {
error (conn, VIR_ERR_SYSTEM_ERROR, strerror (errno));
return -1;
if (status & GNUTLS_CERT_INVALID)
reason = "The certificate is not trusted.";
-
+
if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
reason = "The certificate hasn't got a known issuer.";
-
+
if (status & GNUTLS_CERT_REVOKED)
reason = "The certificate has been revoked.";
if (status & GNUTLS_CERT_INSECURE_ALGORITHM)
reason = "The certificate uses an insecure algorithm";
#endif
-
+
error (conn, VIR_ERR_RPC, reason);
return -1;
}
error (conn, VIR_ERR_RPC, _("Certificate type is not X.509"));
return -1;
}
-
+
if (!(certs = gnutls_certificate_get_peers(session, &nCerts))) {
error (conn, VIR_ERR_RPC, _("gnutls_certificate_get_peers failed"));
return -1;
}
-
+
for (i = 0 ; i < nCerts ; i++) {
gnutls_x509_crt_t cert;
error (conn, VIR_ERR_GNUTLS_ERROR, gnutls_strerror (ret));
return -1;
}
-
+
ret = gnutls_x509_crt_import (cert, &certs[i], GNUTLS_X509_FMT_DER);
if (ret < 0) {
error (conn, VIR_ERR_GNUTLS_ERROR, gnutls_strerror (ret));
gnutls_x509_crt_deinit (cert);
return -1;
}
-
+
if (gnutls_x509_crt_get_expiration_time (cert) < now) {
error (conn, VIR_ERR_RPC, _("The certificate has expired"));
gnutls_x509_crt_deinit (cert);
return -1;
}
-
+
if (gnutls_x509_crt_get_activation_time (cert) > now) {
error (conn, VIR_ERR_RPC, _("The certificate is not yet activated"));
gnutls_x509_crt_deinit (cert);
return -1;
}
-
+
if (i == 0) {
if (!gnutls_x509_crt_check_hostname (cert, priv->hostname)) {
__virRaiseError
* NB, even if the key was found sexpr_lookup may return NULL if
* the corresponding value was empty
*
- * Returns true if the key was found, false otherwise
+ * Returns true if the key was found, false otherwise
*/
int
sexpr_has(struct sexpr *sexpr, const char *node)
#define virLog(msg...) fprintf(stderr, msg)
-static void
+static void
ReportError(virConnectPtr conn,
virDomainPtr dom,
virNetworkPtr net,
close(pipeout[1]);
if(non_block)
if(virSetNonBlock(pipeout[0]) == -1)
- ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set non-blocking file descriptor flag");
if(virSetCloseExec(pipeout[0]) == -1)
- ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set close-on-exec file descriptor flag");
*outfd = pipeout[0];
}
close(pipeerr[1]);
if(non_block)
if(virSetNonBlock(pipeerr[0]) == -1)
- ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set non-blocking file descriptor flag");
if(virSetCloseExec(pipeerr[0]) == -1)
- ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set close-on-exec file descriptor flag");
*errfd = pipeerr[0];
}
int saferead(int fd, void *buf, size_t count)
{
size_t nread = 0;
- while (count > 0) {
+ while (count > 0) {
int r = read(fd, buf, count);
if (r < 0 && errno == EINTR)
continue;
strncpy(params[inputparams].field,str_weight,sizeof(str_weight));
params[inputparams].type = VIR_DOMAIN_SCHED_FIELD_UINT;
params[inputparams].value.ui = weight;
- inputparams++;
+ inputparams++;
}
if (capfound) {
/**
* virResetError:
* @err: pointer to the virError to clean up
- *
+ *
* Reset the error being pointed to
*/
void
/**
* virResetLastError:
- *
+ *
* Reset the last error caught at the library level.
*/
void
return -1;
}
}
-
+
return 0;
}
if (maplen < 8) {
new = calloc(1, sizeof(uint64_t));
if (!new) {
- virXenErrorFunc(NULL, VIR_ERR_NO_MEMORY, __FUNCTION__,
+ virXenErrorFunc(NULL, VIR_ERR_NO_MEMORY, __FUNCTION__,
"allocating private data", 0);
return (-1);
}
if (kb_per_pages == 0) {
kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
- if (kb_per_pages <= 0)
+ if (kb_per_pages <= 0)
kb_per_pages = 4;
}
if (kb_per_pages == 0) {
kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
- if (kb_per_pages <= 0)
+ if (kb_per_pages <= 0)
kb_per_pages = 4;
}
* xenHypervisorNodeGetCellsFreeMemory:
* @conn: pointer to the hypervisor connection
* @freeMems: pointer to the array of unsigned long long
- * @startCell: index of first cell to return freeMems info on.
- * @maxCells: Maximum number of cells for which freeMems information can
+ * @startCell: index of first cell to return freeMems info on.
+ * @maxCells: Maximum number of cells for which freeMems information can
* be returned.
*
* This call returns the amount of free memory in one or more NUMA cells.
* The @freeMems array must be allocated by the caller and will be filled
- * with the amount of free memory in kilobytes for each cell requested,
- * starting with startCell (in freeMems[0]), up to either
- * (startCell + maxCells), or the number of additional cells in the node,
+ * with the amount of free memory in kilobytes for each cell requested,
+ * starting with startCell (in freeMems[0]), up to either
+ * (startCell + maxCells), or the number of additional cells in the node,
* whichever is smaller.
*
* Returns the number of entries filled in freeMems, or -1 in case of error.
int i, j, ret;
xenUnifiedPrivatePtr priv;
int nbNodeCells;
-
+
if (conn == NULL) {
virXenErrorFunc (conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
"invalid argument", 0);
/*
* Helper functions currently used in the NUMA code
- * Those variables should not be accessed directly but through helper
- * functions xenNbCells() and xenNbCpu() available to all Xen backends
+ * Those variables should not be accessed directly but through helper
+ * functions xenNbCells() and xenNbCpu() available to all Xen backends
*/
static int nbNodeCells = -1;
static int nbNodeCpus = -1;
cpulist[m] = 1;
nb++;
/* if all CPU are used just return NULL */
- if (nb == nb_cpu)
+ if (nb == nb_cpu)
goto done;
-
+
}
}
}
}
if (priv->opened[XEN_UNIFIED_PROXY_OFFSET])
return xenProxyDomainDumpXML(dom, flags);
- }
+ }
xenUnifiedError (dom->conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
return NULL;
if (priv->opened[i] && drivers[i]->domainGetSchedulerType) {
schedulertype = drivers[i]->domainGetSchedulerType (dom, nparams);
if (schedulertype != NULL)
- return(schedulertype);
+ return(schedulertype);
}
}
return(NULL);
GET_PRIVATE (conn);
if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET])
- return xenHypervisorNodeGetCellsFreeMemory (conn, freeMems,
+ return xenHypervisorNodeGetCellsFreeMemory (conn, freeMems,
startCell, maxCells);
xenUnifiedError (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
GET_PRIVATE (conn);
if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET]) {
- ret = xenHypervisorNodeGetCellsFreeMemory (conn, &freeMem,
+ ret = xenHypervisorNodeGetCellsFreeMemory (conn, &freeMem,
-1, 1);
if (ret != 1)
return (0);
* xenDaemonOpen_tcp:
* @conn: an existing virtual connection block
* @host: the host name for the Xen Daemon
- * @port: the port
+ * @port: the port
*
* Creates a possibly remote Xen Daemon connection
* Note: this doesn't try to check if the connection actually works
root = sexpr_get(conn, "/xend/node/");
if (root == NULL)
return (-1);
-
+
value = sexpr_node(root, "node/xend_config_format");
-
+
if (value) {
priv->xendConfigVersion = strtol(value, NULL, 10);
} else {
* @xend: the xend connection object
* @node: the root of the parsed S-Expression
* @buf: output buffer object
- * @hvm: true or 1 if no contains HVM S-Expression
+ * @hvm: true or 1 if no contains HVM S-Expression
* @bootloader: true or 1 if a bootloader is defined
*
* Parse the xend sexp for description of os and append it to buf.
if (node == NULL || buf == NULL) {
return(-1);
}
-
+
virBufferAddLit(buf, " <os>\n");
if (hvm)
virBufferAddLit(buf, " <type>hvm</type>\n");
if ((cur_mem >= MIN_XEN_GUEST_SIZE) && (cur_mem != max_mem))
virBufferVSprintf(&buf, " <currentMemory>%d</currentMemory>\n",
cur_mem);
-
+
virBufferVSprintf(&buf, " <vcpu");
if (cpus != NULL) {
virBufferVSprintf(&buf, " cpuset='%s'", cpus);
*
* Returns 0 in case of success, -1 in case of error
*/
-static int
+static int
sexpr_to_xend_topology_xml(virConnectPtr conn, const struct sexpr *root,
virBufferPtr xml)
{
</topology>\n");
if (r < 0) goto vir_buffer_failed;
return (0);
-
+
vir_buffer_failed:
virXendError(conn, VIR_ERR_NO_MEMORY, _("allocate new buffer"));
-
+
error:
return (-1);
}
__FUNCTION__);
return(-1);
}
-
+
/* We can't save the state of Domain-0, that would mean stopping it too */
if (domain->id == 0) {
* xenDaemonNodeGetInfo:
* @conn: pointer to the Xen Daemon block
* @info: pointer to a virNodeInfo structure allocated by the user
- *
+ *
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
struct sexpr *root;
int major, minor;
unsigned long version;
-
+
if (!VIR_IS_CONNECT(conn)) {
virXendError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
* @vcpu: virtual CPU number
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes)
* @maplen: length of cpumap in bytes
- *
+ *
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
*
* Returns 0 for success; -1 (with errno) on error
* One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.
* @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
- *
+ *
* Extract information about virtual CPUs of domain, store it in info array
* and also in cpumaps if this pointer is'nt NULL.
*
* Launch a new Linux guest domain, based on an XML description similar
* to the one returned by virDomainGetXMLDesc()
* This function may requires priviledged access to the hypervisor.
- *
+ *
* Returns a new domain object or NULL in case of failure
*/
static virDomainPtr
* xenDaemonAttachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of device
- *
+ *
* Create a virtual device attachment to backend.
* XML description is translated into S-expression.
*
/* device doesn't exist, define it */
ret = xend_op(domain->conn, domain->name, "op", "device_create",
"config", conf, NULL);
- }
+ }
else {
/* device exists, attempt to modify it */
- ret = xend_op(domain->conn, domain->name, "op", "device_configure",
+ ret = xend_op(domain->conn, domain->name, "op", "device_configure",
"config", conf, "dev", ref, NULL);
}
free(sexpr);
* xenDaemonDetachDevice:
* @domain: pointer to domain object
* @xml: pointer to XML description of device
- *
+ *
* Destroy a virtual device attachment to backend.
*
* Returns 0 in case of success, -1 in case of failure.
* \param host The host name to connect to
* \param port The port number to connect to
* \return 0 in case of success, -1 in case of error
- *
+ *
* This method creates a new Xend instance via TCP.
*
* This function may not fail if Xend is not running.
* \brief Setup the connection to xend instance via a Unix domain socket
* \param path The path to the domain socket
* \return 0 in case of success, -1 in case of error
- *
+ *
* This method creates a new xend instance via a Unix domain socket.
*
* This function may not fail if Xend is not running.
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
- *
+ *
* xen_create() returns after a domain has been allocated including
* its memory. This does not guarentee, though, that the devices
* have come up properly. For instance, if you create a VBD with an
xenXMError(conn, VIR_ERR_INTERNAL_ERROR, "uuid config parameter is missing");
goto error;
}
-
+
if (!(olddomain = virGetDomain(conn, value->str, uuid)))
goto error;
* virParseXenCpuTopology:
* @conn: connection
* @xml: XML output buffer
- * @str: the topology string
+ * @str: the topology string
* @maxcpu: number of elements available in @cpuset
*
* Parse a Xend CPU topology string and build the associated XML
virXMLError(conn, VIR_ERR_NO_MEMORY, _("allocate buffer"), 0);
return(NULL);
}
-
+
ret = virParseCpuSet(conn, &cur, 0, cpuset, maxcpu);
if (ret < 0) {
free(cpuset);
return -1;
}
- /*
+ /*
* Originally XenD abused the 'kernel' parameter for the HVM
* firmware. New XenD allows HVM guests to boot from a kernel
* and if this is enabled, the HVM firmware must use the new
}
cur = cur->next;
}
-
+
virBufferVSprintf(buf, "(kernel '%s')", (const char *) kernel);
if (initrd != NULL)
}
}
free(cpuset);
- if (res < 0)
+ if (res < 0)
goto error;
} else {
virXMLError(conn, VIR_ERR_NO_MEMORY, xmldesc, 0);
static xmlRpcValuePtr xmlRpcValueNew(xmlRpcValueType type)
{
xmlRpcValuePtr ret = malloc(sizeof(*ret));
-
+
if (!ret)
xmlRpcError(VIR_ERR_NO_MEMORY, _("allocate value"), sizeof(*ret));
else
static xmlRpcValuePtr xmlRpcValueUnmarshalString(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_STRING);
-
+
if (ret)
ret->value.string = xmlGetText(node);
return ret;
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_INTEGER);
char *value = xmlGetText(node);
-
+
if (ret && value)
ret->value.integer = atoi(value);
free(value);
if (!ret)
return NULL;
-
+
ret->value.dict.root = root;
-
+
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur)) {
*elem = xmlRpcValueUnmarshalDictElement(cur);
if (*elem==NULL) {
xmlRpcValueFree(ret);
return NULL;
- }
+ }
elem = &(*elem)->next;
}
TODO
break;
case XML_RPC_STRING:
- virBufferStrcat(buf,
+ virBufferStrcat(buf,
"<string>", value->value.string, "</string>", NULL);
break;
case XML_RPC_NIL:
" <methodName>", request, "</methodName>\n"
" <params>\n", NULL);
for (i = 0; i < argc; i++) {
- virBufferStrcat(buf,
+ virBufferStrcat(buf,
" <param>\n", NULL);
xmlRpcValueMarshal(argv[i], buf, 6);
- virBufferStrcat(buf,
+ virBufferStrcat(buf,
" </param>\n", NULL);
}
virBufferStrcat(buf,
xmlRpcValuePtr *argv;
const char *ptr;
int i;
-
+
*argc = strlen(fmt);
if (!(argv = malloc(sizeof(*argv) * *argc))) {
xmlRpcError(VIR_ERR_NO_MEMORY, _("read response"), sizeof(*argv) * *argc);
void *retval = NULL;
va_start(ap, fmt);
-
+
if (retfmt && *retfmt)
retval = va_arg(ap, void *);
-
+
if (!(argv = xmlRpcArgvNew(fmt, ap, &argc)))
return -1;
-
+
va_end(ap);
buf = xmlRpcMarshalRequest(method, argc, argv);
xmlRpcArgvFree(argc, argv);
-
+
if (!buf)
return -1;
-
+
ret = xmlRpcCallRaw(context->uri, buf->content);
virBufferFree(buf);
xmlFreeDoc(xml);
- if (fault) {
+ if (fault) {
/* FIXME we need generic dict routines */
/* FIXME we need faultMessage propagate to libvirt error API */
context->faultCode = value->value.dict.root->value->value.integer;
#include <stdint.h>
-#include <xen/dom0_ops.h>
+#include <xen/dom0_ops.h>
#include <xen/version.h>
#include <xen/xen.h>
* @vm: the xenstore vm path
* @name: the value's path
*
- * Internal API extracting one information the device used
+ * Internal API extracting one information the device used
* by the domain from xensttore
*
* Returns the new string or NULL in case of error
* remote) mechanism.
*/
if (getuid() == 0) {
- virXenStoreError(NULL, VIR_ERR_NO_XEN,
+ virXenStoreError(NULL, VIR_ERR_NO_XEN,
_("failed to connect to Xen Store"));
}
return (-1);
if (domain->id == -1 || domain->id == 0)
return(-1);
/*
- * this is very hackish, the domU kernel probes for a special
+ * this is very hackish, the domU kernel probes for a special
* node in the xenstore and launch the shutdown command if found.
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "halt"));
if (domain->id == -1 || domain->id == 0)
return(-1);
/*
- * this is very hackish, the domU kernel probes for a special
+ * this is very hackish, the domU kernel probes for a special
* node in the xenstore and launch the shutdown command if found.
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "reboot"));
* @domid: id of the domain
*
* Return the port number on which the domain is listening for VNC
- * connections.
+ * connections.
*
* Returns the port number, -1 in case of error
*/
virConnectClose(conn);
printf("OK\n");
exit(0);
-
+
}
./conftest $f > conftest.$$
outfile=`echo "$f" | sed s+\.conf$+\.out+`
diff $outfile conftest.$$ > /dev/null
- if [ $? != 0 ]
+ if [ $? != 0 ]
then
if [ -n "$DEBUG_TESTS" ]; then
diff -u $outfile conftest.$$
extern "C" {
#endif
-
+
double virtTestCountAverage(double *items,
int nitems);
buffer[PATH_MAX-1] = '\0';
progname = argv[0];
custom_uri = buffer;
-
+
if (argc > 1) {
- fprintf(stderr, "Usage: %s\n", progname);
+ fprintf(stderr, "Usage: %s\n", progname);
exit(EXIT_FAILURE);
}
-
+
if (virtTestRun("virsh list (default)",
1, testCompareListDefault, NULL) != 0)
ret = -1;
fprintf(stderr, "missing enviroment variable abs_top_srcdir\n");
exit(EXIT_FAILURE);
}
-
+
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", progname);
{
int retval = 0;
xmlRpcContextPtr cxt = (xmlRpcContextPtr) data;
-
- if (xmlRpcCall(cxt, "plus", "i", "ii",
+
+ if (xmlRpcCall(cxt, "plus", "i", "ii",
(const char *) &retval, 10, 10) < 0)
return -1;
-
- return retval==(10+10) ? 0 : -1;
+
+ return retval==(10+10) ? 0 : -1;
}
static int
{
double retval = 0;
xmlRpcContextPtr cxt = (xmlRpcContextPtr) data;
-
- if (xmlRpcCall(cxt, "plus", "f", "ff",
+
+ if (xmlRpcCall(cxt, "plus", "f", "ff",
(const char *) &retval, 10.1234, 10.1234) < 0)
return -1;
-
- return retval==(10.1234+10.1234) ? 0 : -1;
+
+ return retval==(10.1234+10.1234) ? 0 : -1;
}
static virBufferPtr
xmlRpcValuePtr *argv;
virBufferPtr buf;
va_list ap;
-
+
va_start(ap, fmt);
argv = xmlRpcArgvNew(fmt, ap, &argc);
va_end(ap);
-
+
buf = xmlRpcMarshalRequest("test", argc, argv);
xmlRpcArgvFree(argc, argv);
xmlXPathContextPtr ctxt = NULL;
xmlXPathObjectPtr obj = NULL;
int ret = -1;
-
+
xml = xmlReadDoc((const xmlChar *) xmlstr, "xmlrpctest.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
if (!xml)
goto error;
-
+
if (!(ctxt = xmlXPathNewContext(xml)))
goto error;
-
+
if (!(obj = xmlXPathEval(BAD_CAST xpath, ctxt)))
goto error;
switch(type) {
case XML_RPC_INTEGER:
- if ((obj->type != XPATH_NUMBER) ||
+ if ((obj->type != XPATH_NUMBER) ||
((int) obj->floatval != *((int *)expected)))
goto error;
break;
case XML_RPC_DOUBLE:
- if ((obj->type != XPATH_NUMBER) ||
+ if ((obj->type != XPATH_NUMBER) ||
((double) obj->floatval != *((double *)expected)))
goto error;
break;
case XML_RPC_STRING:
- if ((obj->type != XPATH_STRING) ||
+ if ((obj->type != XPATH_STRING) ||
(strcmp((const char *)obj->stringval, (const char *)expected)))
goto error;
break;
}
ret = 0;
-error:
+error:
if (obj)
xmlXPathFreeObject(obj);
xmlXPathFreeContext(ctxt);
virBufferPtr buf = marshalRequest("i", num);
if (check)
- ret = checkRequestValue(buf->content,
+ ret = checkRequestValue(buf->content,
"number(/methodCall/params/param[1]/value/int)",
XML_RPC_INTEGER, (void *) &num);
-
+
virBufferFree(buf);
return ret;
}
int check = data ? *((int *)data) : 0;
virBufferPtr buf = marshalRequest("s", str);
- if (check)
- ret = checkRequestValue(buf->content,
+ if (check)
+ ret = checkRequestValue(buf->content,
"string(/methodCall/params/param[1]/value/string)",
XML_RPC_STRING, (void *) str);
virBufferFree(buf);
virBufferPtr buf = marshalRequest("f", num);
if (check)
- ret = checkRequestValue(buf->content,
+ ret = checkRequestValue(buf->content,
"number(/methodCall/params/param[1]/value/double)",
XML_RPC_DOUBLE, (void *) &num);
-
+
virBufferFree(buf);
return ret;
}
{
virBufferPtr buf = virBufferNew(1000*32); /* don't waste time with realloc */
int i;
-
+
for (i=0; i < 1000; i++)
virBufferStrcat(buf, "My name is ", "libvirt", ".\n", NULL);
{
virBufferPtr buf = virBufferNew(1000*32); /* don't waste time with realloc */
int i;
-
+
for (i=0; i < 1000; i++)
virBufferVSprintf(buf, "My name is %s.\n", "libvirt");
if (argc > 2)
{
- fprintf(stderr, "Usage: %s [url]\n", progname);
+ fprintf(stderr, "Usage: %s [url]\n", progname);
exit(EXIT_FAILURE);
}
if (argc == 2)
url = argv[1];
-
- /*
- * client-server tests
+
+ /*
+ * client-server tests
*/
if (!(cxt = xmlRpcContextNew(url)))
{
exit(EXIT_FAILURE);
}
- if (virtTestRun("XML-RPC methodCall INT+INT",
+ if (virtTestRun("XML-RPC methodCall INT+INT",
NLOOPS, testMethodPlusINT, (const void *) cxt) != 0)
ret = -1;
-
- if (virtTestRun("XML-RPC methodCall DOUBLE+DOUBLE",
+
+ if (virtTestRun("XML-RPC methodCall DOUBLE+DOUBLE",
NLOOPS, testMethodPlusDOUBLE, (const void *) cxt) != 0)
ret = -1;
-
+
xmlRpcContextFree(cxt);
-
- /*
- * regression / performance tests
+
+ /*
+ * regression / performance tests
*/
- if (virtTestRun("XML-RPC request marshalling: INT (check)",
+ if (virtTestRun("XML-RPC request marshalling: INT (check)",
1, testMarshalRequestINT, (const void *) &check) != 0)
ret = -1;
- if (virtTestRun("XML-RPC request marshalling: INT",
+ if (virtTestRun("XML-RPC request marshalling: INT",
NLOOPS, testMarshalRequestINT, NULL) != 0)
ret = -1;
-
- if (virtTestRun("XML-RPC request marshalling: DOUBLE (check)",
+
+ if (virtTestRun("XML-RPC request marshalling: DOUBLE (check)",
1, testMarshalRequestDOUBLE, (const void *) &check) != 0)
ret = -1;
- if (virtTestRun("XML-RPC request marshalling: DOUBLE",
+ if (virtTestRun("XML-RPC request marshalling: DOUBLE",
NLOOPS, testMarshalRequestDOUBLE, NULL) != 0)
ret = -1;
- if (virtTestRun("XML-RPC request marshalling: STRING (check)",
+ if (virtTestRun("XML-RPC request marshalling: STRING (check)",
1, testMarshalRequestSTRING, (void *) &check) != 0)
ret = -1;
- if (virtTestRun("XML-RPC request marshalling: STRING",
+ if (virtTestRun("XML-RPC request marshalling: STRING",
NLOOPS, testMarshalRequestSTRING, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("Buffer: sprintf", NLOOPS, testBufferVSprintf, NULL) != 0)
ret = -1;
-
+
exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
quit this interactive terminal
.IP "\fBversion\fR" 4
.IX Item "version"
-Will print out the major version info about what this built from.
+Will print out the major version info about what this built from.
.RS 4
.Sp
.RS 4
-\&\fBExample\fR
+\&\fBExample\fR
.Sp
-\&\fBvirsh\fR version
+\&\fBvirsh\fR version
.Sp
-Compiled against library: libvir 0.0.6
+Compiled against library: libvir 0.0.6
.Sp
Using library: libvir 0.0.6
.Sp
An example format for the list is as follows:
.Sp
\&\fBvirsh\fR list
- Id Name State
+ Id Name State
.Sp
-\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.Sp
.Vb 2
-\& 0 Domain-0 running
+\& 0 Domain-0 running
\& 2 fedora paused
.Ve
.Sp
-Name is the name of the domain. \s-1ID\s0 the domain numeric id.
- State is the run state (see below).
+Name is the name of the domain. \s-1ID\s0 the domain numeric id.
+ State is the run state (see below).
.IP "\fBfreecell\fR optional \fIcellno\fR" 4
.IX Item "freecell optional cellno"
-Prints the available amount of memory on the machine or within a
+Prints the available amount of memory on the machine or within a
\&\s-1NUMA\s0 cell if \fIcellno\fR is provided.
.RS 4
.Sp
.IP "\fBs \- shutdown\fR" 4
.IX Item "s - shutdown"
The domain is in the process of shutting down, i.e. the guest operating system
-has been notified and should be in the process of stopping its operations
+has been notified and should be in the process of stopping its operations
gracefully.
.IP "\fBc \- crashed\fR" 4
.IX Item "c - crashed"
Connect the virtual serial console for the guest.
.IP "\fBcreate\fR \fI\s-1FILE\s0\fR" 4
.IX Item "create FILE"
-Create a domain from an \s-1XML\s0 <file> an easy way to create one if you have a pre-existing xen guest created via \fBxm\fR create <\s-1XMLFILE\s0>.
+Create a domain from an \s-1XML\s0 <file> an easy way to create one if you have a pre-existing xen guest created via \fBxm\fR create <\s-1XMLFILE\s0>.
.Sp
\&\fBExample\fR
.Sp
-virsh dumpxml <domain\-id> > file.
+virsh dumpxml <domain\-id> > file.
.IP "\fBdefine\fR \fI\s-1FILE\s0\fR" 4
.IX Item "define FILE"
Define a domain from an \s-1XML\s0 <file>. The domain definitions is registered
Returns state about a running domain.
.IP "\fBdumpxml\fR \fIdomain-id\fR" 4
.IX Item "dumpxml domain-id"
-Output the domain informations as an \s-1XML\s0 dump to stdout, this format can be used by the \fBcreate\fR command.
+Output the domain informations as an \s-1XML\s0 dump to stdout, this format can be used by the \fBcreate\fR command.
.IP "\fBreboot\fR \fIdomain-id\fR" 4
.IX Item "reboot domain-id"
Reboot a domain. This acts just as if the domain had the \fBreboot\fR
.IP "\fBsetmaxmem\fR \fIdomain-id\fR \fBkilobytes\fR" 4
.IX Item "setmaxmem domain-id kilobytes"
Change the maximum memory allocation limit in the guest domain. This should
-not change the current memory use. The memory limit is specified in
+not change the current memory use. The memory limit is specified in
kilobytes.
.IP "\fBsetvcpus\fR \fIdomain-id\fR \fIcount\fR" 4
.IX Item "setvcpus domain-id count"
Change the number of virtual CPUs active in the guest domain. Note that
-\&\fIcount\fR may be limited by host, hypervisor or limit coming from the
+\&\fIcount\fR may be limited by host, hypervisor or limit coming from the
original description of domain.
.IP "\fBshutdown\fR \fIdomain-id\fR" 4
.IX Item "shutdown domain-id"
Gracefully shuts down a domain. This coordinates with the domain \s-1OS\s0
to perform graceful shutdown, so there is no guarantee that it will
succeed, and may take a variable length of time depending on what
-services must be shutdown in the domain.
+services must be shutdown in the domain.
.Sp
For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
\&\fIon_shutdown\fR parameter of the xmdomain.cfg file when the domain was
.IP "\fBnet-create\fR \fIfile\fR" 4
.IX Item "net-create file"
Create a virtual network from an \s-1XML\s0 \fIfile\fR, see the documentation to get
-a description of the \s-1XML\s0 network format used by libvirt.
+a description of the \s-1XML\s0 network format used by libvirt.
.IP "\fBnet-define\fR \fIfile\fR" 4
.IX Item "net-define file"
Define a virtual network from an \s-1XML\s0 \fIfile\fR, the network is just defined but
.SH "AUTHOR"
.IX Header "AUTHOR"
.Vb 2
-\& Andrew Puch <apuch @ redhat.com>
+\& Andrew Puch <apuch @ redhat.com>
\& Daniel Veillard <veillard @ redhat.com>
.Ve
.Sp
.Vb 3
-\& Based on the xm man paged by
+\& Based on the xm man paged by
\& Sean Dague <sean at dague dot net>
\& Daniel Stekloff <dsteklof at us dot ibm dot com>
.Ve
.SH "BUGS"
.IX Header "BUGS"
-Bugs can be view on the RedHat buzilla page under the libvirt
+Bugs can be view on the RedHat buzilla page under the libvirt
<https://bugzilla.redhat.com/>
.Sp
<https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr>