1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-08-18 13:50:02 +03:00

Compare commits

..

18 Commits

Author SHA1 Message Date
297a77f6da * config.h.in configure.in libvirt.spec.in docs/libvir.html
docs/news.html include/libvirt/libvirt.h: preparing release of
  libvirt-0.1.8
* src/xen_internal.c: fixed a compilation problem
Daniel
2006-10-16 16:04:55 +00:00
5533a01af3 * src/xen_internal.c: one of the fix for system with page size != 4k
was missing
Daniel
2006-10-12 16:25:51 +00:00
321c24bb00 * src/xen_internal.c: applied patch from Philippe Berthault
fixing the vcpu number initialization
Daniel
2006-10-12 12:31:51 +00:00
d9388dbfbd * src/xen_internal.c: applied patch from Peter Vetere so that
crashed domains ain't reported as shut off.
Daniel
2006-10-11 16:11:59 +00:00
1da9cd13af * virsh.1: fixed some typo and unclear language pointed out by
Noriko Mizumoto
Daniel
2006-10-11 15:18:31 +00:00
16a65d1c93 Added support for <driver> element and blktap 2006-10-09 14:32:07 +00:00
a98ac28b16 Added ignore file rules for i18n stuff 2006-10-06 15:35:10 +00:00
8c5ce29411 Fixed multiple memory leaks & make test suite check for leaks with valgrind 2006-10-06 15:32:48 +00:00
18351e0ffc * src/xen_internal.c: Daniel Berrange fixed some mlock size problem
doing a bit of cleanup too
Daniel
2006-10-02 22:13:12 +00:00
cce70e0132 Fix mlock() of getdomaininfolist data buffer 2006-10-02 19:26:39 +00:00
ea541f83b9 * src/virsh.c: add #include <locale.h> to be able to compile without
optimization
Daniel
2006-09-29 16:23:27 +00:00
2c32196a2f * src/xen_internal.c: fix for system with page size != 4k
Daniel
2006-09-29 16:12:08 +00:00
cc3697f722 added too,Daniel 2006-09-29 12:07:52 +00:00
47c23ba3e5 Dohh, Daniel 2006-09-29 12:06:21 +00:00
177cf2edee * docs/bugs.html docs/libvir.html: added pointers on how to report
bugs in bugzilla as suggested by markmc
* src/xend_internal.c: first step for #208545 raise an error at the
  libvirt level
Daniel
2006-09-29 12:00:58 +00:00
be13e2f45d * docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.7
Daniel
2006-09-29 10:25:21 +00:00
26d1767317 Really, fixed struct for getdomaininfo to work on both 3.0.2 & 3.0.3 on 32-bit archs this time. 2006-09-28 23:29:25 +00:00
01ae3678f1 Fixed buffer overflow in populating CPU<->VCPU mapping. Cleanup whitespace 2006-09-28 19:20:52 +00:00
46 changed files with 1795 additions and 945 deletions

View File

@ -19,4 +19,8 @@ ltmain.sh
update.log
libvirt.pc
libvirt.spec
COPYING
COPYING
m4
ABOUT-NLS
config.rpath
mkinstalldirs

View File

@ -1,3 +1,96 @@
Mon Oct 16 17:10:15 CEST 2006 Daniel Veillard <veillard@redhat.com>
* config.h.in configure.in libvirt.spec.in docs/libvir.html
docs/news.html include/libvirt/libvirt.h: preparing release of
libvirt-0.1.8
* src/xen_internal.c: fixed a compilation problem
Thu Oct 12 17:31:13 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: one of the fix for system with page size != 4k
was missing
Thu Oct 12 13:37:24 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: applied patch from Philippe Berthault
fixing the vcpu number initialization
Wed Oct 11 17:16:44 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: applied patch from Peter Vetere so that
crashed domains ain't reported as shut off.
Wed Oct 11 16:23:58 CEST 2006 Daniel Veillard <veillard@redhat.com>
* virsh.1: fixed some typo and unclear language pointed out by
Noriko Mizumoto
Mon Oct 9 09:34:42 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
* src/xml.c, src/xend_internal.c: Added support for a <driver>
element in disk specification, allowing use of alternate Xen
drivers such as blktap.
* tests/xml2sexprtest.c, tests/sexpr2xmltest.c: Added tests for
new <driver> element, and blktap driver impl.
* tests/xml2sexprdata/*, tests/sexpr2xmldata/*: New / updated
data files for new <driver> element
Fri Oct 6 10:33:20 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
* src/xend_internal.c: Fixed memory leak in xend_get_config_version
routine.
* src/xml.c: Fixed memory leaks in XML parsing routines relating
to VNC port, HVM boot devices, HVM floppy & CDROM, HVM features,
disk device type.
* tests/Makefile.am: Use --leak-check=full when running valgrind
to detect all leaks, in addition to memory corruption checks
* tests/sexpr2xmltest.c, tests/xml2sexprtest.c: Fixed memory leaks
in test harness leading to valgrind false-positives.
Mon Oct 2 23:16:06 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: Daniel Berrange fixed some mlock size problem
doing a bit of cleanup too
Fri Sep 29 17:31:36 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: add #include <locale.h> to be able to compile without
optimization
Fri Sep 29 17:16:40 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: fix for system with page size != 4k
Fri Sep 29 13:05:12 CEST 2006 Daniel Veillard <veillard@redhat.com>
* docs/bugs.html docs/libvir.html: added pointers on how to report
bugs in bugzilla as suggested by markmc
* src/xend_internal.c: first step for #208545 raise an error at the
libvirt level
Fri Sep 29 11:27:36 CEST 2006 Daniel Veillard <veillard@redhat.com>
* docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.7
Thu Sep 21 10:19:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xen_internal.c: Fork different version of getdomaininfo struct for
Xen 3.0.2, and 3.0.3 because the shared_info_frame field is different
size on between these versions on 32-bit platforms. Make callers use
appropriate struct version matched to hypervisor version, hiding detail
in macros to aid readability. Cleanup whitespace to remove tabs. Disable
xenHypervisorGetVcpus completely in proxy since its not used.
Thu Sep 21 10:19:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Check if the physical CPU will fit in the maplen
provided by the caller when populating VCPU<->CPU mapping. This is because
XenD will return data for 32 physical CPUs, even if the box only has 4
CPUs. The caller of course will only have allocated a map big enough for
the actual number of physical CPUs. We simply check against maplen param
supplied by caller & discard info about CPUs which don't fit. Also santise
whitespace.
Fri Sep 22 11:02:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
* docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.6

8
NEWS
View File

@ -5,7 +5,13 @@
http://libvirt.org/news.html
Releases
0.1.6: Sep 5 2006:
0.1.7: Sep 29 2006:
- fix a memory bug on getting vcpu informations from xend (Daniel Berrange)
- fix another problem in the hypercalls change in Xen changeset
86d26e6ec89b when getting domain informations (Daniel Berrange)
0.1.6: Sep 22 2006:
- 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

View File

@ -4,14 +4,6 @@
language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT

View File

@ -5,7 +5,7 @@ AC_CANONICAL_HOST
LIBVIRT_MAJOR_VERSION=0
LIBVIRT_MINOR_VERSION=1
LIBVIRT_MICRO_VERSION=6
LIBVIRT_MICRO_VERSION=8
LIBVIRT_MICRO_VERSION_SUFFIX=
LIBVIRT_VERSION=$LIBVIRT_MAJOR_VERSION.$LIBVIRT_MINOR_VERSION.$LIBVIRT_MICRO_VERSION$LIBVIRT_MICRO_VERSION_SUFFIX
LIBVIRT_VERSION_INFO=`expr $LIBVIRT_MAJOR_VERSION + $LIBVIRT_MINOR_VERSION`:$LIBVIRT_MICRO_VERSION:$LIBVIRT_MINOR_VERSION

View File

@ -5,6 +5,8 @@ with an <a href="https://www.redhat.com/archives/libvir-list/">on-line
archive</a>. Please subscribe to this list before posting by visiting the <a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
page and follow the instructions. Patches with explanations and provided as
attachments are really appreciated and will be discussed on the mailing list.
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
Bugzilla</a> to track bugs for libvirt, though there isn't a libvirt software
module defined yet, in the meantime use the mailing-list, thanks !.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We use Red Hat Bugzilla to track bugs to libvirt. If you want to report a
bug, please check <a href="http://bugzilla.redhat.com/bugzilla/buglist.cgi?component=libvirt&amp;component=libvirt-devel&amp;component=libvirt-python&amp;bug_status=ASSIGNED&amp;bug_status=INVESTIGATE&amp;bug_status=NEW&amp;bug_status=REOPENED&amp;bug_status=VERIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;Search=Search">the existing open bugs</a>, then if yours isn't a duplicate of
an existing bug, <a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora%20Core&amp;component=libvirt">log a new bug</a>. It may be good
to post to the <a href="mailto:libvir-list@redhat.com">mailing-list</a>
too if the issue looks serious, thanks !</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -33,7 +33,25 @@ development of libvirt, it is preferable when possible to just use the <a
href="downloads.html">CVS version or snapshot</a>, contact the mailing list
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p>
<h3>0.1.6: Sep 5 2006</h3>
<h3>0.1.8: Oct 16 2006</h3>
<ul>
<li> Bug for system with page size != 4k</li>
<li> vcpu number initialization (Philippe Berthault)</li>
<li> don't label crashed domains as shut off (Peter Vetere)</li>
<li> fix virsh man page (Noriko Mizumoto)</li>
<li> blktapdd support for alternate drivers like blktap (Daniel Berrange)</li>
<li> memory leak fixes (xend interface and XML parsing) (Daniel Berrange)</li>
<li> compile fix</li>
<li> mlock/munlock size fixes (Daniel Berrange)</li>
<li> improve error reporting</li>
</ul>
<h3>0.1.7: Sep 29 2006</h3>
<ul>
<li> fix a memory bug on getting vcpu informations from xend (Daniel Berrange)</li>
<li> fix another problem in the hypercalls change in Xen changeset
86d26e6ec89b when getting domain informations (Daniel Berrange)</li>
</ul>
<h3>0.1.6: Sep 22 2006</h3>
<ul>
<li>Support for localization of strings using gettext (Daniel Berrange)</li>
<li>Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)</li>
@ -872,8 +890,10 @@ page and follow the instructions. Patches with explanations and provided as
attachments are really appreciated and will be discussed on the mailing list.
If possible generate the patches by using cvs diff -u in a CVS checkout.</p>
<p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
Bugzilla</a> to track bugs for libvirt, though there isn't a libvirt software
module defined yet, in the meantime use the mailing-list, thanks !.</p>
<p>We use Red Hat Bugzilla to track bugs to libvirt. If you want to report a
bug, please check <a href="http://bugzilla.redhat.com/bugzilla/buglist.cgi?component=libvirt&amp;component=libvirt-devel&amp;component=libvirt-python&amp;bug_status=ASSIGNED&amp;bug_status=INVESTIGATE&amp;bug_status=NEW&amp;bug_status=REOPENED&amp;bug_status=VERIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;Search=Search">the existing open bugs</a>, then if yours isn't a duplicate of
an existing bug, <a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora%20Core&amp;component=libvirt">log a new bug</a>. It may be good
to post to the <a href="mailto:libvir-list@redhat.com">mailing-list</a>
too if the issue looks serious, thanks !</p>
</body>
</html>

View File

@ -2,7 +2,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Releases</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Releases</h1><p>Here is the list of official releases, however since it is early on in the
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.1.6: Sep 5 2006</h3><ul><li>Support for localization of strings using gettext (Daniel Berrange)</li>
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.1.8: Oct 16 2006</h3><ul><li> Bug for system with page size != 4k</li>
<li> vcpu number initialization (Philippe Berthault)</li>
<li> don't label crashed domains as shut off (Peter Vetere)</li>
<li> fix virsh man page (Noriko Mizumoto)</li>
<li> blktapdd support for alternate drivers like blktap (Daniel Berrange)</li>
<li> memory leak fixes (xend interface and XML parsing) (Daniel Berrange)</li>
<li> compile fix</li>
<li> mlock/munlock size fixes (Daniel Berrange)</li>
<li> improve error reporting</li>
</ul><h3>0.1.7: Sep 29 2006</h3><ul><li> fix a memory bug on getting vcpu informations from xend (Daniel Berrange)</li>
<li> fix another problem in the hypercalls change in Xen changeset
86d26e6ec89b when getting domain informations (Daniel Berrange)</li>
</ul><h3>0.1.6: Sep 22 2006</h3><ul><li>Support for localization of strings using gettext (Daniel Berrange)</li>
<li>Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)</li>
<li>Support for setting VNC port when creating domains with new
xend config files (Daniel Berrange) </li>

View File

@ -196,7 +196,7 @@ typedef virNodeInfo *virNodeInfoPtr;
* version * 1,000,000 + minor * 1000 + micro
*/
#define LIBVIR_VERSION_NUMBER 1006
#define LIBVIR_VERSION_NUMBER 1008
int virGetVersion (unsigned long *libVer,
const char *type,

View File

@ -111,6 +111,21 @@ rm -fr %{buildroot}
%doc docs/examples/python
%changelog
* Mon Oct 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-1
- fix missing page size detection code for ia64
- fix mlock size when getting domain info list from hypervisor
- vcpu number initialization
- don't label crashed domains as shut off
- fix virsh man page
- blktapdd support for alternate drivers like blktap
- memory leak fixes (xend interface and XML parsing)
- compile fix
- mlock/munlock size fixes
* Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.7-1
- Fix bug when running against xen-3.0.3 hypercalls
- Fix memory bug when getting vcpus info from xend
* Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.6-1
- Support for localization
- Support for new Xen-3.0.3 cdrom and disk configuration

14
po/.cvsignore Normal file
View File

@ -0,0 +1,14 @@
stamp-po
remove-potcdate.sin
quot.sed
insert-header.sin
*.gmo
en@quot.header
en@boldquot.header
boldquot.sed
Rules-quot
POTFILES
Makevars.template
Makefile.in.in
Makefile.in
Makefile

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libvirt\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-09-21 17:03+0200\n"
"POT-Creation-Date: 2006-10-16 17:09+0200\n"
"PO-Revision-Date: 2006-09-20 10:20-0400\n"
"Last-Translator: Daniel Berrange <berrange@redhat.com>\n"
"Language-Team: English <en@li.org>\n"
@ -369,8 +369,8 @@ msgid "allocate new context"
msgstr ""
#: src/hash.c:628 src/hash.c:634 src/test.c:725 src/test.c:750 src/test.c:773
#: src/test.c:797 src/xend_internal.c:1864 src/xend_internal.c:2560
#: src/xend_internal.c:2768 src/xs_internal.c:592 src/proxy_internal.c:790
#: src/test.c:797 src/xend_internal.c:1911 src/xend_internal.c:2607
#: src/xend_internal.c:2818 src/xs_internal.c:592 src/proxy_internal.c:790
#: src/proxy_internal.c:837 src/proxy_internal.c:888
msgid "allocating domain"
msgstr ""
@ -491,7 +491,7 @@ msgstr ""
msgid "growing buffer"
msgstr ""
#: src/xml.c:116
#: src/xml.c:116 src/xend_internal.c:1602 src/xend_internal.c:1621
msgid "allocate new buffer"
msgstr ""
@ -535,638 +535,650 @@ msgstr ""
msgid "domain information incomplete, missing kernel"
msgstr ""
#: src/xend_internal.c:1564 src/xend_internal.c:1601
#: src/xend_internal.c:1581
msgid "domain information incomplete, vbd has no src"
msgstr ""
#: src/xend_internal.c:1587
msgid "domain information incomplete, vbd has no dev"
msgstr ""
#: src/xend_internal.c:1875
#: src/xend_internal.c:1595
msgid "cannot parse vbd filename, missing driver name"
msgstr ""
#: src/xend_internal.c:1614
msgid "cannot parse vbd filename, missing driver type"
msgstr ""
#: src/xend_internal.c:1922
msgid "failed to parse Xend domain information"
msgstr ""
#: src/xend_internal.c:2831
#: src/xend_internal.c:2882
#, c-format
msgid "Failed to create domain %s\n"
msgstr ""
#: src/xend_internal.c:2837
#: src/xend_internal.c:2888
#, c-format
msgid "Failed to get devices for domain %s\n"
msgstr ""
#: src/xend_internal.c:2848
#: src/xend_internal.c:2899
#, c-format
msgid "Failed to resume new domain %s\n"
msgstr ""
#: src/virsh.c:233
#: src/virsh.c:234
msgid "print help"
msgstr ""
#: src/virsh.c:234
#: src/virsh.c:235
msgid "Prints global help or command specific help."
msgstr ""
#: src/virsh.c:252
#: src/virsh.c:253
msgid ""
"Commands:\n"
"\n"
msgstr ""
#: src/virsh.c:266
#: src/virsh.c:267
msgid "(re)connect to hypervisor"
msgstr ""
#: src/virsh.c:268
#: src/virsh.c:269
msgid ""
"Connect to local hypervisor. This is built-in command after shell start up."
msgstr ""
#: src/virsh.c:273
#: src/virsh.c:274
msgid "hypervisor connection URI"
msgstr ""
#: src/virsh.c:274
#: src/virsh.c:275
msgid "read-only connection"
msgstr ""
#: src/virsh.c:286
#: src/virsh.c:287
msgid "Failed to disconnect from the hypervisor"
msgstr ""
#: src/virsh.c:302
#: src/virsh.c:303
msgid "Failed to connect to the hypervisor"
msgstr ""
#: src/virsh.c:312
#: src/virsh.c:313
msgid "list domains"
msgstr ""
#: src/virsh.c:313
#: src/virsh.c:314
msgid "Returns list of domains."
msgstr ""
#: src/virsh.c:318
#: src/virsh.c:319
msgid "list inactive domains"
msgstr ""
#: src/virsh.c:319
#: src/virsh.c:320
msgid "list inactive & active domains"
msgstr ""
#: src/virsh.c:357 src/virsh.c:364
#: src/virsh.c:358 src/virsh.c:365
msgid "Failed to list active domains"
msgstr ""
#: src/virsh.c:375 src/virsh.c:384
#: src/virsh.c:376 src/virsh.c:385
msgid "Failed to list inactive domains"
msgstr ""
#: src/virsh.c:394
#: src/virsh.c:395
msgid "Id"
msgstr ""
#: src/virsh.c:394
#: src/virsh.c:395
msgid "Name"
msgstr ""
#: src/virsh.c:394
#: src/virsh.c:395
msgid "State"
msgstr ""
#: src/virsh.c:411 src/virsh.c:2190 src/virsh.c:2206
#: src/virsh.c:412 src/virsh.c:2191 src/virsh.c:2207
msgid "no state"
msgstr ""
#: src/virsh.c:454
#: src/virsh.c:455
msgid "domain state"
msgstr ""
#: src/virsh.c:455
#: src/virsh.c:456
msgid "Returns state about a running domain."
msgstr ""
#: src/virsh.c:460 src/virsh.c:498 src/virsh.c:735 src/virsh.c:817
#: src/virsh.c:856 src/virsh.c:895 src/virsh.c:934 src/virsh.c:973
#: src/virsh.c:1045 src/virsh.c:1128 src/virsh.c:1214 src/virsh.c:1257
#: src/virsh.c:1300 src/virsh.c:1377
#: src/virsh.c:461 src/virsh.c:499 src/virsh.c:736 src/virsh.c:818
#: src/virsh.c:857 src/virsh.c:896 src/virsh.c:935 src/virsh.c:974
#: src/virsh.c:1046 src/virsh.c:1129 src/virsh.c:1215 src/virsh.c:1258
#: src/virsh.c:1301 src/virsh.c:1378
msgid "domain name, id or uuid"
msgstr ""
#: src/virsh.c:492
#: src/virsh.c:493
msgid "suspend a domain"
msgstr ""
#: src/virsh.c:493
#: src/virsh.c:494
msgid "Suspend a running domain."
msgstr ""
#: src/virsh.c:516
#: src/virsh.c:517
#, c-format
msgid "Domain %s suspended\n"
msgstr ""
#: src/virsh.c:518
#: src/virsh.c:519
#, c-format
msgid "Failed to suspend domain %s"
msgstr ""
#: src/virsh.c:531
#: src/virsh.c:532
msgid "create a domain from an XML file"
msgstr ""
#: src/virsh.c:532
#: src/virsh.c:533
msgid "Create a domain."
msgstr ""
#: src/virsh.c:537 src/virsh.c:592
#: src/virsh.c:538 src/virsh.c:593
msgid "file conatining an XML domain description"
msgstr ""
#: src/virsh.c:560 src/virsh.c:565 src/virsh.c:615 src/virsh.c:620
#: src/virsh.c:561 src/virsh.c:566 src/virsh.c:616 src/virsh.c:621
#, c-format
msgid "Failed to read description file %s"
msgstr ""
#: src/virsh.c:572
#: src/virsh.c:573
#, c-format
msgid "Domain %s created from %s\n"
msgstr ""
#: src/virsh.c:575
#: src/virsh.c:576
#, c-format
msgid "Failed to create domain from %s"
msgstr ""
#: src/virsh.c:586
#: src/virsh.c:587
msgid "define (but don't start) a domain from an XML file"
msgstr ""
#: src/virsh.c:587
#: src/virsh.c:588
msgid "Define a domain."
msgstr ""
#: src/virsh.c:627
#: src/virsh.c:628
#, c-format
msgid "Domain %s defined from %s\n"
msgstr ""
#: src/virsh.c:630
#: src/virsh.c:631
#, c-format
msgid "Failed to define domain from %s"
msgstr ""
#: src/virsh.c:641
#: src/virsh.c:642
msgid "undefine an inactive domain"
msgstr ""
#: src/virsh.c:642
#: src/virsh.c:643
msgid "Undefine the configuration for an inactive domain."
msgstr ""
#: src/virsh.c:647 src/virsh.c:1446
#: src/virsh.c:648 src/virsh.c:1447
msgid "domain name or uuid"
msgstr ""
#: src/virsh.c:665
#: src/virsh.c:666
#, c-format
msgid "Domain %s has been undefined\n"
msgstr ""
#: src/virsh.c:667
#: src/virsh.c:668
#, c-format
msgid "Failed to undefine domain %s"
msgstr ""
#: src/virsh.c:680
#: src/virsh.c:681
msgid "start a (previously defined) inactive domain"
msgstr ""
#: src/virsh.c:681
#: src/virsh.c:682
msgid "Start a domain."
msgstr ""
#: src/virsh.c:686
#: src/virsh.c:687
msgid "name of the inactive domain"
msgstr ""
#: src/virsh.c:710
#: src/virsh.c:711
msgid "Domain is already active"
msgstr ""
#: src/virsh.c:715
#: src/virsh.c:716
#, c-format
msgid "Domain %s started\n"
msgstr ""
#: src/virsh.c:718
#: src/virsh.c:719
#, c-format
msgid "Failed to start domain %s"
msgstr ""
#: src/virsh.c:729
#: src/virsh.c:730
msgid "save a domain state to a file"
msgstr ""
#: src/virsh.c:730
#: src/virsh.c:731
msgid "Save a running domain."
msgstr ""
#: src/virsh.c:736
#: src/virsh.c:737
msgid "where to save the data"
msgstr ""
#: src/virsh.c:758
#: src/virsh.c:759
#, c-format
msgid "Domain %s saved to %s\n"
msgstr ""
#: src/virsh.c:760
#: src/virsh.c:761
#, c-format
msgid "Failed to save domain %s to %s"
msgstr ""
#: src/virsh.c:773
#: src/virsh.c:774
msgid "restore a domain from a saved state in a file"
msgstr ""
#: src/virsh.c:774
#: src/virsh.c:775
msgid "Restore a domain."
msgstr ""
#: src/virsh.c:779
#: src/virsh.c:780
msgid "the state to restore"
msgstr ""
#: src/virsh.c:798
#: src/virsh.c:799
#, c-format
msgid "Domain restored from %s\n"
msgstr ""
#: src/virsh.c:800
#: src/virsh.c:801
#, c-format
msgid "Failed to restore domain from %s"
msgstr ""
#: src/virsh.c:811
#: src/virsh.c:812
msgid "resume a domain"
msgstr ""
#: src/virsh.c:812
#: src/virsh.c:813
msgid "Resume a previously suspended domain."
msgstr ""
#: src/virsh.c:835
#: src/virsh.c:836
#, c-format
msgid "Domain %s resumed\n"
msgstr ""
#: src/virsh.c:837
#: src/virsh.c:838
#, c-format
msgid "Failed to resume domain %s"
msgstr ""
#: src/virsh.c:850
#: src/virsh.c:851
msgid "gracefully shutdown a domain"
msgstr ""
#: src/virsh.c:851
#: src/virsh.c:852
msgid "Run shutdown in the target domain."
msgstr ""
#: src/virsh.c:874
#: src/virsh.c:875
#, c-format
msgid "Domain %s is being shutdown\n"
msgstr ""
#: src/virsh.c:876
#: src/virsh.c:877
#, c-format
msgid "Failed to shutdown domain %s"
msgstr ""
#: src/virsh.c:889
#: src/virsh.c:890
msgid "reboot a domain"
msgstr ""
#: src/virsh.c:890
#: src/virsh.c:891
msgid "Run a reboot command in the target domain."
msgstr ""
#: src/virsh.c:913
#: src/virsh.c:914
#, c-format
msgid "Domain %s is being rebooted\n"
msgstr ""
#: src/virsh.c:915
#: src/virsh.c:916
#, c-format
msgid "Failed to reboot domain %s"
msgstr ""
#: src/virsh.c:928
#: src/virsh.c:929
msgid "destroy a domain"
msgstr ""
#: src/virsh.c:929
#: src/virsh.c:930
msgid "Destroy a given domain."
msgstr ""
#: src/virsh.c:952
#: src/virsh.c:953
#, c-format
msgid "Domain %s destroyed\n"
msgstr ""
#: src/virsh.c:954
#: src/virsh.c:955
#, c-format
msgid "Failed to destroy domain %s"
msgstr ""
#: src/virsh.c:967
#: src/virsh.c:968
msgid "domain information"
msgstr ""
#: src/virsh.c:968
#: src/virsh.c:969
msgid "Returns basic information about the domain."
msgstr ""
#: src/virsh.c:994 src/virsh.c:996
#: src/virsh.c:995 src/virsh.c:997
msgid "Id:"
msgstr ""
#: src/virsh.c:997
#: src/virsh.c:998
msgid "Name:"
msgstr ""
#: src/virsh.c:1000
#: src/virsh.c:1001
msgid "UUID:"
msgstr ""
#: src/virsh.c:1003
#: src/virsh.c:1004
msgid "OS Type:"
msgstr ""
#: src/virsh.c:1008 src/virsh.c:1089
#: src/virsh.c:1009 src/virsh.c:1090
msgid "State:"
msgstr ""
#: src/virsh.c:1011 src/virsh.c:1355
#: src/virsh.c:1012 src/virsh.c:1356
msgid "CPU(s):"
msgstr ""
#: src/virsh.c:1018 src/virsh.c:1096
#: src/virsh.c:1019 src/virsh.c:1097
msgid "CPU time:"
msgstr ""
#: src/virsh.c:1021
#: src/virsh.c:1022
msgid "Max memory:"
msgstr ""
#: src/virsh.c:1023
#: src/virsh.c:1024
msgid "Used memory:"
msgstr ""
#: src/virsh.c:1039
#: src/virsh.c:1040
msgid "domain vcpu information"
msgstr ""
#: src/virsh.c:1040
#: src/virsh.c:1041
msgid "Returns basic information about the domain virtual CPUs."
msgstr ""
#: src/virsh.c:1087
#: src/virsh.c:1088
msgid "VCPU:"
msgstr ""
#: src/virsh.c:1088
#: src/virsh.c:1089
msgid "CPU:"
msgstr ""
#: src/virsh.c:1098
#: src/virsh.c:1099
msgid "CPU Affinity:"
msgstr ""
#: src/virsh.c:1122
#: src/virsh.c:1123
msgid "control domain vcpu affinity"
msgstr ""
#: src/virsh.c:1123
#: src/virsh.c:1124
msgid "Pin domain VCPUs to host physical CPUs."
msgstr ""
#: src/virsh.c:1129
#: src/virsh.c:1130
msgid "vcpu number"
msgstr ""
#: src/virsh.c:1130
#: src/virsh.c:1131
msgid "host cpu number(s) (comma separated)"
msgstr ""
#: src/virsh.c:1208
#: src/virsh.c:1209
msgid "change number of virtual CPUs"
msgstr ""
#: src/virsh.c:1209
#: src/virsh.c:1210
msgid "Change the number of virtual CPUs active in the guest domain."
msgstr ""
#: src/virsh.c:1215
#: src/virsh.c:1216
msgid "number of virtual CPUs"
msgstr ""
#: src/virsh.c:1251
#: src/virsh.c:1252
msgid "change memory allocation"
msgstr ""
#: src/virsh.c:1252
#: src/virsh.c:1253
msgid "Change the current memory allocation in the guest domain."
msgstr ""
#: src/virsh.c:1258
#: src/virsh.c:1259
msgid "number of bytes of memory"
msgstr ""
#: src/virsh.c:1294
#: src/virsh.c:1295
msgid "change maximum memory limit"
msgstr ""
#: src/virsh.c:1295
#: src/virsh.c:1296
msgid "Change the maximum memory allocation limit in the guest domain."
msgstr ""
#: src/virsh.c:1301
#: src/virsh.c:1302
msgid "maxmimum memory limit in bytes"
msgstr ""
#: src/virsh.c:1337
#: src/virsh.c:1338
msgid "node information"
msgstr ""
#: src/virsh.c:1338
#: src/virsh.c:1339
msgid "Returns basic information about the node."
msgstr ""
#: src/virsh.c:1351
#: src/virsh.c:1352
msgid "failed to get node information"
msgstr ""
#: src/virsh.c:1354
#: src/virsh.c:1355
msgid "CPU model:"
msgstr ""
#: src/virsh.c:1356
#: src/virsh.c:1357
msgid "CPU frequency:"
msgstr ""
#: src/virsh.c:1357
#: src/virsh.c:1358
msgid "CPU socket(s):"
msgstr ""
#: src/virsh.c:1358
#: src/virsh.c:1359
msgid "Core(s) per socket:"
msgstr ""
#: src/virsh.c:1359
#: src/virsh.c:1360
msgid "Thread(s) per core:"
msgstr ""
#: src/virsh.c:1360
#: src/virsh.c:1361
msgid "NUMA cell(s):"
msgstr ""
#: src/virsh.c:1361
#: src/virsh.c:1362
msgid "Memory size:"
msgstr ""
#: src/virsh.c:1371
#: src/virsh.c:1372
msgid "domain information in XML"
msgstr ""
#: src/virsh.c:1372
#: src/virsh.c:1373
msgid "Ouput the domain information as an XML dump to stdout."
msgstr ""
#: src/virsh.c:1411
#: src/virsh.c:1412
msgid "convert a domain id or UUID to domain name"
msgstr ""
#: src/virsh.c:1416
#: src/virsh.c:1417
msgid "domain id or uuid"
msgstr ""
#: src/virsh.c:1441
#: src/virsh.c:1442
msgid "convert a domain name or UUID to domain id"
msgstr ""
#: src/virsh.c:1476
#: src/virsh.c:1477
msgid "convert a domain name or id to domain UUID"
msgstr ""
#: src/virsh.c:1481
#: src/virsh.c:1482
msgid "domain id or name"
msgstr ""
#: src/virsh.c:1500
#: src/virsh.c:1501
msgid "failed to get domain UUID"
msgstr ""
#: src/virsh.c:1511
#: src/virsh.c:1512
msgid "show version"
msgstr ""
#: src/virsh.c:1512
#: src/virsh.c:1513
msgid "Display the system version information."
msgstr ""
#: src/virsh.c:1535
#: src/virsh.c:1536
msgid "failed to get hypervisor type"
msgstr ""
#: src/virsh.c:1544
#: src/virsh.c:1545
#, c-format
msgid "Compiled against library: libvir %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1549
#: src/virsh.c:1550
msgid "failed to get the library version"
msgstr ""
#: src/virsh.c:1556
#: src/virsh.c:1557
#, c-format
msgid "Using library: libvir %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1563
#: src/virsh.c:1564
#, c-format
msgid "Using API: %s %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1568
#: src/virsh.c:1569
msgid "failed to get the hypervisor version"
msgstr ""
#: src/virsh.c:1573
#: src/virsh.c:1574
#, c-format
msgid "Cannot extract running %s hypervisor version\n"
msgstr ""
#: src/virsh.c:1580
#: src/virsh.c:1581
#, c-format
msgid "Running hypervisor: %s %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1591
#: src/virsh.c:1592
msgid "quit this interactive terminal"
msgstr ""
#: src/virsh.c:1703
#, c-format
msgid "command '%s' requires <%s> option"
msgstr ""
#: src/virsh.c:1704
#, c-format
msgid "command '%s' requires <%s> option"
msgstr ""
#: src/virsh.c:1705
#, c-format
msgid "command '%s' requires --%s option"
msgstr ""
#: src/virsh.c:1731
#: src/virsh.c:1732
#, c-format
msgid "command '%s' doesn't exist"
msgstr ""
#: src/virsh.c:1739
#: src/virsh.c:1740
msgid " NAME\n"
msgstr ""
#: src/virsh.c:1750
#: src/virsh.c:1751
msgid ""
"\n"
" DESCRIPTION\n"
msgstr ""
#: src/virsh.c:1754
#: src/virsh.c:1755
msgid ""
"\n"
" OPTIONS\n"
msgstr ""
#: src/virsh.c:1761
#: src/virsh.c:1762
#, c-format
msgid "--%s <number>"
msgstr ""
#: src/virsh.c:1763
#: src/virsh.c:1764
#, c-format
msgid "--%s <string>"
msgstr ""
#: src/virsh.c:1876
#: src/virsh.c:1877
msgid "undefined domain name or id"
msgstr ""
#: src/virsh.c:1909
#: src/virsh.c:1910
#, c-format
msgid "failed to get domain '%s'"
msgstr ""
#: src/virsh.c:1937
#: src/virsh.c:1938
#, c-format
msgid ""
"\n"
@ -1174,102 +1186,102 @@ msgid ""
"\n"
msgstr ""
#: src/virsh.c:2011
#: src/virsh.c:2012
msgid "missing \""
msgstr ""
#: src/virsh.c:2072
#: src/virsh.c:2073
#, c-format
msgid "unexpected token (command name): '%s'"
msgstr ""
#: src/virsh.c:2077
#: src/virsh.c:2078
#, c-format
msgid "unknown command: '%s'"
msgstr ""
#: src/virsh.c:2084
#: src/virsh.c:2085
#, c-format
msgid "command '%s' doesn't support option --%s"
msgstr ""
#: src/virsh.c:2099
#: src/virsh.c:2100
#, c-format
msgid "expected syntax: --%s <%s>"
msgstr ""
#: src/virsh.c:2102
#: src/virsh.c:2103
msgid "number"
msgstr ""
#: src/virsh.c:2102
#: src/virsh.c:2103
msgid "string"
msgstr ""
#: src/virsh.c:2108
#: src/virsh.c:2109
#, c-format
msgid "unexpected data '%s'"
msgstr ""
#: src/virsh.c:2130
#: src/virsh.c:2131
msgid "OPTION"
msgstr ""
#: src/virsh.c:2130
#: src/virsh.c:2131
msgid "DATA"
msgstr ""
#: src/virsh.c:2178 src/virsh.c:2204
#: src/virsh.c:2179 src/virsh.c:2205
msgid "running"
msgstr ""
#: src/virsh.c:2180 src/virsh.c:2202
#: src/virsh.c:2181 src/virsh.c:2203
msgid "blocked"
msgstr ""
#: src/virsh.c:2182
#: src/virsh.c:2183
msgid "paused"
msgstr ""
#: src/virsh.c:2184
#: src/virsh.c:2185
msgid "in shutdown"
msgstr ""
#: src/virsh.c:2186
#: src/virsh.c:2187
msgid "shut off"
msgstr ""
#: src/virsh.c:2188
#: src/virsh.c:2189
msgid "crashed"
msgstr ""
#: src/virsh.c:2200
#: src/virsh.c:2201
msgid "offline"
msgstr ""
#: src/virsh.c:2219
#: src/virsh.c:2220
msgid "no valid connection"
msgstr ""
#: src/virsh.c:2258
#: src/virsh.c:2259
#, c-format
msgid "%s: error: "
msgstr ""
#: src/virsh.c:2260
#: src/virsh.c:2261
msgid "error: "
msgstr ""
#: src/virsh.c:2282 src/virsh.c:2294 src/virsh.c:2306
#: src/virsh.c:2283 src/virsh.c:2295 src/virsh.c:2307
#, c-format
msgid "%s: %d: failed to allocate %d bytes"
msgstr ""
#: src/virsh.c:2334
#: src/virsh.c:2335
msgid "failed to connect to the hypervisor"
msgstr ""
#: src/virsh.c:2479
#: src/virsh.c:2480
#, c-format
msgid ""
"\n"
@ -1286,7 +1298,7 @@ msgid ""
" commands (non interactive mode):\n"
msgstr ""
#: src/virsh.c:2495
#: src/virsh.c:2496
#, c-format
msgid ""
"\n"
@ -1294,19 +1306,19 @@ msgid ""
"\n"
msgstr ""
#: src/virsh.c:2581
#: src/virsh.c:2582
#, c-format
msgid "unsupported option '-%c'. See --help."
msgstr ""
#: src/virsh.c:2662
#: src/virsh.c:2663
#, c-format
msgid ""
"Welcome to %s, the virtualization interactive terminal.\n"
"\n"
msgstr ""
#: src/virsh.c:2665
#: src/virsh.c:2666
msgid ""
"Type: 'help' for help with commands\n"
" 'quit' to quit\n"
@ -1407,7 +1419,7 @@ msgstr ""
msgid "got asynchronous packet number %d\n"
msgstr ""
#: src/xen_internal.c:1241
#: src/xen_internal.c:1376
#, c-format
msgid "allocating %d domain info"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-09-21 17:03+0200\n"
"POT-Creation-Date: 2006-10-16 17:09+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -369,8 +369,8 @@ msgid "allocate new context"
msgstr ""
#: src/hash.c:628 src/hash.c:634 src/test.c:725 src/test.c:750 src/test.c:773
#: src/test.c:797 src/xend_internal.c:1864 src/xend_internal.c:2560
#: src/xend_internal.c:2768 src/xs_internal.c:592 src/proxy_internal.c:790
#: src/test.c:797 src/xend_internal.c:1911 src/xend_internal.c:2607
#: src/xend_internal.c:2818 src/xs_internal.c:592 src/proxy_internal.c:790
#: src/proxy_internal.c:837 src/proxy_internal.c:888
msgid "allocating domain"
msgstr ""
@ -491,7 +491,7 @@ msgstr ""
msgid "growing buffer"
msgstr ""
#: src/xml.c:116
#: src/xml.c:116 src/xend_internal.c:1602 src/xend_internal.c:1621
msgid "allocate new buffer"
msgstr ""
@ -535,638 +535,650 @@ msgstr ""
msgid "domain information incomplete, missing kernel"
msgstr ""
#: src/xend_internal.c:1564 src/xend_internal.c:1601
#: src/xend_internal.c:1581
msgid "domain information incomplete, vbd has no src"
msgstr ""
#: src/xend_internal.c:1587
msgid "domain information incomplete, vbd has no dev"
msgstr ""
#: src/xend_internal.c:1875
#: src/xend_internal.c:1595
msgid "cannot parse vbd filename, missing driver name"
msgstr ""
#: src/xend_internal.c:1614
msgid "cannot parse vbd filename, missing driver type"
msgstr ""
#: src/xend_internal.c:1922
msgid "failed to parse Xend domain information"
msgstr ""
#: src/xend_internal.c:2831
#: src/xend_internal.c:2882
#, c-format
msgid "Failed to create domain %s\n"
msgstr ""
#: src/xend_internal.c:2837
#: src/xend_internal.c:2888
#, c-format
msgid "Failed to get devices for domain %s\n"
msgstr ""
#: src/xend_internal.c:2848
#: src/xend_internal.c:2899
#, c-format
msgid "Failed to resume new domain %s\n"
msgstr ""
#: src/virsh.c:233
#: src/virsh.c:234
msgid "print help"
msgstr ""
#: src/virsh.c:234
#: src/virsh.c:235
msgid "Prints global help or command specific help."
msgstr ""
#: src/virsh.c:252
#: src/virsh.c:253
msgid ""
"Commands:\n"
"\n"
msgstr ""
#: src/virsh.c:266
#: src/virsh.c:267
msgid "(re)connect to hypervisor"
msgstr ""
#: src/virsh.c:268
#: src/virsh.c:269
msgid ""
"Connect to local hypervisor. This is built-in command after shell start up."
msgstr ""
#: src/virsh.c:273
#: src/virsh.c:274
msgid "hypervisor connection URI"
msgstr ""
#: src/virsh.c:274
#: src/virsh.c:275
msgid "read-only connection"
msgstr ""
#: src/virsh.c:286
#: src/virsh.c:287
msgid "Failed to disconnect from the hypervisor"
msgstr ""
#: src/virsh.c:302
#: src/virsh.c:303
msgid "Failed to connect to the hypervisor"
msgstr ""
#: src/virsh.c:312
#: src/virsh.c:313
msgid "list domains"
msgstr ""
#: src/virsh.c:313
#: src/virsh.c:314
msgid "Returns list of domains."
msgstr ""
#: src/virsh.c:318
#: src/virsh.c:319
msgid "list inactive domains"
msgstr ""
#: src/virsh.c:319
#: src/virsh.c:320
msgid "list inactive & active domains"
msgstr ""
#: src/virsh.c:357 src/virsh.c:364
#: src/virsh.c:358 src/virsh.c:365
msgid "Failed to list active domains"
msgstr ""
#: src/virsh.c:375 src/virsh.c:384
#: src/virsh.c:376 src/virsh.c:385
msgid "Failed to list inactive domains"
msgstr ""
#: src/virsh.c:394
#: src/virsh.c:395
msgid "Id"
msgstr ""
#: src/virsh.c:394
#: src/virsh.c:395
msgid "Name"
msgstr ""
#: src/virsh.c:394
#: src/virsh.c:395
msgid "State"
msgstr ""
#: src/virsh.c:411 src/virsh.c:2190 src/virsh.c:2206
#: src/virsh.c:412 src/virsh.c:2191 src/virsh.c:2207
msgid "no state"
msgstr ""
#: src/virsh.c:454
#: src/virsh.c:455
msgid "domain state"
msgstr ""
#: src/virsh.c:455
#: src/virsh.c:456
msgid "Returns state about a running domain."
msgstr ""
#: src/virsh.c:460 src/virsh.c:498 src/virsh.c:735 src/virsh.c:817
#: src/virsh.c:856 src/virsh.c:895 src/virsh.c:934 src/virsh.c:973
#: src/virsh.c:1045 src/virsh.c:1128 src/virsh.c:1214 src/virsh.c:1257
#: src/virsh.c:1300 src/virsh.c:1377
#: src/virsh.c:461 src/virsh.c:499 src/virsh.c:736 src/virsh.c:818
#: src/virsh.c:857 src/virsh.c:896 src/virsh.c:935 src/virsh.c:974
#: src/virsh.c:1046 src/virsh.c:1129 src/virsh.c:1215 src/virsh.c:1258
#: src/virsh.c:1301 src/virsh.c:1378
msgid "domain name, id or uuid"
msgstr ""
#: src/virsh.c:492
#: src/virsh.c:493
msgid "suspend a domain"
msgstr ""
#: src/virsh.c:493
#: src/virsh.c:494
msgid "Suspend a running domain."
msgstr ""
#: src/virsh.c:516
#: src/virsh.c:517
#, c-format
msgid "Domain %s suspended\n"
msgstr ""
#: src/virsh.c:518
#: src/virsh.c:519
#, c-format
msgid "Failed to suspend domain %s"
msgstr ""
#: src/virsh.c:531
#: src/virsh.c:532
msgid "create a domain from an XML file"
msgstr ""
#: src/virsh.c:532
#: src/virsh.c:533
msgid "Create a domain."
msgstr ""
#: src/virsh.c:537 src/virsh.c:592
#: src/virsh.c:538 src/virsh.c:593
msgid "file conatining an XML domain description"
msgstr ""
#: src/virsh.c:560 src/virsh.c:565 src/virsh.c:615 src/virsh.c:620
#: src/virsh.c:561 src/virsh.c:566 src/virsh.c:616 src/virsh.c:621
#, c-format
msgid "Failed to read description file %s"
msgstr ""
#: src/virsh.c:572
#: src/virsh.c:573
#, c-format
msgid "Domain %s created from %s\n"
msgstr ""
#: src/virsh.c:575
#: src/virsh.c:576
#, c-format
msgid "Failed to create domain from %s"
msgstr ""
#: src/virsh.c:586
#: src/virsh.c:587
msgid "define (but don't start) a domain from an XML file"
msgstr ""
#: src/virsh.c:587
#: src/virsh.c:588
msgid "Define a domain."
msgstr ""
#: src/virsh.c:627
#: src/virsh.c:628
#, c-format
msgid "Domain %s defined from %s\n"
msgstr ""
#: src/virsh.c:630
#: src/virsh.c:631
#, c-format
msgid "Failed to define domain from %s"
msgstr ""
#: src/virsh.c:641
#: src/virsh.c:642
msgid "undefine an inactive domain"
msgstr ""
#: src/virsh.c:642
#: src/virsh.c:643
msgid "Undefine the configuration for an inactive domain."
msgstr ""
#: src/virsh.c:647 src/virsh.c:1446
#: src/virsh.c:648 src/virsh.c:1447
msgid "domain name or uuid"
msgstr ""
#: src/virsh.c:665
#: src/virsh.c:666
#, c-format
msgid "Domain %s has been undefined\n"
msgstr ""
#: src/virsh.c:667
#: src/virsh.c:668
#, c-format
msgid "Failed to undefine domain %s"
msgstr ""
#: src/virsh.c:680
#: src/virsh.c:681
msgid "start a (previously defined) inactive domain"
msgstr ""
#: src/virsh.c:681
#: src/virsh.c:682
msgid "Start a domain."
msgstr ""
#: src/virsh.c:686
#: src/virsh.c:687
msgid "name of the inactive domain"
msgstr ""
#: src/virsh.c:710
#: src/virsh.c:711
msgid "Domain is already active"
msgstr ""
#: src/virsh.c:715
#: src/virsh.c:716
#, c-format
msgid "Domain %s started\n"
msgstr ""
#: src/virsh.c:718
#: src/virsh.c:719
#, c-format
msgid "Failed to start domain %s"
msgstr ""
#: src/virsh.c:729
#: src/virsh.c:730
msgid "save a domain state to a file"
msgstr ""
#: src/virsh.c:730
#: src/virsh.c:731
msgid "Save a running domain."
msgstr ""
#: src/virsh.c:736
#: src/virsh.c:737
msgid "where to save the data"
msgstr ""
#: src/virsh.c:758
#: src/virsh.c:759
#, c-format
msgid "Domain %s saved to %s\n"
msgstr ""
#: src/virsh.c:760
#: src/virsh.c:761
#, c-format
msgid "Failed to save domain %s to %s"
msgstr ""
#: src/virsh.c:773
#: src/virsh.c:774
msgid "restore a domain from a saved state in a file"
msgstr ""
#: src/virsh.c:774
#: src/virsh.c:775
msgid "Restore a domain."
msgstr ""
#: src/virsh.c:779
#: src/virsh.c:780
msgid "the state to restore"
msgstr ""
#: src/virsh.c:798
#: src/virsh.c:799
#, c-format
msgid "Domain restored from %s\n"
msgstr ""
#: src/virsh.c:800
#: src/virsh.c:801
#, c-format
msgid "Failed to restore domain from %s"
msgstr ""
#: src/virsh.c:811
#: src/virsh.c:812
msgid "resume a domain"
msgstr ""
#: src/virsh.c:812
#: src/virsh.c:813
msgid "Resume a previously suspended domain."
msgstr ""
#: src/virsh.c:835
#: src/virsh.c:836
#, c-format
msgid "Domain %s resumed\n"
msgstr ""
#: src/virsh.c:837
#: src/virsh.c:838
#, c-format
msgid "Failed to resume domain %s"
msgstr ""
#: src/virsh.c:850
#: src/virsh.c:851
msgid "gracefully shutdown a domain"
msgstr ""
#: src/virsh.c:851
#: src/virsh.c:852
msgid "Run shutdown in the target domain."
msgstr ""
#: src/virsh.c:874
#: src/virsh.c:875
#, c-format
msgid "Domain %s is being shutdown\n"
msgstr ""
#: src/virsh.c:876
#: src/virsh.c:877
#, c-format
msgid "Failed to shutdown domain %s"
msgstr ""
#: src/virsh.c:889
#: src/virsh.c:890
msgid "reboot a domain"
msgstr ""
#: src/virsh.c:890
#: src/virsh.c:891
msgid "Run a reboot command in the target domain."
msgstr ""
#: src/virsh.c:913
#: src/virsh.c:914
#, c-format
msgid "Domain %s is being rebooted\n"
msgstr ""
#: src/virsh.c:915
#: src/virsh.c:916
#, c-format
msgid "Failed to reboot domain %s"
msgstr ""
#: src/virsh.c:928
#: src/virsh.c:929
msgid "destroy a domain"
msgstr ""
#: src/virsh.c:929
#: src/virsh.c:930
msgid "Destroy a given domain."
msgstr ""
#: src/virsh.c:952
#: src/virsh.c:953
#, c-format
msgid "Domain %s destroyed\n"
msgstr ""
#: src/virsh.c:954
#: src/virsh.c:955
#, c-format
msgid "Failed to destroy domain %s"
msgstr ""
#: src/virsh.c:967
#: src/virsh.c:968
msgid "domain information"
msgstr ""
#: src/virsh.c:968
#: src/virsh.c:969
msgid "Returns basic information about the domain."
msgstr ""
#: src/virsh.c:994 src/virsh.c:996
#: src/virsh.c:995 src/virsh.c:997
msgid "Id:"
msgstr ""
#: src/virsh.c:997
#: src/virsh.c:998
msgid "Name:"
msgstr ""
#: src/virsh.c:1000
#: src/virsh.c:1001
msgid "UUID:"
msgstr ""
#: src/virsh.c:1003
#: src/virsh.c:1004
msgid "OS Type:"
msgstr ""
#: src/virsh.c:1008 src/virsh.c:1089
#: src/virsh.c:1009 src/virsh.c:1090
msgid "State:"
msgstr ""
#: src/virsh.c:1011 src/virsh.c:1355
#: src/virsh.c:1012 src/virsh.c:1356
msgid "CPU(s):"
msgstr ""
#: src/virsh.c:1018 src/virsh.c:1096
#: src/virsh.c:1019 src/virsh.c:1097
msgid "CPU time:"
msgstr ""
#: src/virsh.c:1021
#: src/virsh.c:1022
msgid "Max memory:"
msgstr ""
#: src/virsh.c:1023
#: src/virsh.c:1024
msgid "Used memory:"
msgstr ""
#: src/virsh.c:1039
#: src/virsh.c:1040
msgid "domain vcpu information"
msgstr ""
#: src/virsh.c:1040
#: src/virsh.c:1041
msgid "Returns basic information about the domain virtual CPUs."
msgstr ""
#: src/virsh.c:1087
#: src/virsh.c:1088
msgid "VCPU:"
msgstr ""
#: src/virsh.c:1088
#: src/virsh.c:1089
msgid "CPU:"
msgstr ""
#: src/virsh.c:1098
#: src/virsh.c:1099
msgid "CPU Affinity:"
msgstr ""
#: src/virsh.c:1122
#: src/virsh.c:1123
msgid "control domain vcpu affinity"
msgstr ""
#: src/virsh.c:1123
#: src/virsh.c:1124
msgid "Pin domain VCPUs to host physical CPUs."
msgstr ""
#: src/virsh.c:1129
#: src/virsh.c:1130
msgid "vcpu number"
msgstr ""
#: src/virsh.c:1130
#: src/virsh.c:1131
msgid "host cpu number(s) (comma separated)"
msgstr ""
#: src/virsh.c:1208
#: src/virsh.c:1209
msgid "change number of virtual CPUs"
msgstr ""
#: src/virsh.c:1209
#: src/virsh.c:1210
msgid "Change the number of virtual CPUs active in the guest domain."
msgstr ""
#: src/virsh.c:1215
#: src/virsh.c:1216
msgid "number of virtual CPUs"
msgstr ""
#: src/virsh.c:1251
#: src/virsh.c:1252
msgid "change memory allocation"
msgstr ""
#: src/virsh.c:1252
#: src/virsh.c:1253
msgid "Change the current memory allocation in the guest domain."
msgstr ""
#: src/virsh.c:1258
#: src/virsh.c:1259
msgid "number of bytes of memory"
msgstr ""
#: src/virsh.c:1294
#: src/virsh.c:1295
msgid "change maximum memory limit"
msgstr ""
#: src/virsh.c:1295
#: src/virsh.c:1296
msgid "Change the maximum memory allocation limit in the guest domain."
msgstr ""
#: src/virsh.c:1301
#: src/virsh.c:1302
msgid "maxmimum memory limit in bytes"
msgstr ""
#: src/virsh.c:1337
#: src/virsh.c:1338
msgid "node information"
msgstr ""
#: src/virsh.c:1338
#: src/virsh.c:1339
msgid "Returns basic information about the node."
msgstr ""
#: src/virsh.c:1351
#: src/virsh.c:1352
msgid "failed to get node information"
msgstr ""
#: src/virsh.c:1354
#: src/virsh.c:1355
msgid "CPU model:"
msgstr ""
#: src/virsh.c:1356
#: src/virsh.c:1357
msgid "CPU frequency:"
msgstr ""
#: src/virsh.c:1357
#: src/virsh.c:1358
msgid "CPU socket(s):"
msgstr ""
#: src/virsh.c:1358
#: src/virsh.c:1359
msgid "Core(s) per socket:"
msgstr ""
#: src/virsh.c:1359
#: src/virsh.c:1360
msgid "Thread(s) per core:"
msgstr ""
#: src/virsh.c:1360
#: src/virsh.c:1361
msgid "NUMA cell(s):"
msgstr ""
#: src/virsh.c:1361
#: src/virsh.c:1362
msgid "Memory size:"
msgstr ""
#: src/virsh.c:1371
#: src/virsh.c:1372
msgid "domain information in XML"
msgstr ""
#: src/virsh.c:1372
#: src/virsh.c:1373
msgid "Ouput the domain information as an XML dump to stdout."
msgstr ""
#: src/virsh.c:1411
#: src/virsh.c:1412
msgid "convert a domain id or UUID to domain name"
msgstr ""
#: src/virsh.c:1416
#: src/virsh.c:1417
msgid "domain id or uuid"
msgstr ""
#: src/virsh.c:1441
#: src/virsh.c:1442
msgid "convert a domain name or UUID to domain id"
msgstr ""
#: src/virsh.c:1476
#: src/virsh.c:1477
msgid "convert a domain name or id to domain UUID"
msgstr ""
#: src/virsh.c:1481
#: src/virsh.c:1482
msgid "domain id or name"
msgstr ""
#: src/virsh.c:1500
#: src/virsh.c:1501
msgid "failed to get domain UUID"
msgstr ""
#: src/virsh.c:1511
#: src/virsh.c:1512
msgid "show version"
msgstr ""
#: src/virsh.c:1512
#: src/virsh.c:1513
msgid "Display the system version information."
msgstr ""
#: src/virsh.c:1535
#: src/virsh.c:1536
msgid "failed to get hypervisor type"
msgstr ""
#: src/virsh.c:1544
#: src/virsh.c:1545
#, c-format
msgid "Compiled against library: libvir %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1549
#: src/virsh.c:1550
msgid "failed to get the library version"
msgstr ""
#: src/virsh.c:1556
#: src/virsh.c:1557
#, c-format
msgid "Using library: libvir %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1563
#: src/virsh.c:1564
#, c-format
msgid "Using API: %s %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1568
#: src/virsh.c:1569
msgid "failed to get the hypervisor version"
msgstr ""
#: src/virsh.c:1573
#: src/virsh.c:1574
#, c-format
msgid "Cannot extract running %s hypervisor version\n"
msgstr ""
#: src/virsh.c:1580
#: src/virsh.c:1581
#, c-format
msgid "Running hypervisor: %s %d.%d.%d\n"
msgstr ""
#: src/virsh.c:1591
#: src/virsh.c:1592
msgid "quit this interactive terminal"
msgstr ""
#: src/virsh.c:1703
#, c-format
msgid "command '%s' requires <%s> option"
msgstr ""
#: src/virsh.c:1704
#, c-format
msgid "command '%s' requires <%s> option"
msgstr ""
#: src/virsh.c:1705
#, c-format
msgid "command '%s' requires --%s option"
msgstr ""
#: src/virsh.c:1731
#: src/virsh.c:1732
#, c-format
msgid "command '%s' doesn't exist"
msgstr ""
#: src/virsh.c:1739
#: src/virsh.c:1740
msgid " NAME\n"
msgstr ""
#: src/virsh.c:1750
#: src/virsh.c:1751
msgid ""
"\n"
" DESCRIPTION\n"
msgstr ""
#: src/virsh.c:1754
#: src/virsh.c:1755
msgid ""
"\n"
" OPTIONS\n"
msgstr ""
#: src/virsh.c:1761
#: src/virsh.c:1762
#, c-format
msgid "--%s <number>"
msgstr ""
#: src/virsh.c:1763
#: src/virsh.c:1764
#, c-format
msgid "--%s <string>"
msgstr ""
#: src/virsh.c:1876
#: src/virsh.c:1877
msgid "undefined domain name or id"
msgstr ""
#: src/virsh.c:1909
#: src/virsh.c:1910
#, c-format
msgid "failed to get domain '%s'"
msgstr ""
#: src/virsh.c:1937
#: src/virsh.c:1938
#, c-format
msgid ""
"\n"
@ -1174,102 +1186,102 @@ msgid ""
"\n"
msgstr ""
#: src/virsh.c:2011
#: src/virsh.c:2012
msgid "missing \""
msgstr ""
#: src/virsh.c:2072
#: src/virsh.c:2073
#, c-format
msgid "unexpected token (command name): '%s'"
msgstr ""
#: src/virsh.c:2077
#: src/virsh.c:2078
#, c-format
msgid "unknown command: '%s'"
msgstr ""
#: src/virsh.c:2084
#: src/virsh.c:2085
#, c-format
msgid "command '%s' doesn't support option --%s"
msgstr ""
#: src/virsh.c:2099
#: src/virsh.c:2100
#, c-format
msgid "expected syntax: --%s <%s>"
msgstr ""
#: src/virsh.c:2102
#: src/virsh.c:2103
msgid "number"
msgstr ""
#: src/virsh.c:2102
#: src/virsh.c:2103
msgid "string"
msgstr ""
#: src/virsh.c:2108
#: src/virsh.c:2109
#, c-format
msgid "unexpected data '%s'"
msgstr ""
#: src/virsh.c:2130
#: src/virsh.c:2131
msgid "OPTION"
msgstr ""
#: src/virsh.c:2130
#: src/virsh.c:2131
msgid "DATA"
msgstr ""
#: src/virsh.c:2178 src/virsh.c:2204
#: src/virsh.c:2179 src/virsh.c:2205
msgid "running"
msgstr ""
#: src/virsh.c:2180 src/virsh.c:2202
#: src/virsh.c:2181 src/virsh.c:2203
msgid "blocked"
msgstr ""
#: src/virsh.c:2182
#: src/virsh.c:2183
msgid "paused"
msgstr ""
#: src/virsh.c:2184
#: src/virsh.c:2185
msgid "in shutdown"
msgstr ""
#: src/virsh.c:2186
#: src/virsh.c:2187
msgid "shut off"
msgstr ""
#: src/virsh.c:2188
#: src/virsh.c:2189
msgid "crashed"
msgstr ""
#: src/virsh.c:2200
#: src/virsh.c:2201
msgid "offline"
msgstr ""
#: src/virsh.c:2219
#: src/virsh.c:2220
msgid "no valid connection"
msgstr ""
#: src/virsh.c:2258
#: src/virsh.c:2259
#, c-format
msgid "%s: error: "
msgstr ""
#: src/virsh.c:2260
#: src/virsh.c:2261
msgid "error: "
msgstr ""
#: src/virsh.c:2282 src/virsh.c:2294 src/virsh.c:2306
#: src/virsh.c:2283 src/virsh.c:2295 src/virsh.c:2307
#, c-format
msgid "%s: %d: failed to allocate %d bytes"
msgstr ""
#: src/virsh.c:2334
#: src/virsh.c:2335
msgid "failed to connect to the hypervisor"
msgstr ""
#: src/virsh.c:2479
#: src/virsh.c:2480
#, c-format
msgid ""
"\n"
@ -1286,7 +1298,7 @@ msgid ""
" commands (non interactive mode):\n"
msgstr ""
#: src/virsh.c:2495
#: src/virsh.c:2496
#, c-format
msgid ""
"\n"
@ -1294,19 +1306,19 @@ msgid ""
"\n"
msgstr ""
#: src/virsh.c:2581
#: src/virsh.c:2582
#, c-format
msgid "unsupported option '-%c'. See --help."
msgstr ""
#: src/virsh.c:2662
#: src/virsh.c:2663
#, c-format
msgid ""
"Welcome to %s, the virtualization interactive terminal.\n"
"\n"
msgstr ""
#: src/virsh.c:2665
#: src/virsh.c:2666
msgid ""
"Type: 'help' for help with commands\n"
" 'quit' to quit\n"
@ -1407,7 +1419,7 @@ msgstr ""
msgid "got asynchronous packet number %d\n"
msgstr ""
#: src/xen_internal.c:1241
#: src/xen_internal.c:1376
#, c-format
msgid "allocating %d domain info"
msgstr ""

View File

@ -27,6 +27,7 @@
#include <sys/time.h>
#include <ctype.h>
#include <fcntl.h>
#include <locale.h>
#include <readline/readline.h>
#include <readline/history.h>

File diff suppressed because it is too large Load Diff

View File

@ -1260,7 +1260,6 @@ xend_get_node(virConnectPtr xend)
static int
xend_get_config_version(virConnectPtr conn) {
int ret = -1;
struct sexpr *root;
const char *value;
@ -1276,15 +1275,16 @@ xend_get_config_version(virConnectPtr conn) {
value = sexpr_node(root, "node/xend_config_format");
if (value) {
return strtol(value, NULL, 10);
} else {
/* Xen prior to 3.0.3 did not have the xend_config_format
field, and is implicitly version 1. */
return 1;
}
int version = strtol(value, NULL, 10);
sexpr_free(root);
return version;
}
sexpr_free(root);
return (ret);
/* Xen prior to 3.0.3 did not have the xend_config_format
field, and is implicitly version 1. */
return 1;
}
@ -1451,7 +1451,7 @@ xend_parse_sexp_desc_os(struct sexpr *node, virBufferPtr buf, int hvm)
/**
* xend_parse_sexp_desc:
* @domain: the domain associated with the XML
* @conn: the connection associated with the XML
* @root: the root of the parsed S-Expression
*
* Parse the xend sexp description and turn it into the XML format similar
@ -1487,7 +1487,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
tmp = sexpr_node(root, "domain/name");
if (tmp == NULL) {
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
_("domain information incomplete, missing name"));
goto error;
}
@ -1498,10 +1498,11 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
int i, j;
for (i = 0, j = 0;(i < 32) && (tmp[j] != 0);j++) {
if (((tmp[j] >= '0') && (tmp[j] <= '9')) ||
((tmp[j] >= 'a') && (tmp[j] <= 'f')))
compact[i++] = tmp[j];
else if ((tmp[j] >= 'A') && (tmp[j] <= 'F'))
((tmp[j] >= 'a') && (tmp[j] <= 'f'))) {
compact[i++] = tmp[j];
} else if ((tmp[j] >= 'A') && (tmp[j] <= 'F')) {
compact[i++] = tmp[j] + 'a' - 'A';
}
}
compact[i] = 0;
if (i > 0)
@ -1509,7 +1510,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
}
tmp = sexpr_node(root, "domain/bootloader");
if (tmp != NULL)
virBufferVSprintf(&buf, " <bootloader>%s</bootloader>\n", tmp);
virBufferVSprintf(&buf, " <bootloader>%s</bootloader>\n", tmp);
if (sexpr_lookup(root, "domain/image")) {
hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0;
@ -1522,13 +1523,13 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
sexpr_int(root, "domain/vcpus"));
tmp = sexpr_node(root, "domain/on_poweroff");
if (tmp != NULL)
virBufferVSprintf(&buf, " <on_poweroff>%s</on_poweroff>\n", tmp);
virBufferVSprintf(&buf, " <on_poweroff>%s</on_poweroff>\n", tmp);
tmp = sexpr_node(root, "domain/on_reboot");
if (tmp != NULL)
virBufferVSprintf(&buf, " <on_reboot>%s</on_reboot>\n", tmp);
virBufferVSprintf(&buf, " <on_reboot>%s</on_reboot>\n", tmp);
tmp = sexpr_node(root, "domain/on_crash");
if (tmp != NULL)
virBufferVSprintf(&buf, " <on_crash>%s</on_crash>\n", tmp);
virBufferVSprintf(&buf, " <on_crash>%s</on_crash>\n", tmp);
if (hvm) {
virBufferAdd(&buf, " <features>\n", 13);
@ -1546,105 +1547,150 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
/* in case of HVM we have devices emulation */
tmp = sexpr_node(root, "domain/image/hvm/device_model");
if ((tmp != NULL) && (tmp[0] != 0))
virBufferVSprintf(&buf, " <emulator>%s</emulator>\n", tmp);
virBufferVSprintf(&buf, " <emulator>%s</emulator>\n", tmp);
for (cur = root; cur->kind == SEXPR_CONS; cur = cur->cdr) {
node = cur->car;
if (sexpr_lookup(node, "device/vbd")) {
tmp = sexpr_node(node, "device/vbd/uname");
if (tmp == NULL)
continue;
if (!memcmp(tmp, "file:", 5)) {
int cdrom = 0;
const char *src = tmp+5;
const char *dst = sexpr_node(node, "device/vbd/dev");
/* Normally disks are in a (device (vbd ...)) block
but blktap disks ended up in a differently named
(device (tap ....)) block.... */
if (sexpr_lookup(node, "device/vbd") ||
sexpr_lookup(node, "device/tap")) {
char *offset;
int isBlock = 0;
int cdrom = 0;
char *drvName = NULL;
char *drvType = NULL;
const char *src = NULL;
const char *dst = NULL;
const char *mode = NULL;
if (dst == NULL) {
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
_("domain information incomplete, vbd has no dev"));
goto error;
}
if (!strncmp(dst, "ioemu:", 6))
dst += 6;
/* New style disk config from Xen >= 3.0.3 */
if (xendConfigVersion > 1) {
char *offset = rindex(dst, ':');
if (offset) {
if (!strcmp(offset, ":cdrom")) {
cdrom = 1;
} else if (!strcmp(offset, ":disk")) {
/* defualt anyway */
} else {
/* Unknown, lets pretend its a disk */
}
offset[0] = '\0';
}
}
virBufferVSprintf(&buf, " <disk type='file' device='%s'>\n", cdrom ? "cdrom" : "disk");
virBufferVSprintf(&buf, " <source file='%s'/>\n", src);
virBufferVSprintf(&buf, " <target dev='%s'/>\n", dst);
tmp = sexpr_node(node, "device/vbd/mode");
/* XXX should we force mode == r, if cdrom==1, or assume
xend has already done this ? */
if ((tmp != NULL) && (!strcmp(tmp, "r")))
virBufferVSprintf(&buf, " <readonly/>\n");
virBufferAdd(&buf, " </disk>\n", 12);
} else if (!memcmp(tmp, "phy:", 4)) {
int cdrom = 0;
const char *src = tmp+4;
const char *dst = sexpr_node(node, "device/vbd/dev");
if (dst == NULL) {
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
_("domain information incomplete, vbd has no dev"));
goto error;
}
if (!strncmp(dst, "ioemu:", 6))
dst += 6;
/* New style cdrom config from Xen >= 3.0.3 */
if (xendConfigVersion > 1) {
char *offset = rindex(dst, ':');
if (offset) {
if (!strcmp(offset, ":cdrom")) {
cdrom = 1;
} else if (!strcmp(offset, ":disk")) {
/* defualt anyway */
} else {
/* Unknown, lets pretend its a disk */
}
offset[0] = '\0';
}
}
virBufferVSprintf(&buf, " <disk type='block' device='%s'>\n", cdrom ? "cdrom" : "disk");
virBufferVSprintf(&buf, " <source dev='%s'/>\n", src);
virBufferVSprintf(&buf, " <target dev='%s'/>\n", dst);
tmp = sexpr_node(node, "device/vbd/mode");
/* XXX should we force mode == r, if cdrom==1, or assume
xend has already done this ? */
if ((tmp != NULL) && (!strcmp(tmp, "r")))
virBufferVSprintf(&buf, " <readonly/>\n");
virBufferAdd(&buf, " </disk>\n", 12);
/* Again dealing with (vbd...) vs (tap ...) differences */
if (sexpr_lookup(node, "device/vbd")) {
src = sexpr_node(node, "device/vbd/uname");
dst = sexpr_node(node, "device/vbd/dev");
mode = sexpr_node(node, "device/vbd/mode");
} else {
char serial[1000];
src = sexpr_node(node, "device/tap/uname");
dst = sexpr_node(node, "device/tap/dev");
mode = sexpr_node(node, "device/tap/mode");
}
TODO sexpr2string(node, serial, 1000);
virBufferVSprintf(&buf, "<!-- Failed to parse %s -->\n",
serial);
TODO}
if (src == NULL) {
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
_("domain information incomplete, vbd has no src"));
goto bad_parse;
}
if (dst == NULL) {
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
_("domain information incomplete, vbd has no dev"));
goto bad_parse;
}
offset = strchr(src, ':');
if (!offset) {
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
_("cannot parse vbd filename, missing driver name"));
goto bad_parse;
}
drvName = malloc((offset-src)+1);
if (!drvName) {
virXendError(conn, VIR_ERR_NO_MEMORY,
_("allocate new buffer"));
goto bad_parse;
}
strncpy(drvName, src, (offset-src));
drvName[offset-src] = '\0';
src = offset + 1;
if (!strcmp(drvName, "tap")) {
offset = strchr(src, ':');
if (!offset) {
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
_("cannot parse vbd filename, missing driver type"));
goto bad_parse;
}
drvType = malloc((offset-src)+1);
if (!drvType) {
virXendError(conn, VIR_ERR_NO_MEMORY,
_("allocate new buffer"));
goto bad_parse;
}
strncpy(drvType, src, (offset-src));
drvType[offset-src] = '\0';
src = offset + 1;
/* Its possible to use blktap driver for block devs
too, but kinda pointless because blkback is better,
so we assume common case here. If blktap becomes
omnipotent, we can revisit this, perhaps stat()'ing
the src file in question */
isBlock = 0;
} else if (!strcmp(drvName, "phy")) {
isBlock = 1;
} else if (!strcmp(drvName, "file")) {
isBlock = 0;
}
if (!strncmp(dst, "ioemu:", 6))
dst += 6;
/* New style disk config from Xen >= 3.0.3 */
if (xendConfigVersion > 1) {
offset = rindex(dst, ':');
if (offset) {
if (!strcmp(offset, ":cdrom")) {
cdrom = 1;
} else if (!strcmp(offset, ":disk")) {
/* The default anyway */
} else {
/* Unknown, lets pretend its a disk too */
}
offset[0] = '\0';
}
}
virBufferVSprintf(&buf, " <disk type='%s' device='%s'>\n",
isBlock ? "block" : "file",
cdrom ? "cdrom" : "disk");
if (drvType) {
virBufferVSprintf(&buf, " <driver name='%s' type='%s'/>\n", drvName, drvType);
} else {
virBufferVSprintf(&buf, " <driver name='%s'/>\n", drvName);
}
if (isBlock) {
virBufferVSprintf(&buf, " <source dev='%s'/>\n", src);
} else {
virBufferVSprintf(&buf, " <source file='%s'/>\n", src);
}
virBufferVSprintf(&buf, " <target dev='%s'/>\n", dst);
/* XXX should we force mode == r, if cdrom==1, or assume
xend has already done this ? */
if ((mode != NULL) && (!strcmp(mode, "r")))
virBufferVSprintf(&buf, " <readonly/>\n");
virBufferAdd(&buf, " </disk>\n", 12);
bad_parse:
if (drvName)
free(drvName);
if (drvType)
free(drvType);
} else if (sexpr_lookup(node, "device/vif")) {
const char *tmp2;
const char *tmp2;
tmp = sexpr_node(node, "device/vif/bridge");
tmp2 = sexpr_node(node, "device/vif/script");
tmp2 = sexpr_node(node, "device/vif/script");
if ((tmp != NULL) || (strstr(tmp2, "bridge"))) {
virBufferVSprintf(&buf, " <interface type='bridge'>\n");
if (tmp != NULL)
virBufferVSprintf(&buf, " <source bridge='%s'/>\n",
tmp);
if (tmp != NULL)
virBufferVSprintf(&buf, " <source bridge='%s'/>\n",
tmp);
tmp = sexpr_node(node, "device/vif/vifname");
if (tmp != NULL)
virBufferVSprintf(&buf, " <target dev='%s'/>\n",
@ -1688,10 +1734,11 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
}
/* Old style cdrom config from Xen <= 3.0.2 */
if (xendConfigVersion == 1) {
if (xendConfigVersion == 1) {
tmp = sexpr_node(root, "domain/image/hvm/cdrom");
if ((tmp != NULL) && (tmp[0] != 0)) {
virBufferAdd(&buf, " <disk type='file' device='cdrom'>\n", 38);
virBufferAdd(&buf, " <driver name='file'/>\n", 28);
virBufferVSprintf(&buf, " <source file='%s'/>\n", tmp);
virBufferAdd(&buf, " <target dev='hdc'/>\n", 26);
virBufferAdd(&buf, " <readonly/>\n", 18);
@ -1699,24 +1746,24 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
}
}
}
/* Graphics device */
tmp = sexpr_fmt_node(root, "domain/image/%s/vnc", hvm ? "hvm" : "linux");
if (tmp != NULL) {
if (tmp[0] == '1') {
int port = xenStoreDomainGetVNCPort(conn, domid);
if (port == -1)
if (port == -1)
port = 5900 + domid;
virBufferVSprintf(&buf, " <graphics type='vnc' port='%d'/>\n", port);
}
}
tmp = sexpr_fmt_node(root, "domain/image/%s/sdl", hvm ? "hvm" : "linux");
if (tmp != NULL) {
if (tmp[0] == '1')
virBufferAdd(&buf, " <graphics type='sdl'/>\n", 27 );
}
tty = xenStoreDomainGetConsolePath(conn, domid);
if (tty) {
virBufferVSprintf(&buf, " <console tty='%s'/>\n", tty);
@ -2653,7 +2700,7 @@ xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
*/
int
xenDaemonDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
unsigned char *cpumaps, int maplen)
unsigned char *cpumaps, int maplen)
{
struct sexpr *root, *s, *t;
virVcpuInfoPtr ipt = info;
@ -2662,14 +2709,14 @@ xenDaemonDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
int vcpu, cpu;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)
|| (info == NULL) || (maxinfo < 1)) {
|| (info == NULL) || (maxinfo < 1)) {
virXendError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
__FUNCTION__);
__FUNCTION__);
return (-1);
}
if (cpumaps != NULL && maplen < 1) {
virXendError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
__FUNCTION__);
__FUNCTION__);
return (-1);
}
root = sexpr_get(domain->conn, "/xend/domain/%s?op=vcpuinfo", domain->name);
@ -2677,46 +2724,49 @@ xenDaemonDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
return (-1);
if (cpumaps != NULL)
memset(cpumaps, 0, maxinfo * maplen);
memset(cpumaps, 0, maxinfo * maplen);
/* scan the sexprs from "(vcpu (number x)...)" and get parameter values */
for (s = root; s->kind == SEXPR_CONS; s = s->cdr)
if ((s->car->kind == SEXPR_CONS) &&
(s->car->car->kind == SEXPR_VALUE) &&
!strcmp(s->car->car->value, "vcpu")) {
t = s->car;
vcpu = ipt->number = sexpr_int(t, "vcpu/number");
if ((oln = sexpr_int(t, "vcpu/online")) != 0) {
if (sexpr_int(t, "vcpu/running")) ipt->state = VIR_VCPU_RUNNING;
if (sexpr_int(t, "vcpu/blocked")) ipt->state = VIR_VCPU_BLOCKED;
}
else ipt->state = VIR_VCPU_OFFLINE;
ipt->cpuTime = sexpr_float(t, "vcpu/cpu_time") * 1000000000;
ipt->cpu = oln ? sexpr_int(t, "vcpu/cpu") : -1;
if (cpumaps != NULL && vcpu >= 0 && vcpu < maxinfo) {
cpumap = (unsigned char *) VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
/*
* get sexpr from "(cpumap (x y z...))" and convert values
* to bitmap
*/
for (t = t->cdr; t->kind == SEXPR_CONS; t = t->cdr)
if ((t->car->kind == SEXPR_CONS) &&
(t->car->car->kind == SEXPR_VALUE) &&
!strcmp(t->car->car->value, "cpumap") &&
(t->car->cdr->kind == SEXPR_CONS)) {
for (t = t->car->cdr->car; t->kind == SEXPR_CONS; t = t->cdr)
if (t->car->kind == SEXPR_VALUE) {
cpu = strtol(t->car->value, NULL, 0);
if (cpu >= 0)
VIR_USE_CPU(cpumap, cpu);
}
break;
for (s = root; s->kind == SEXPR_CONS; s = s->cdr) {
if ((s->car->kind == SEXPR_CONS) &&
(s->car->car->kind == SEXPR_VALUE) &&
!strcmp(s->car->car->value, "vcpu")) {
t = s->car;
vcpu = ipt->number = sexpr_int(t, "vcpu/number");
if ((oln = sexpr_int(t, "vcpu/online")) != 0) {
if (sexpr_int(t, "vcpu/running")) ipt->state = VIR_VCPU_RUNNING;
if (sexpr_int(t, "vcpu/blocked")) ipt->state = VIR_VCPU_BLOCKED;
}
}
else
ipt->state = VIR_VCPU_OFFLINE;
ipt->cpuTime = sexpr_float(t, "vcpu/cpu_time") * 1000000000;
ipt->cpu = oln ? sexpr_int(t, "vcpu/cpu") : -1;
if (++nbinfo == maxinfo) break;
ipt++;
if (cpumaps != NULL && vcpu >= 0 && vcpu < maxinfo) {
cpumap = (unsigned char *) VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
/*
* get sexpr from "(cpumap (x y z...))" and convert values
* to bitmap
*/
for (t = t->cdr; t->kind == SEXPR_CONS; t = t->cdr)
if ((t->car->kind == SEXPR_CONS) &&
(t->car->car->kind == SEXPR_VALUE) &&
!strcmp(t->car->car->value, "cpumap") &&
(t->car->cdr->kind == SEXPR_CONS)) {
for (t = t->car->cdr->car; t->kind == SEXPR_CONS; t = t->cdr)
if (t->car->kind == SEXPR_VALUE) {
cpu = strtol(t->car->value, NULL, 0);
if (cpu >= 0 && (VIR_CPU_MAPLEN(cpu+1) <= maplen)) {
VIR_USE_CPU(cpumap, cpu);
}
}
break;
}
}
if (++nbinfo == maxinfo) break;
ipt++;
}
}
sexpr_free(root);
return(nbinfo);
@ -2817,6 +2867,7 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
sexpr = virDomainParseXMLDesc(xmlDesc, &name, xendConfigVersion);
if ((sexpr == NULL) || (name == NULL)) {
virXendError(conn, VIR_ERR_XML_ERROR, "Failed to parse the XML domain description");
if (sexpr != NULL)
free(sexpr);
if (name != NULL)

118
src/xml.c
View File

@ -598,18 +598,16 @@ static int virDomainParseXMLGraphicsDesc(xmlNodePtr node, virBufferPtr buf, int
//virBufferAdd(buf, "(xauthority /root/.Xauthority)", 30);
}
else if (xmlStrEqual(graphics_type, BAD_CAST "vnc")) {
xmlChar *vncport = NULL;
long port;
virBufferAdd(buf, "(vnc 1)", 7);
if (xendConfigVersion >= 2) {
vncport = xmlGetProp(node, BAD_CAST "port");
xmlChar *vncport = xmlGetProp(node, BAD_CAST "port");
if (vncport != NULL) {
port = strtol((const char *)vncport, NULL, 10);
long port = strtol((const char *)vncport, NULL, 10);
if (port == -1)
virBufferAdd(buf, "(vncunused 1)", 13);
else if (port > 5900)
virBufferVSprintf(buf, "(vncdisplay %d)", port - 5900);
xmlFree(vncport);
}
}
}
@ -638,9 +636,9 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
{
xmlXPathObjectPtr obj = NULL;
xmlNodePtr cur, txt;
const xmlChar *type = NULL;
const xmlChar *loader = NULL;
const xmlChar *boot_dev = NULL;
xmlChar *type = NULL;
xmlChar *loader = NULL;
xmlChar *boot_dev = NULL;
int res;
cur = node->children;
@ -720,9 +718,12 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='floppy' and target/@dev='fdb']/source", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
xmlChar *fdfile = NULL;
cur = obj->nodesetval->nodeTab[0];
fdfile = xmlGetProp(cur, BAD_CAST "file");
virBufferVSprintf(buf, "(fdb '%s')",
(const char *) xmlGetProp(cur, BAD_CAST "file"));
(const char *) fdfile);
xmlFree(fdfile);
cur = NULL;
}
if (obj) {
@ -737,9 +738,12 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='cdrom' and target/@dev='hdc']/source", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
xmlChar *cdfile = NULL;
cur = obj->nodesetval->nodeTab[0];
cdfile = xmlGetProp(cur, BAD_CAST "file");
virBufferVSprintf(buf, "(cdrom '%s')",
(const char *) xmlGetProp(cur, BAD_CAST "file"));
(const char *)cdfile);
xmlFree(cdfile);
cur = NULL;
}
if (obj) {
@ -750,25 +754,26 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
obj = xmlXPathEval(BAD_CAST "/domain/features/acpi", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
virBufferAdd(buf, "(acpi 1)", 8);
xmlXPathFreeObject(obj);
obj = NULL;
}
if (obj)
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "/domain/features/apic", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
virBufferAdd(buf, "(apic 1)", 8);
xmlXPathFreeObject(obj);
obj = NULL;
}
if (obj)
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "/domain/features/pae", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
virBufferAdd(buf, "(pae 1)", 7);
xmlXPathFreeObject(obj);
obj = NULL;
}
if (obj)
xmlXPathFreeObject(obj);
obj = NULL;
}
obj = xmlXPathEval(BAD_CAST "count(domain/devices/console) > 0", ctxt);
@ -795,8 +800,13 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
virBufferAdd(buf, "))", 2);
if (boot_dev)
xmlFree(boot_dev);
return (0);
error:
if (boot_dev)
xmlFree(boot_dev);
if (obj != NULL)
xmlXPathFreeObject(obj);
return(-1);
@ -921,6 +931,8 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendCo
xmlChar *device = NULL;
xmlChar *source = NULL;
xmlChar *target = NULL;
xmlChar *drvName = NULL;
xmlChar *drvType = NULL;
int ro = 0;
int typ = 0;
int cdrom = 0;
@ -934,7 +946,7 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendCo
xmlFree(type);
}
device = xmlGetProp(node, BAD_CAST "device");
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
@ -948,6 +960,11 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendCo
} else if ((target == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "target"))) {
target = xmlGetProp(cur, BAD_CAST "dev");
} else if ((drvName == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "driver"))) {
drvName = xmlGetProp(cur, BAD_CAST "name");
if (drvName && !strcmp((const char *)drvName, "tap"))
drvType = xmlGetProp(cur, BAD_CAST "type");
} else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
ro = 1;
}
@ -960,37 +977,48 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendCo
if (target != NULL)
xmlFree(target);
if (device != NULL)
xmlFree(device);
return (-1);
}
if (target == NULL) {
virXMLError(VIR_ERR_NO_TARGET, (const char *) source, 0);
if (source != NULL)
xmlFree(source);
if (device != NULL)
xmlFree(device);
return (-1);
}
/* Xend (all versions) put the floppy device config
* under the hvm (image (os)) block
*/
if (hvm &&
if (hvm &&
device &&
!strcmp((const char *)device, "floppy")) {
return 0;
goto cleanup;
}
/* Xend <= 3.0.2 doesn't include cdrom config here */
if (hvm &&
if (hvm &&
device &&
!strcmp((const char *)device, "cdrom")) {
if (xendConfigVersion == 1)
return 0;
goto cleanup;
else
cdrom = 1;
}
virBufferAdd(buf, "(device ", 8);
virBufferAdd(buf, "(vbd ", 5);
/* Normally disks are in a (device (vbd ...)) block
but blktap disks ended up in a differently named
(device (tap ....)) block.... */
if (drvName && !strcmp((const char *)drvName, "tap")) {
virBufferAdd(buf, "(tap ", 5);
} else {
virBufferAdd(buf, "(vbd ", 5);
}
if (hvm) {
char *tmp = (char *)target;
@ -1000,19 +1028,32 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendCo
/* Xend <= 3.0.2 wants a ioemu: prefix on devices for HVM */
if (xendConfigVersion == 1)
virBufferVSprintf(buf, "(dev 'ioemu:%s')", (const char *) tmp);
virBufferVSprintf(buf, "(dev 'ioemu:%s')", (const char *)tmp);
else /* But newer does not */
virBufferVSprintf(buf, "(dev '%s%s')", (const char *) tmp, cdrom ? ":cdrom" : ":disk");
virBufferVSprintf(buf, "(dev '%s%s')", (const char *)tmp, cdrom ? ":cdrom" : ":disk");
} else
virBufferVSprintf(buf, "(dev '%s')", (const char *) target);
virBufferVSprintf(buf, "(dev '%s')", (const char *)target);
if (typ == 0)
virBufferVSprintf(buf, "(uname 'file:%s')", source);
else if (typ == 1) {
if (source[0] == '/')
virBufferVSprintf(buf, "(uname 'phy:%s')", source);
else
virBufferVSprintf(buf, "(uname 'phy:/dev/%s')", source);
if (drvName) {
if (!strcmp((const char *)drvName, "tap")) {
virBufferVSprintf(buf, "(uname '%s:%s:%s')",
(const char *)drvName,
(drvType ? (const char *)drvType : "aio"),
(const char *)source);
} else {
virBufferVSprintf(buf, "(uname '%s:%s')",
(const char *)drvName,
(const char *)source);
}
} else {
if (typ == 0)
virBufferVSprintf(buf, "(uname 'file:%s')", source);
else if (typ == 1) {
if (source[0] == '/')
virBufferVSprintf(buf, "(uname 'phy:%s')", source);
else
virBufferVSprintf(buf, "(uname 'phy:/dev/%s')", source);
}
}
if (ro == 0)
virBufferVSprintf(buf, "(mode 'w')");
@ -1021,6 +1062,11 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendCo
virBufferAdd(buf, ")", 1);
virBufferAdd(buf, ")", 1);
cleanup:
xmlFree(drvType);
xmlFree(drvName);
xmlFree(device);
xmlFree(target);
xmlFree(source);
return (0);
@ -1302,6 +1348,8 @@ virDomainParseXMLDesc(const char *xmldesc, char **name, int xendConfigVersion)
if (name != NULL)
*name = nam;
else
free(nam);
return (ret);

View File

@ -25,7 +25,7 @@ noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
TESTS = xml2sexprtest sexpr2xmltest virshtest test_conf.sh reconnect
valgrind:
$(MAKE) check TESTS_ENVIRONMENT="valgrind --quiet"
$(MAKE) check TESTS_ENVIRONMENT="valgrind --quiet --leak-check=full"
# Note: xmlrpc.[c|h] is not in libvirt yet
xmlrpctest_SOURCES = \

View File

@ -0,0 +1,2 @@
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))

View File

@ -0,0 +1,22 @@
<domain type='xen' id='6'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/MainVG/GuestVG'/>
<target dev='xvda'/>
</disk>
</devices>
</domain>

View File

@ -0,0 +1,2 @@
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:qcow:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,22 @@
<domain type='xen' id='6'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap' type='qcow'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
</devices>
</domain>

View File

@ -0,0 +1,2 @@
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,22 @@
<domain type='xen' id='6'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap' type='aio'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
</devices>
</domain>

View File

@ -0,0 +1,2 @@
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,22 @@
<domain type='xen' id='6'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
</devices>
</domain>

View File

@ -17,11 +17,13 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/foo.img'/>
<target dev='hda'/>
</disk>

View File

@ -17,6 +17,7 @@
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/foo.img'/>
<target dev='hda'/>
</disk>
@ -26,6 +27,7 @@
<script path='vif-bridge'/>
</interface>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/boot.iso'/>
<target dev='hdc'/>
<readonly/>

View File

@ -14,6 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>

View File

@ -1,4 +1,3 @@
#include <stdio.h>
#include <string.h>
@ -17,24 +16,30 @@ static int testCompareFiles(const char *xml, const char *sexpr, int xendConfigVe
char *gotxml = NULL;
char *xmlPtr = &(xmlData[0]);
char *sexprPtr = &(sexprData[0]);
int ret = -1;
if (virtTestLoadFile(xml, &xmlPtr, MAX_FILE) < 0)
return -1;
goto fail;
if (virtTestLoadFile(sexpr, &sexprPtr, MAX_FILE) < 0)
return -1;
goto fail;
if (!(gotxml = xend_parse_domain_sexp(NULL, sexprData, xendConfigVersion)))
return -1;
goto fail;
if (getenv("DEBUG_TESTS")) {
printf("Expect %d '%s'\n", (int)strlen(xmlData), xmlData);
printf("Actual %d '%s'\n", (int)strlen(gotxml), gotxml);
}
if (strcmp(xmlData, gotxml))
return -1;
goto fail;
return 0;
ret = 0;
fail:
free(gotxml);
return ret;
}
static int testComparePVversion1(void *data ATTRIBUTE_UNUSED) {
@ -61,33 +66,74 @@ static int testCompareFVversion2(void *data ATTRIBUTE_UNUSED) {
2);
}
static int testCompareDiskFile(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-file.xml",
"sexpr2xmldata/sexpr2xml-disk-file.sexpr",
1);
}
static int testCompareDiskBlock(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-block.xml",
"sexpr2xmldata/sexpr2xml-disk-block.sexpr",
1);
}
static int testCompareDiskDrvBlktapQcow(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml",
"sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr",
1);
}
static int testCompareDiskDrvBlktapRaw(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml",
"sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr",
1);
}
int
main(int argc, char **argv)
{
int ret = 0;
progname = argv[0];
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", progname);
exit(EXIT_FAILURE);
fprintf(stderr, "Usage: %s\n", progname);
exit(EXIT_FAILURE);
}
if (virtTestRun("SEXPR-2-XML PV config (version 1)",
if (virtTestRun("SEXPR-2-XML PV config (version 1)",
1, testComparePVversion1, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("SEXPR-2-XML FV config (version 1)",
if (virtTestRun("SEXPR-2-XML FV config (version 1)",
1, testCompareFVversion1, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("SEXPR-2-XML PV config (version 2)",
if (virtTestRun("SEXPR-2-XML PV config (version 2)",
1, testComparePVversion2, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("SEXPR-2-XML FV config (version 2)",
if (virtTestRun("SEXPR-2-XML FV config (version 2)",
1, testCompareFVversion2, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("SEXPR-2-XML Disk File config",
1, testCompareDiskFile, NULL) != 0)
ret = -1;
if (virtTestRun("SEXPR-2-XML Disk Block config",
1, testCompareDiskBlock, NULL) != 0)
ret = -1;
if (virtTestRun("SEXPR-2-XML Disk Driver blktap qcow config",
1, testCompareDiskDrvBlktapQcow, NULL) != 0)
ret = -1;
if (virtTestRun("SEXPR-2-XML Disk Driver blktap raw config",
1, testCompareDiskDrvBlktapRaw, NULL) != 0)
ret = -1;
exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))

View File

@ -0,0 +1,23 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<source dev='/dev/MainVG/GuestLV'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))

View File

@ -0,0 +1,24 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name="phy"/>
<source dev='/dev/MainVG/GuestLV'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:qcow:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,24 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name="tap" type="qcow"/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,24 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name="tap" type="aio"/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,24 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name="tap"/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,24 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name="file"/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -0,0 +1 @@
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))

View File

@ -0,0 +1,23 @@
<domain type='xen' id='15'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<console tty='/dev/pts/4'/>
</devices>
</domain>

View File

@ -1,4 +1,3 @@
#include <stdio.h>
#include <string.h>
@ -17,27 +16,35 @@ static int testCompareFiles(const char *xml, const char *sexpr, const char *name
char *gotsexpr = NULL;
char *xmlPtr = &(xmlData[0]);
char *sexprPtr = &(sexprData[0]);
int ret = -1;
if (virtTestLoadFile(xml, &xmlPtr, MAX_FILE) < 0)
return -1;
goto fail;
if (virtTestLoadFile(sexpr, &sexprPtr, MAX_FILE) < 0)
return -1;
goto fail;
if (!(gotsexpr = virDomainParseXMLDesc(xmlData, &gotname, xendConfigVersion)))
return -1;
if (!(gotsexpr = virDomainParseXMLDesc(xmlData, &gotname, xendConfigVersion)))
goto fail;
if (getenv("DEBUG_TESTS")) {
printf("Expect %d '%s'\n", (int)strlen(sexprData), sexprData);
printf("Actual %d '%s'\n", (int)strlen(gotsexpr), gotsexpr);
}
if (strcmp(sexprData, gotsexpr))
return -1;
goto fail;
if (strcmp(name, gotname))
return -1;
goto fail;
return 0;
ret = 0;
fail:
free(gotname);
free(gotsexpr);
return ret;
}
static int testComparePVversion1(void *data ATTRIBUTE_UNUSED) {
@ -70,42 +77,120 @@ static int testCompareFVversion2(void *data ATTRIBUTE_UNUSED) {
static int testCompareFVversion2VNC(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-fv-vncunused.xml",
"xml2sexprdata/xml2sexpr-fv-vncunused.sexpr",
"fvtest",
2);
"xml2sexprdata/xml2sexpr-fv-vncunused.sexpr",
"fvtest",
2);
}
static int testCompareDiskFile(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-file.xml",
"xml2sexprdata/xml2sexpr-disk-file.sexpr",
"pvtest",
2);
}
static int testCompareDiskBlock(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-block.xml",
"xml2sexprdata/xml2sexpr-disk-block.sexpr",
"pvtest",
2);
}
static int testCompareDiskDrvLoop(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-drv-loop.xml",
"xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr",
"pvtest",
2);
}
static int testCompareDiskDrvBlkback(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-drv-blkback.xml",
"xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr",
"pvtest",
2);
}
static int testCompareDiskDrvBlktap(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-drv-blktap.xml",
"xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr",
"pvtest",
2);
}
static int testCompareDiskDrvBlktapQcow(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.xml",
"xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr",
"pvtest",
2);
}
static int testCompareDiskDrvBlktapRaw(void *data ATTRIBUTE_UNUSED) {
return testCompareFiles("xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.xml",
"xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr",
"pvtest",
2);
}
int
main(int argc, char **argv)
{
int ret = 0;
progname = argv[0];
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", progname);
exit(EXIT_FAILURE);
}
if (virtTestRun("XML-2-SEXPR PV config (format 1)",
1, testComparePVversion1, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR FV config (format 1)",
progname = argv[0];
if (argc > 1) {
fprintf(stderr, "Usage: %s\n", progname);
exit(EXIT_FAILURE);
}
if (virtTestRun("XML-2-SEXPR PV config (format 1)",
1, testComparePVversion1, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR FV config (format 1)",
1, testCompareFVversion1, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("XML-2-SEXPR PV config (format 2)",
1, testComparePVversion2, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("XML-2-SEXPR FV config (format 2)",
if (virtTestRun("XML-2-SEXPR FV config (format 2)",
1, testCompareFVversion2, NULL) != 0)
ret = -1;
ret = -1;
if (virtTestRun("XML-2-SEXPR FV config (format 2, VNC unused)",
1, testCompareFVversion2VNC, NULL) != 0)
ret = -1;
1, testCompareFVversion2VNC, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk File",
1, testCompareDiskFile, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk Block",
1, testCompareDiskBlock, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk Drv Loop",
1, testCompareDiskDrvLoop, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk Drv Blkback",
1, testCompareDiskDrvBlkback, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk Drv Blktap",
1, testCompareDiskDrvBlktap, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk Drv Blktap QCow",
1, testCompareDiskDrvBlktapQcow, NULL) != 0)
ret = -1;
if (virtTestRun("XML-2-SEXPR Disk Drv Blktap Raw",
1, testCompareDiskDrvBlktapRaw, NULL) != 0)
ret = -1;
exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

14
virsh.1
View File

@ -139,7 +139,7 @@ virsh <subcommand> [args]
.IX Header "DESCRIPTION"
The \fBvirsh\fR program is the main interface for managing virsh guest
domains. The program can be used to create, suspend, resume, save, and shutdown
domains. It can also be used to list current domains. Libvirt is a C toolkit to interract with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the \s-1GNU\s0 Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C \s-1API\s0 initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed.
domains. It can also be used to list current domains. Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the \s-1GNU\s0 Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C \s-1API\s0 initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed.
.PP
The basic structure of every virsh command is almost always:
.PP
@ -152,12 +152,12 @@ is the numeric domain id, or the domain name (which will be internally
translated to domain id), and \fI\s-1OPTIONS\s0\fR are sub command specific
options. There are a few exceptions to this rule in the cases where
the sub command in question acts on all domains, the entire machine,
or directly on the xen hypervisor. Those exceptions will be clear for
or directly on the xen hypervisor. Those exceptions will be explained for
each of those sub commands.
.SH "NOTES"
.IX Header "NOTES"
All \fBvirsh\fR opperations rely upon the libvirt library.
For any virsh commands to run xend/qemu, or what ever virtual library that libvirt suports. For this reason you should start xend/qemu as a service when your system first boots using xen/qemu.
All \fBvirsh\fR operations rely upon the libvirt library.
So any virsh commands may require to run xend or qemu (or which ever virtualization layer that libvirt will use). For this reason you should start xend or qemu as a service when your system first boots.
.PP
Most \fBvirsh\fR commands require root privledges to run due to the
communications channels used to talk to the hypervisor. Running as
@ -187,7 +187,7 @@ Ouput the domain informations as an \s-1XML\s0 dump to stdout, this format can b
.IP "\fBdestroy\fR \fIdomain-name, id or uuid\fR" 4
.IX Item "destroy domain-name, id or uuid"
Immediately terminate the domain domain\-id. This doesn't give the domain
\&\s-1OS\s0 any chance to react, and it the equivalent of ripping the power
\&\s-1OS\s0 any chance to react, and it is the equivalent of ripping the power
cord out on a physical machine. In most cases you will want to use
the \fBshutdown\fR command instead.
.IP "\fBdomid\fR \fIdomain-name\fR" 4
@ -274,8 +274,8 @@ quit this interactive terminal
.IX Item "reboot domain-name, id or uuid"
Reboot a domain. This acts just as if the domain had the \fBreboot\fR
command run from the console. The command returns as soon as it has
executed the reboot action, which may be significantly before the
domain actually reboots.
started the reboot action, but it may take significantly longuer before
the domain actually reboots.
.Sp
For xen vm the behavior of what happens to a domain when it reboots is set by the
\&\fIon_reboot\fR parameter of the xmdomain.cfg file when the domain was