]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
14 years agodocs: expand the man page text for virsh setmaxmem
Justin Clift [Thu, 27 Jan 2011 16:29:26 +0000 (03:29 +1100)]
docs: expand the man page text for virsh setmaxmem

Addresses BZ # 622534:

  https://bugzilla.redhat.com/show_bug.cgi?id=622534

14 years agoevent: fix event-handling allocation crash
Eric Blake [Fri, 21 Jan 2011 19:57:03 +0000 (12:57 -0700)]
event: fix event-handling allocation crash

Regression introduced in commit e6b68d7 (Nov 2010).

Prior to that point, handlesAlloc was always a multiple of
EVENT_ALLOC_EXTENT (10), and was an int (so even if the subtraction
had been able to wrap, a negative value would be less than the count
not try to free the handles array).  But after that point,
VIR_RESIZE_N made handlesAlloc grow geometrically (with a pattern of
10, 20, 30, 45 for the handles array) but still freed in multiples of
EVENT_ALLOC_EXTENT; and the count changed to size_t.  Which means that
after 31 handles have been created, then 30 handles destroyed,
handlesAlloc is 5 while handlesCount is 1, and since (size_t)(1 - 5)
is indeed greater than 1, this then tried to free 10 elements, which
had the awful effect of nuking the handles array while there were
still live handles.

Nuking live handles puts libvirtd in an inconsistent state, and was
easily reproducible by starting and then stopping 60 faqemu guests.

* daemon/event.c (virEventCleanupTimeouts, virEventCleanupHandles):
Avoid integer wrap-around causing us to delete the entire array
while entries are still active.
* tests/eventtest.c (mymain): Expose the bug.

14 years agodocs: fix incorrect XML element mentioned by setmem text
Justin Clift [Thu, 27 Jan 2011 11:57:18 +0000 (22:57 +1100)]
docs: fix incorrect XML element mentioned by setmem text

14 years agoremote: Add extra parameter pkipath for URI
Osier Yang [Thu, 27 Jan 2011 08:34:54 +0000 (16:34 +0800)]
remote: Add extra parameter pkipath for URI

This new parameter allows user specifies where the client
cerficate, client key, CA certificate of x509 is, instead of
hardcoding it. If 'pkipath' is not specified, and the user
is not root, try to find files in $HOME/.pki/libvirt, as long
as one of client cerficate, client key, CA certificate can
not be found, use default global location (LIBVIRT_CACERT,
LIBVIRT_CLIENTCERT, LIBVIRT_CLIENTKEY, see
src/remote/remote_driver.h)

Example of use:

[root@Osier client]# virsh -c qemu+tls://10.66.93.111/system?pkipath=/tmp/pki/client
error: Cannot access CA certificate '/tmp/pki/client/cacert.pem': No such file
or directory
error: failed to connect to the hypervisor
[root@Osier client]# ls -l
total 24
-rwxrwxr-x. 1 root root 6424 Jan 24 21:35 a.out
-rw-r--r--. 1 root root 1245 Jan 23 19:04 clientcert.pem
-rw-r--r--. 1 root root  132 Jan 23 19:04 client.info
-rw-r--r--. 1 root root 1679 Jan 23 19:04 clientkey.pem

[root@Osier client]# cp /tmp/cacert.pem .
[root@Osier client]# virsh -c qemu+tls://10.66.93.111/system?pkipath=/tmp/pki/client
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
'quit' to quit

virsh #

* src/remote/remote_driver.c: adds support for the new pkipath URI parameter

14 years agostorage: Round up capacity for LVM volume creation
Osier Yang [Thu, 27 Jan 2011 08:28:19 +0000 (16:28 +0800)]
storage: Round up capacity for LVM volume creation

If vol->capacity is odd, the capacity will be rounded down
by devision, this patch is to round it up instead of rounding
down, to be safer in case of one writes to the volume with the
size he used to create.

- src/storage/storage_backend_logical.c: make sure size is not rounded down

14 years agoUpdate localization files from Fedora i10n
Daniel Veillard [Thu, 27 Jan 2011 05:33:45 +0000 (13:33 +0800)]
Update localization files from Fedora i10n

14 years agoDo not use virtio-serial port 0 for generic ports
David Allan [Mon, 24 Jan 2011 20:47:52 +0000 (15:47 -0500)]
Do not use virtio-serial port 0 for generic ports

Per the discussion in:

https://bugzilla.redhat.com/show_bug.cgi?id=670394

The port numbering should start from 1, not 0.  We assign maxport + 1,
so start maxport at 0.

14 years agoManually kill gzip if restore fails before starting qemu
Laine Stump [Mon, 24 Jan 2011 16:58:15 +0000 (11:58 -0500)]
Manually kill gzip if restore fails before starting qemu

If a guest image is saved in compressed format, and the restore fails
in some way after the intermediate process used to uncompress the
image has been started, but before qemu has been started to hook up to
the uncompressor, libvirt will endlessly wait for the uncompressor to
finish, but it never will because it's still waiting to have something
hooked up to drain its output.

The solution is to close the pipes on both sides of the uncompressor,
then send a SIGTERM before calling waitpid on it (only if the restore
has failed, of course).

14 years agoFix setup of lib directory with autogen.sh --system
Daniel P. Berrange [Wed, 19 Jan 2011 12:24:26 +0000 (12:24 +0000)]
Fix setup of lib directory with autogen.sh --system

On x86_64 hosts, /usr/lib64 must be used instead of /usr/lib
Rather than attempt to whitelist architectures, just check
for existance of /usr/lib64

* autogen.sh: Fix to use /usr/lib64 if it exists

14 years agoAdd check for poll error events in monitor
Daniel P. Berrange [Mon, 13 Dec 2010 16:05:41 +0000 (16:05 +0000)]
Add check for poll error events in monitor

Handle poll errors in the same way as hangup event

* src/qemu/qemu_monitor.c: Handle error events

14 years agoFilter out certain expected error messages from libvirtd
Daniel P. Berrange [Fri, 21 Jan 2011 17:25:01 +0000 (17:25 +0000)]
Filter out certain expected error messages from libvirtd

Add a hook to the error reporting APIs to allow specific
error messages to be filtered out. Wire up libvirtd to
remove VIR_ERR_NO_DOMAIN & similar error codes from the
logs. They are still logged at DEBUG level.

* daemon/libvirtd.c: Filter VIR_ERR_NO_DOMAIN and friends
* src/libvirt_private.syms, src/util/virterror.c,
  src/util/virterror_internal.h: Hook for changing error
  reporting level

14 years agoRevert all previous error log priority hacks
Daniel P. Berrange [Fri, 21 Jan 2011 16:46:16 +0000 (16:46 +0000)]
Revert all previous error log priority hacks

This reverts the additions in commit

  abff683f78ffd01df5005fb7a457c0b38b8eb6e1

taking us back to state where all errors are fully logged
in both libvirtd and normal clients.

THe intent was to stop VIR_ERR_NO_DOMAIN (No such domain
with UUID XXXX) messages from client apps polluting syslog
The change affected all error codes, but more seriously,
it also impacted errors from internal libvirtd infrastructure
For example guest autostart no longer logged errors. The
libvirtd network code no longer logged some errors. This
makes debugging incredibly hard

* daemon/libvirtd.c: Remove error log priority filter
* src/util/virterror.c, src/util/virterror_internal.h: Remove
  callback for overriding log priority

14 years agoCleanup code style in logging APIs
Daniel P. Berrange [Fri, 21 Jan 2011 16:30:17 +0000 (16:30 +0000)]
Cleanup code style in logging APIs

Remove use of brackets around following return statement.
Fix indentation of two switch statements

14 years agoSet SELinux context label of pipes used for qemu migration
Laine Stump [Sun, 23 Jan 2011 21:09:40 +0000 (16:09 -0500)]
Set SELinux context label of pipes used for qemu migration

This patch is a partial resolution to the following bug:

   https://bugzilla.redhat.com/show_bug.cgi?id=667756

(to complete the fix, an updated selinux-policy package is required,
to add the policy that allows libvirt to set the context of a fifo,
which was previously not allowed).

Explanation : When an incoming migration is over a pipe (for example,
if the image was compressed and is being fed through gzip, or was on a
root-squash nfs server, so needed to be opened by a child process
running as a different uid), qemu cannot read it unless the selinux
context label for the pipe has been set properly.

The solution is to check the fd used as the source of the migration
just before passing it to qemu; if it's a fifo (implying that it's a
pipe), we call the newly added virSecurityManagerSetFDLabel() function
to set the context properly.

14 years agoAdd a function to the security driver API that sets the label of an open fd.
Laine Stump [Sun, 23 Jan 2011 21:02:42 +0000 (16:02 -0500)]
Add a function to the security driver API that sets the label of an open fd.

A need was found to set the SELinux context label on an open fd (a
pipe, as a matter of fact). This patch adds a function to the security
driver API that will set the label on an open fd to secdef.label. For
all drivers other than the SELinux driver, it's a NOP. For the SElinux
driver, it calls fsetfilecon().

If the return is a failure, it only returns error up to the caller if
1) the desired label is different from the existing label, 2) the
destination fd is of a type that supports setting the selinux context,
and 3) selinux is in enforcing mode. Otherwise it will return
success. This follows the pattern of the existing function
SELinuxSetFilecon().

14 years agodocs: add a link to the bindings page under the downloads menu item
Justin Clift [Wed, 26 Jan 2011 05:00:33 +0000 (16:00 +1100)]
docs: add a link to the bindings page under the downloads menu item

So people looking to download the language bindings, but don't know
they're under the "Docs" area.

14 years agovirsh: require --mac to avoid detach-interface ambiguity
Michal Privoznik [Tue, 25 Jan 2011 17:31:00 +0000 (18:31 +0100)]
virsh: require --mac to avoid detach-interface ambiguity

bugfix for https://bugzilla.redhat.com/show_bug.cgi?id=671050

virsh simply refutes to detach-interface in case when multiple
interfaces are attached and --mac is not specified.

14 years agodispatch error before return
Wen Congyang [Tue, 25 Jan 2011 09:56:39 +0000 (17:56 +0800)]
dispatch error before return

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
14 years agoqemu: Error prompt when managed save a shutoff domain
Osier Yang [Tue, 25 Jan 2011 07:49:51 +0000 (15:49 +0800)]
qemu: Error prompt when managed save a shutoff domain

The problem was introduced by commit 4303c91, which removed the checking
of domain state, this patch is to fix it.

Otherwise, improper error will be thrown, e.g.

error: Failed to save domain rhel6 state
error: cannot resolve symlink /var/lib/libvirt/qemu/save/rhel6.save: No such
file or directory

14 years agobuild: avoid corrupted gnulib/tests/Makefile
Eric Blake [Tue, 25 Jan 2011 00:14:19 +0000 (17:14 -0700)]
build: avoid corrupted gnulib/tests/Makefile

Running 'make check' can sometimes fail in the gnulib/tests
subdirectory, when doing an incremental build, because
./bootstrap generates a Makefile.am that tries to refer to
../../.. instead of ../.., and gets lost.

This may be an upstream gnulib bug, where a more elegant
solution will present itself in the future:
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/24898

But in the meantime, I was able to reproduce both the issue,
and this solution to work around it.

* bootstrap.conf (bootstrap_epilogue): Ensure that no stray
../../.. components remain in gnulib/tests/Makefile.in.
Reported by Serge Hallyn.

14 years agoqemu: sound: Support intel 'ich6' model
Cole Robinson [Thu, 13 Jan 2011 14:15:11 +0000 (09:15 -0500)]
qemu: sound: Support intel 'ich6' model

In QEMU, the card itself is a PCI device, but it requires a codec
(either -device hda-output or -device hda-duplex) to actually output
sound. Specifying <sound model='ich6'/> gives us -device intel-hda
-device hda-duplex I think it's important that a simple <sound model='ich6'/>
sets up a useful codec, to have consistent behavior with all other sound cards.

This is basically Dan's proposal of

    <sound model='ich6'>
        <codec type='output' slot='0'/>
        <codec type='duplex' slot='3'/>
    </sound>

without the codec bits implemented.

The important thing is to keep a consistent API here, we don't want some
<sound> devs require tweaking codecs but not others. Steps I see to
accomplishing this:

    - every <sound> device has a <codec type='default'/> (unless codecs are
        manually specified)
    - <codec type='none'/> is required to specify 'no codecs'
    - new audio settings like mic=on|off could then be exposed in
        <sound> or <codec> in a consistent manner for all sound models

v2:
    Use model='ich6'

v3:
    Use feature detection, from eblake
    Set codec id, bus, and cad values

v4:
    intel-hda isn't supported if -device isn't available

v5:
    Comment spelling fixes

14 years agovmx: Use VIR_ERR_CONFIG_UNSUPPORTED when appropriated
Matthias Bolte [Fri, 21 Jan 2011 08:15:43 +0000 (09:15 +0100)]
vmx: Use VIR_ERR_CONFIG_UNSUPPORTED when appropriated

14 years agoevent: fix event-handling data race
Eric Blake [Fri, 21 Jan 2011 19:57:03 +0000 (12:57 -0700)]
event: fix event-handling data race

This bug has been present since before the time that commit
f8a519 (Dec 2008) tried to make the dispatch loop re-entrant.

Dereferencing eventLoop.handles outside the lock risks crashing, since
any other thread could have reallocated the array in the meantime.
It's a narrow race window, however, and one that would have most
likely resulted in passing bogus data to the callback rather than
actually causing a segv, which is probably why it has gone undetected
this long.

* daemon/event.c (virEventDispatchHandles): Cache data while
inside the lock, as the array might be reallocated once outside.

14 years agobuild: fix 'make check' with older git
Eric Blake [Fri, 21 Jan 2011 22:40:46 +0000 (15:40 -0700)]
build: fix 'make check' with older git

* .gnulib: Update to latest, for maintainer-makefile fix.
Reported by Matthias Bolte.

14 years agoPush unapplied fixups for previous patch
Cole Robinson [Fri, 21 Jan 2011 21:18:54 +0000 (16:18 -0500)]
Push unapplied fixups for previous patch

- Add augeas tests
- Clarify vnc_auto_unix_socket precedence in qemu.conf

14 years agoqemu: Add conf option to auto setup VNC unix sockets
Cole Robinson [Wed, 12 Jan 2011 04:44:11 +0000 (23:44 -0500)]
qemu: Add conf option to auto setup VNC unix sockets

If vnc_auto_unix_socket is enabled, any VNC devices without a hardcoded
listen or socket value will be setup to serve over a unix socket in
/var/lib/libvirt/qemu/$vmname.vnc.

We store the generated socket path in the transient VM definition at
CLI build time.

14 years agoqemu: Allow serving VNC over a unix domain socket
Cole Robinson [Fri, 7 Jan 2011 21:03:07 +0000 (16:03 -0500)]
qemu: Allow serving VNC over a unix domain socket

QEMU supports serving VNC over a unix domain socket rather than traditional
TCP host/port. This is specified with:

<graphics type='vnc' socket='/foo/bar/baz'/>

This provides better security access control than VNC listening on
127.0.0.1, but will cause issues with tools that rely on the lax security
(virt-manager in fedora runs as regular user by default, and wouldn't be
able to access a socket owned by 'qemu' or 'root').

Also not currently supported by any clients, though I have patches for
virt-manager, and virt-viewer should be simple to update.

v2:
    schema: Make listen vs. socket a <choice>

14 years agoqemu: Set domain def transient at beginning of startup process
Cole Robinson [Wed, 12 Jan 2011 06:04:33 +0000 (01:04 -0500)]
qemu: Set domain def transient at beginning of startup process

This will allow us to record transient runtime state in vm->def, like
default VNC parameters. Accomplish this by adding an extra 'live' parameter
to SetDefTransient, with similar semantics to the 'live' flag for
AssignDef.

14 years agomaint: support --no-git option during autogen.sh
Eric Blake [Fri, 21 Jan 2011 16:34:35 +0000 (09:34 -0700)]
maint: support --no-git option during autogen.sh

https://bugzilla.redhat.com/show_bug.cgi?id=562743

Also, fixes gnulib bug in dealing with strerror_r from glibc 2.13.

* .gnulib: Update to latest, for improved bootstrap.
* bootstrap: Resync from gnulib.
* autogen.sh (bootstrap): Add --bootstrap-sync, to make it easier
to keep bootstrap up-to-date.  Pass optional --no-git through.
Reported by Aleksey Avdeev.

14 years ago[v2] qemu: Retry JSON monitor cont cmd on MigrationExpected error
Jim Fehlig [Thu, 13 Jan 2011 19:52:23 +0000 (12:52 -0700)]
[v2] qemu: Retry JSON monitor cont cmd on MigrationExpected error

When restoring a saved qemu instance via JSON monitor, the vm is
left in a paused state.  Turns out the 'cont' cmd was failing with
"MigrationExpected" error class and "An incoming migration is
expected before this command can be executed" error description
due to migration (restore) not yet complete.

Detect if 'cont' cmd fails with "MigrationExpecte" error class and
retry 'cont' cmd.

V2: Fix potential double-free noted by Laine Stump

14 years agoqemu: report more proper error for unsupported graphics
Osier Yang [Fri, 21 Jan 2011 07:20:50 +0000 (15:20 +0800)]
qemu: report more proper error for unsupported graphics

Report VIR_ERR_CONFIG_UNSUPPORTED instead of VIR_ERR_INTERNAL_ERROR,
as it's valid in our domain schema, just unsupported by hypervisor
here.

* src/qemu/qemu_command.c

14 years agoFix startup with VNC password expiry on old QEMU
Daniel P. Berrange [Tue, 18 Jan 2011 18:37:45 +0000 (18:37 +0000)]
Fix startup with VNC password expiry on old QEMU

The code which set VNC passwords correctly had fallback for
the set_password command, but was lacking it for the
expire_password command. This made it impossible to start
a guest. It also failed to check whether QEMU was still
running after the initial 'set_password' command completed

* src/qemu/qemu_hotplug.c: Fix error handling when
  password expiry fails
* src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Fix
  return code for missing expire_password command

14 years agoFix error reporting when machine type probe fails
Daniel P. Berrange [Tue, 18 Jan 2011 18:00:31 +0000 (18:00 +0000)]
Fix error reporting when machine type probe fails

Avoid overwriting the real error message with a generic
OOM failure message, when machine type probe fails

* src/qemu/qemu_driver.c: Don't overwrite error

14 years agoAvoid crash in security driver if model is NULL
Daniel P. Berrange [Tue, 18 Jan 2011 18:01:10 +0000 (18:01 +0000)]
Avoid crash in security driver if model is NULL

If the XML security model is NULL, it is assumed that the current
model will be used with dynamic labelling. The verify step is
meaningless and potentially crashes if dereferencing NULL

* src/security/security_manager.c: Skip NULL model on verify

14 years agoqemu: Fix a possible deadlock in p2p migration
Wen Congyang [Fri, 21 Jan 2011 08:28:07 +0000 (16:28 +0800)]
qemu: Fix a possible deadlock in p2p migration

The function virUnrefConnect() may call virReleaseConnect() to release
the dest connection, and the function virReleaseConnect() will call
conn->driver->close().

So the function virUnrefConnect() should be surrounded by
qemuDomainObjEnterRemoteWithDriver() and
qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between
two communicating libvirt daemons.

See commit f0c8e1cb3774d6f09e2681ca1988bf235a343007 for further details.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
14 years agodocs: document <controller> element
Eric Blake [Mon, 17 Jan 2011 21:33:00 +0000 (14:33 -0700)]
docs: document <controller> element

* docs/formatdomain.html.in: Talk about <controller> and <address>
throughout.

14 years agodocs: move the apps page to the top level as its good promo
Justin Clift [Thu, 20 Jan 2011 06:17:41 +0000 (17:17 +1100)]
docs: move the apps page to the top level as its good promo

14 years agodocs: added new entries to apps page, plus adjusted a few existing
Justin Clift [Thu, 20 Jan 2011 01:52:21 +0000 (12:52 +1100)]
docs: added new entries to apps page, plus adjusted a few existing

Added new entries for Hudson, LCFG, Tivoli Provisioning Manager,
virt-what, and Zenoss.  Adjusted the existing entries for BuildBot
and vmware2libvirt.

14 years agoqemu: Avoid sending STOPPED event twice
Jiri Denemark [Tue, 18 Jan 2011 11:07:13 +0000 (12:07 +0100)]
qemu: Avoid sending STOPPED event twice

In some circumstances, libvirtd would issue two STOPPED events after it
stopped a domain. This was because an EOF event can arrive after a qemu
process is killed but before qemuMonitorClose() is called.

qemuHandleMonitorEOF() should ignore EOF when the domain is not running.

I wasn't able to reproduce this bug directly, only after adding an
artificial sleep() into qemudShutdownVMDaemon().

14 years agoqemu: Fail if per-device boot is used but deviceboot is not supported
Jiri Denemark [Tue, 18 Jan 2011 09:04:21 +0000 (10:04 +0100)]
qemu: Fail if per-device boot is used but deviceboot is not supported

14 years agospec: Start libvirt-guests only if it's on in current runlevel
Jiri Denemark [Tue, 18 Jan 2011 08:49:10 +0000 (09:49 +0100)]
spec: Start libvirt-guests only if it's on in current runlevel

14 years agoRemove redundant brackets around return values
Daniel P. Berrange [Fri, 7 Jan 2011 17:39:43 +0000 (17:39 +0000)]
Remove redundant brackets around return values

A large number of return values used 'return (0)' instead
of simply 'return 0'. Remove all these redundant brackets
so the style is consistent throughout the file

* src/libvirt.c: Remove redundant brackets

14 years agoIncrease size of driver table to make UML work again
Daniel P. Berrange [Fri, 7 Jan 2011 17:36:33 +0000 (17:36 +0000)]
Increase size of driver table to make UML work again

The driver table only has 10 slots, but there are potentially
11 drivers that need activating. Improve the error message
when driver registration fails

* src/libvirt.c: Increase driver table size & improve errors

14 years agoTurn libvirt.c error reporting functions into macros
Daniel P. Berrange [Fri, 7 Jan 2011 17:31:36 +0000 (17:31 +0000)]
Turn libvirt.c error reporting functions into macros

The virLibConnError() function (and related ones) do not correctly
report line number info. Turn them all into macros so line numbers
are reported correctly. Drop the connection object in all of them
since it is no longer used.

Also from the virLibConnWarning() equivalents completely. Now
that the Xen driver is running 100% inside libvirtd, those
codepaths for secondary drivers cannot be reached.

* src/libvirt.c: Replace error functions with macros

14 years agodocs: document <sysinfo> and <smbios> elements
Eric Blake [Tue, 18 Jan 2011 20:41:55 +0000 (13:41 -0700)]
docs: document <sysinfo> and <smbios> elements

* docs/formatdomain.html.in: Talk about <sysinfo> throughout.

14 years agobuild: use more gnulib modules for simpler code
Eric Blake [Fri, 24 Dec 2010 02:26:15 +0000 (19:26 -0700)]
build: use more gnulib modules for simpler code

* .gnulib: Update to latest, for sigpipe and sigaction modules.
* bootstrap.conf (gnulib_modules): Add siaction, sigpipe, strerror_r.
* tools/virsh.c (vshSetupSignals) [!SIGPIPE]: Delete, now that
gnulib guarantees it.
(SA_SIGINFO): Define for mingw fallback.
* src/util/virterror.c (virStrerror): Simplify, now that gnulib
guarantees the POSIX interface.
* configure.ac (AC_CHECK_FUNCS_ONCE): Drop redundant check.
(AM_PROG_CC_STDC): Move earlier, to keep autoconf happy.

14 years agoRemove two unused PATH_MAX-sized char arrays from the stack
Matthias Bolte [Sat, 15 Jan 2011 16:38:57 +0000 (17:38 +0100)]
Remove two unused PATH_MAX-sized char arrays from the stack

14 years agoUse VIR_ERR_OPERATION_INVALID when appropriated
Matthias Bolte [Sat, 15 Jan 2011 15:57:33 +0000 (16:57 +0100)]
Use VIR_ERR_OPERATION_INVALID when appropriated

VIR_ERR_OPERATION_INVALID means that the operation is not valid
for the current state of the involved object.

14 years agoFix misuse of VIR_ERR_INVALID_* error code
Matthias Bolte [Sat, 15 Jan 2011 15:31:29 +0000 (16:31 +0100)]
Fix misuse of VIR_ERR_INVALID_* error code

VIR_ERR_INVALID_* is meant for invalid pointers only.

14 years agoSimplify "NWFilterPool" to "NWFilter"
Matthias Bolte [Sat, 15 Jan 2011 15:06:52 +0000 (16:06 +0100)]
Simplify "NWFilterPool" to "NWFilter"

The public object is called NWFilter but the corresponding private
object is called NWFilterPool. I don't see compelling reasons for this
Pool suffix. One might argue that an NWFilter is a "pool" of rules, etc.

Remove the Pool suffix from NWFilterPool. No functional change included.

14 years agodatatypes: Fix outdated function names in the documentation
Matthias Bolte [Sat, 15 Jan 2011 14:42:22 +0000 (15:42 +0100)]
datatypes: Fix outdated function names in the documentation

14 years agoAdd documentation for VIR_DOMAIN_MEMORY_PARAM_UNLIMITED
Matthias Bolte [Sat, 15 Jan 2011 14:03:08 +0000 (15:03 +0100)]
Add documentation for VIR_DOMAIN_MEMORY_PARAM_UNLIMITED

Otherwise apibuild.py complains about it.

14 years agodatatypes: Get virSecretFreeName in sync with the other free functions
Matthias Bolte [Sat, 15 Jan 2011 13:54:19 +0000 (14:54 +0100)]
datatypes: Get virSecretFreeName in sync with the other free functions

14 years agodocs: Move the "Network Filtering" page one level up in the hierarchy
Matthias Bolte [Sat, 15 Jan 2011 13:47:11 +0000 (14:47 +0100)]
docs: Move the "Network Filtering" page one level up in the hierarchy

"Network Filtering" is not directly related to "Networks".

Suggested by Daniel P. Berrange.

14 years agodocs: add buildbot to the apps page
Justin Clift [Tue, 18 Jan 2011 21:40:08 +0000 (08:40 +1100)]
docs: add buildbot to the apps page

14 years agoqemu: don't fail capabilities check on 0.12.x
Eric Blake [Tue, 18 Jan 2011 16:47:30 +0000 (09:47 -0700)]
qemu: don't fail capabilities check on 0.12.x

Fixes regression introduced in commit 2211518, where all qemu 0.12.x
fails to start, as does qemu 0.13.x lacking the pci-assign device.
Prior to 2211518, the code was just ignoring a non-zero exit status
from the qemu child, but the virCommand code checked this to avoid
masking any other issues, which means the real bug of provoking
non-zero exit status has been latent for a longer time.

* src/qemu/qemu_capabilities.c (qemuCapsExtractVersionInfo): Check
for -device driver,? support.
(qemuCapsExtractDeviceStr): Avoid failure if all probed devices
are unsupported.
Reported by Ken Congyang.

14 years agodocs: add new conversion heading to the apps listing
Justin Clift [Tue, 18 Jan 2011 21:21:03 +0000 (08:21 +1100)]
docs: add new conversion heading to the apps listing

14 years agodocs: updated windows page for new 0.8.7 installer
Justin Clift [Tue, 18 Jan 2011 18:00:44 +0000 (05:00 +1100)]
docs: updated windows page for new 0.8.7 installer

14 years agoqemu: use -incoming fd:n to avoid qemu holding fd indefinitely
Eric Blake [Wed, 22 Dec 2010 22:13:29 +0000 (15:13 -0700)]
qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

https://bugzilla.redhat.com/show_bug.cgi?id=620363

When using -incoming stdio or -incoming exec:, qemu keeps the
stdin fd open long after the migration is complete.  Not to
mention that exec:cat is horribly inefficient, by doubling the
I/O and going through a popen interface in qemu.

The new -incoming fd: of qemu 0.12.0 closes the fd after using
it, and allows us to bypass an intermediary cat process for
less I/O.

* src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter.
* src/qemu/qemu_command.c (qemuBuildCommandLine): Support
migration via fd: when possible.  Consolidate migration handling
into one spot, now that it is more complex.
* src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller.
* tests/qemuxml2argvtest.c (mymain): Likewise.
* tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file.
* tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.

14 years agotests: Add tests for per-device boot elements
Jiri Denemark [Thu, 13 Jan 2011 10:46:43 +0000 (11:46 +0100)]
tests: Add tests for per-device boot elements

14 years agoqemu: Support per-device boot ordering
Jiri Denemark [Wed, 12 Jan 2011 10:33:34 +0000 (11:33 +0100)]
qemu: Support per-device boot ordering

Support for this is included in qemu and seabios from upstream git.

14 years agoIntroduce per-device boot element
Jiri Denemark [Wed, 12 Jan 2011 14:19:34 +0000 (15:19 +0100)]
Introduce per-device boot element

Currently, boot order can be specified per device class but there is no
way to specify exact disk/NIC device to boot from.

This patch adds <boot order='N'/> element which can be used inside
<disk/> and <interface/>. This is incompatible with the older os/boot
element. Since not all hypervisors support per-device boot
specification, new deviceboot flag is included in capabilities XML for
hypervisors which understand the new boot element. Presence of the flag
allows (but doesn't require) users to use the new style boot order
specification.

14 years agoconf: Move boot parsing into a separate function
Jiri Denemark [Wed, 12 Jan 2011 07:44:54 +0000 (08:44 +0100)]
conf: Move boot parsing into a separate function

14 years agobuild: let xgettext see strings in libvirt-guests
Eric Blake [Thu, 6 Jan 2011 19:00:30 +0000 (12:00 -0700)]
build: let xgettext see strings in libvirt-guests

* tools/libvirt-guests.init.in: Rename...
* tools/libvirt-guests.init.sh: ...so that xgettext's language
detection via suffix will work.
* po/POTFILES.in: Update all references.
* tools/Makefile.am (EXTRA_DIST, libvirt-guests.init): Likewise.

14 years agolibvirt-guests: remove bashisms
Laurent Léonard [Tue, 4 Jan 2011 18:13:56 +0000 (19:13 +0100)]
libvirt-guests: remove bashisms

* tools/libvirt-guests.init.sh: Use only POSIX shell features, which
includes using gettext.sh for translation rather than $"".
* tools/Makefile.am (libvirt-guests.init): Supply a few more substitutions.
* po/POTFILES.in: Mark that libvirt-guests.init needs translation.

Signed-off-by: Eric Blake <eblake@redhat.com>
14 years agoA couple of fixes for the search PHP code
Daniel Veillard [Mon, 17 Jan 2011 08:55:41 +0000 (16:55 +0800)]
A couple of fixes for the search PHP code

14 years agotests: Remove obsolete secaatest
Matthias Bolte [Fri, 14 Jan 2011 21:37:55 +0000 (22:37 +0100)]
tests: Remove obsolete secaatest

Before the security driver was refactored in d6623003 seclabeltest and
secaatest were basically the same. seclabeltest was meant for SELinux
and secaatest for AppArmor. Both tests exited early when the specific
security driver backend wasn't enabled.

With the new security manager trying to initialize a disabled security
driver backend is an error that can't be distinguished from other errors
anymore. Therefore, the updated seclabeltest just asks for the first
available backend as this will always work even with SELinux and AppArmor
backend being disabled due to the new Nop backend.

Remove the obsolete secaatest and compile and run the seclabeltest
unconditional.

This fixes make check on systems that support AppArmor.

14 years agovirsh: Use WITH_SECDRIVER_APPARMOR to detect AppArmor support
Matthias Bolte [Fri, 14 Jan 2011 21:00:55 +0000 (22:00 +0100)]
virsh: Use WITH_SECDRIVER_APPARMOR to detect AppArmor support

There is no ENABLE_SECDRIVER_APPARMOR.

14 years agomemtune: Let virsh know the unlimited value for memory tunables
Nikunj A. Dadhania [Thu, 13 Jan 2011 09:18:11 +0000 (14:48 +0530)]
memtune: Let virsh know the unlimited value for memory tunables

Display or set unlimited values for memory parameters. Unlimited is
represented by INT64_MAX in memory cgroup.

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Reported-by: Justin Clift <jclift@redhat.com>
14 years agomaint: improve sc_prohibit_strncmp syntax check
Eric Blake [Fri, 7 Jan 2011 00:17:32 +0000 (17:17 -0700)]
maint: improve sc_prohibit_strncmp syntax check

* .gnulib: Update, for sc_prohibit_strcmp fix.
* cfg.mk: Adjust copyright; the only FSF portions come from when
this file was copied from coreutils.
(sc_prohibit_strncmp): Copy bug-fixes from sc_prohibit_strcmp.
* .x-sc_prohibit_strcmp: Delete, now that rule is smarter.
* .x-sc_prohibit_strncmp: Likewise.
* Makefile.am (syntax_check_exceptions): Track deletion.

14 years agodatatypes: avoid redundant __FUNCTION__
Eric Blake [Wed, 12 May 2010 02:57:56 +0000 (20:57 -0600)]
datatypes: avoid redundant __FUNCTION__

virLibConnError already includes __FUNCTION__ in its output, so we
were redundant.  Furthermore, clang warns that __FUNCTION__ is not
a string literal (at least __FUNCTION__ will never contain %, so
it was not a security risk).

* src/datatypes.c: Replace __FUNCTION__ with a descriptive string.

14 years agoEnable tuning of qemu network tap device "sndbuf" size
Laine Stump [Wed, 12 Jan 2011 19:38:01 +0000 (14:38 -0500)]
Enable tuning of qemu network tap device "sndbuf" size

This is in response to a request in:

   https://bugzilla.redhat.com/show_bug.cgi?id=665293

In short, under heavy load, it's possible for qemu's networking to
lock up due to the tap device's default 1MB sndbuf being
inadequate. adding "sndbuf=0" to the qemu commandline -netdevice
option will alleviate this problem (sndbuf=0 actually sets it to
0xffffffff).

Because we must be able to explicitly specify "0" as a value, the
standard practice of "0 means not specified" won't work here. Instead,
virDomainNetDef also has a sndbuf_specified, which defaults to 0, but
is set to 1 if some value was given.

The sndbuf value is put inside a <tune> element of each <interface> in
the domain. The intent is that further tunable settings will also be
placed inside this element.

     <interface type='network'>
       ...
       <tune>
         <sndbuf>0</sndbuf>
       ...
       </tune>
     </interface>

14 years agoAdd XML config switch to enable/disable vhost-net support
Laine Stump [Wed, 12 Jan 2011 04:18:49 +0000 (23:18 -0500)]
Add XML config switch to enable/disable vhost-net support

This patch is in response to

  https://bugzilla.redhat.com/show_bug.cgi?id=643050

The existing libvirt support for the vhost-net backend to the virtio
network driver happens automatically - if the vhost-net device is
available, it is always enabled, otherwise the standard userland
virtio backend is used.

This patch makes it possible to force whether or not vhost-net is used
with a bit of XML. Adding a <driver> element to the interface XML, eg:

     <interface type="network">
       <model type="virtio"/>
       <driver name="vhost"/>

will force use of vhost-net (if it's not available, the domain will
fail to start). if driver name="qemu", vhost-net will not be used even
if it is available.

If there is no <driver name='xxx'/> in the config, libvirt will revert
to the pre-existing automatic behavior - use vhost-net if it's
available, and userland backend if vhost-net isn't available.

14 years agoUse the new set_password monitor command to set password.
Marc-André Lureau [Mon, 10 Jan 2011 11:12:33 +0000 (12:12 +0100)]
Use the new set_password monitor command to set password.

We try to use that command first when setting a VNC/SPICE password. If
that doesn't work we fallback to the legacy VNC only password

Allow an expiry time to be set, if that doesn't work, throw an error
if they try to use SPICE.

Change since v1:
- moved qemuInitGraphicsPasswords to qemu_hotplug, renamed
  to qemuDomainChangeGraphicsPasswords.
- updated what looks like a typo (that appears to work anyway) in
  initial patch from Daniel:
    - ret = qemuInitGraphicsPasswords(driver, vm,
    -                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
    -                                 &vm->def->graphics[0]->data.vnc.auth,
    -                                 driver->vncPassword);
    + ret = qemuInitGraphicsPasswords(driver, vm,
    +                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
    +                                 &vm->def->graphics[0]->data.spice.auth,
    +                                 driver->spicePassword);

Based on patch by Daniel P. Berrange <berrange@redhat.com>.

14 years agoqemu: add set_password and expire_password monitor commands
Marc-André Lureau [Mon, 10 Jan 2011 11:12:32 +0000 (12:12 +0100)]
qemu: add set_password and expire_password monitor commands

14 years agoFix 'make check' after commit 04197350
Jim Fehlig [Fri, 14 Jan 2011 18:12:46 +0000 (11:12 -0700)]
Fix 'make check' after commit 04197350

I broke 'make check' with commit 04197350 by unconditionally
emitting 'hap=' in xen xm driver.  Only emit 'hap=' if
xendConfigVersion >= 3.  I've tested sending 'hap=' to a Xen 3.2
machine without support for hap setting and verified that xend
silently drops the unrecognized setting.

14 years agoqemu: move monitor device out of domain_conf common code
Eric Blake [Fri, 7 Jan 2011 23:36:25 +0000 (16:36 -0700)]
qemu: move monitor device out of domain_conf common code

* src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor.
* src/conf/domain_conf.c (virDomainChrDevice)
(virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop
monitor support.
* src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature.
* src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise.
* src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of
monConfig.
* src/qemu/qemu_domain.c (qemuDomainObjPrivateFree)
(qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse):
Adjust to type change.
* src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise.
* src/qemu/qemu_driver.c (qemuPrepareMonitorChr)
(qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor)
(qemudShutdownVMDaemon): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
* src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise.
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.

14 years agodomain_conf: split source data out from ChrDef
Eric Blake [Fri, 7 Jan 2011 22:45:01 +0000 (15:45 -0700)]
domain_conf: split source data out from ChrDef

This opens up the possibility of reusing the smaller ChrSourceDef
for both qemu monitor and a passthrough smartcard device.

* src/conf/domain_conf.h (_virDomainChrDef): Factor host
details...
(_virDomainChrSourceDef): ...into new struct.
(virDomainChrSourceDefFree): New prototype.
* src/conf/domain_conf.c (virDomainChrDefFree)
(virDomainChrDefParseXML, virDomainChrDefFormat): Split...
(virDomainChrSourceDefClear, virDomainChrSourceDefFree)
(virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat):
...into new functions.
(virDomainChrDefParseTargetXML): Update clients to reflect type
split.
* src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel)
(virVMXFormatSerial, virVMXFormatParallel): Likewise.
* src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
* src/xen/xend_internal.c (xenDaemonParseSxprChar)
(xenDaemonFormatSxprChr): Likewise.
* src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial)
(vboxAttachParallel): Likewise.
* src/security/security_dac.c (virSecurityDACSetChardevLabel)
(virSecurityDACSetChardevCallback)
(virSecurityDACRestoreChardevLabel)
(virSecurityDACRestoreChardevCallback): Likewise.
* src/security/security_selinux.c (SELinuxSetSecurityChardevLabel)
(SELinuxSetSecurityChardevCallback)
(SELinuxRestoreSecurityChardevLabel)
(SELinuxSetSecurityChardevCallback): Likewise.
* src/security/virt-aa-helper.c (get_files): Likewise.
* src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole):
Likewise.
* src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise.
* src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY)
(umlDomainOpenConsole): Likewise.
* src/qemu/qemu_command.c (qemuBuildChrChardevStr)
(qemuBuildChrArgStr, qemuBuildCommandLine)
(qemuParseCommandLineChr): Likewise.
* src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat)
(qemuDomainObjPrivateXMLParse): Likewise.
* src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
* src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor)
(qemudFindCharDevicePTYs, qemuPrepareChardevDevice)
(qemuPrepareMonitorChr, qemudShutdownVMDaemon)
(qemuDomainOpenConsole): Likewise.
* src/qemu/qemu_command.h (qemuBuildChrChardevStr)
(qemuBuildChrArgStr): Delete, now that they are static.
* src/libvirt_private.syms (domain_conf.h): New exports.
* cfg.mk (useless_free_options): Update list.
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update
tests.

14 years agocpu: Add support for Westmere CPU model
Jiri Denemark [Fri, 14 Jan 2011 13:20:33 +0000 (14:20 +0100)]
cpu: Add support for Westmere CPU model

14 years agoqemu: improve device flag parsing
Eric Blake [Thu, 13 Jan 2011 16:09:15 +0000 (09:09 -0700)]
qemu: improve device flag parsing

* src/qemu/qemu_capabilities.h (qemuCapsParseDeviceStr): New
prototype.
* src/qemu/qemu_capabilities.c (qemuCapsParsePCIDeviceStrs)
Rename and split...
(qemuCapsExtractDeviceStr, qemuCapsParseDeviceStr): ...to make it
easier to add and test device-specific checks.
(qemuCapsExtractVersionInfo): Update caller.
* tests/qemuhelptest.c (testHelpStrParsing): Also test parsing of
device-related flags.
(mymain): Update expected flags.
* tests/qemuhelpdata/qemu-0.12.1-device: New file.
* tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel60-device: New file.
* tests/qemuhelpdata/qemu-kvm-0.12.3-device: New file.
* tests/qemuhelpdata/qemu-kvm-0.13.0-device: New file.

14 years agoutil: add missing string->integer conversion functions
Eric Blake [Thu, 13 Jan 2011 22:09:18 +0000 (15:09 -0700)]
util: add missing string->integer conversion functions

It was awkward having only int conversion in the virStrToLong family,
but only long conversion in the virXPath family.  Make both families
support both types.

* src/util/util.h (virStrToLong_l, virStrToLong_ul): New
prototypes.
* src/util/xml.h (virXPathInt, virXPathUInt): Likewise.
* src/util/util.c (virStrToLong_l, virStrToLong_ul): New
functions.
* src/util/xml.c (virXPathInt, virXPathUInt): Likewise.
* src/libvirt_private.syms (util.h, xml.h): Export them.

14 years agodocs: clarify virsh setvcpus and setmem usage with active domains
Justin Clift [Thu, 13 Jan 2011 20:45:37 +0000 (07:45 +1100)]
docs: clarify virsh setvcpus and setmem usage with active domains

Addresses BZ # 622534:

  https://bugzilla.redhat.com/show_bug.cgi?id=622534

14 years agoqemu: convert capabilities to use virCommand
Eric Blake [Wed, 12 Jan 2011 23:26:34 +0000 (16:26 -0700)]
qemu: convert capabilities to use virCommand

* src/qemu/qemu_capabilities.c (qemuCapsProbeMachineTypes)
(qemuCapsProbeCPUModels, qemuCapsParsePCIDeviceStrs)
(qemuCapsExtractVersionInfo): Use virCommand rather than virExec.

14 years agovirsh: ensure --maximum flag used only with --config for setvcpus
Justin Clift [Thu, 13 Jan 2011 17:42:03 +0000 (04:42 +1100)]
virsh: ensure --maximum flag used only with --config for setvcpus

14 years agoDocument HAP domain feature
Jim Fehlig [Wed, 5 Jan 2011 23:07:54 +0000 (16:07 -0700)]
Document HAP domain feature

Add HAP feature to schema and documentation.

14 years agoAdd HAP to xen hypervisor capabilities
Jim Fehlig [Wed, 5 Jan 2011 22:20:01 +0000 (15:20 -0700)]
Add HAP to xen hypervisor capabilities

xen-unstable c/s 16931 introduced a per-domain setting for hvm
guests to enable/disable hardware assisted paging.  If disabled,
software techniques such as shadow page tables are used.  If enabled,
and the feature exists in underlying hardware, hardware support for
paging is used.

Xen does not provide a mechanism to discover the HAP capability, so
we advertise its availability for hvm guests on Xen >= 3.3.

14 years agoAdd support for HAP feature to xen drivers
Jim Fehlig [Wed, 5 Jan 2011 22:16:57 +0000 (15:16 -0700)]
Add support for HAP feature to xen drivers

xen-unstable c/s 16931 introduced a per-domain setting for hvm
guests to enable/disable hardware assisted paging.  If disabled,
software techniques such as shadow page tables are used.  If enabled,
and the feature exists in underlying hardware, hardware support for
paging is used.

This provides implementation for mapping HAP setting to/from
domxml/native formats in xen drivers.

14 years agoAdd HAP to virDomainFeature enum
Jim Fehlig [Wed, 5 Jan 2011 21:56:48 +0000 (14:56 -0700)]
Add HAP to virDomainFeature enum

Extend the virDomainFeature enumeration to include HAP (hardware
assisted paging) feature.

Hardware features such as Extended Page Table and Nested Page
Table augment hypervisor software techniques such as shadow
page table.  Adding HAP to the virDomainFeature enumeration
allows users to select between hardware and software memory
management mechanisms for their guests.

14 years agotests: virsh is no longer in builddir/src
Eric Blake [Wed, 12 Jan 2011 20:13:22 +0000 (13:13 -0700)]
tests: virsh is no longer in builddir/src

Commit 870dba0 (Mar 2008) added builddir/src to PATH to pick
up virsh.  Later, virsh was moved to tools; commit db68d6b
(Oct 2009) noticed this, but only added the new location rather
than deleting the old location.

* tests/Makefile.am (path_add): Drop now-useless directory.
Suggested by Daniel P. Berrange.

14 years agovirFindFileInPath: only find executable non-directory
Eric Blake [Wed, 12 Jan 2011 16:12:24 +0000 (09:12 -0700)]
virFindFileInPath: only find executable non-directory

Without this patch, at least tests/daemon-conf (which sticks
$builddir/src in the PATH) tries to execute the directory
$builddir/src/qemu rather than a real qemu binary.

* src/util/util.h (virFileExists): Adjust prototype.
(virFileIsExecutable): New prototype.
* src/util/util.c (virFindFileInPath): Reject non-executables and
directories.  Avoid huge stack allocation.
(virFileExists): Use lighter-weight syscall.
(virFileIsExecutable): New function.
* src/libvirt_private.syms (util.h): Export new function.

14 years agoFix old PHP syntax in the search online form
Daniel Veillard [Thu, 13 Jan 2011 06:09:13 +0000 (14:09 +0800)]
Fix old PHP syntax in the search online form

14 years agobuild: restore mingw build
Eric Blake [Wed, 12 Jan 2011 20:18:37 +0000 (13:18 -0700)]
build: restore mingw build

* bootstrap.conf (gnulib_modules): Add chown.

14 years agoesx: Fix memory leak in HostSystem managed object free function
Matthias Bolte [Sat, 8 Jan 2011 13:59:01 +0000 (14:59 +0100)]
esx: Fix memory leak in HostSystem managed object free function

14 years agodocs: fix trivial typos in currentMemory description
Justin Clift [Wed, 12 Jan 2011 21:33:09 +0000 (08:33 +1100)]
docs: fix trivial typos in currentMemory description

14 years agodoc: improve the documentation of desturi
Wen Congyang [Wed, 12 Jan 2011 06:12:39 +0000 (14:12 +0800)]
doc: improve the documentation of desturi

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
14 years agoreport error when specifying wrong desturi
Wen Congyang [Wed, 12 Jan 2011 06:12:29 +0000 (14:12 +0800)]
report error when specifying wrong desturi

When we do peer2peer migration, the dest uri is an address of the
target host as seen from the source machine. So we must specify
the ip or hostname of target host in dest uri. If we do not specify
it, report an error to the user.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
14 years agoqemu: Reject SDL graphic if it's not supported by qemu
Osier Yang [Wed, 12 Jan 2011 14:44:00 +0000 (22:44 +0800)]
qemu: Reject SDL graphic if it's not supported by qemu

If the emulator doesn't support SDL graphic, we should reject
the use of SDL graphic xml with error messages, but not ignore
it silently, and pretend things are fine.

"-sdl" flag was exposed explicitly by qemu since 0.10.0, more detail:
http://www.redhat.com/archives/libvir-list/2011-January/msg00442.html

And we already have capability flag "QEMUD_CMD_FLAG_0_10", which
could be used to prevent the patch affecting the older versions
of QEMU.

* src/qemu/qemu_command.c

14 years agodocs: reorder apps page alphabetically, plus add libguestfs entries
Justin Clift [Wed, 12 Jan 2011 14:18:50 +0000 (01:18 +1100)]
docs: reorder apps page alphabetically, plus add libguestfs entries

14 years agodocs: add entry for archipel to the apps page
Justin Clift [Tue, 11 Jan 2011 20:28:53 +0000 (07:28 +1100)]
docs: add entry for archipel to the apps page

14 years agodocs: use xml entity encoding for extended character last name
Justin Clift [Tue, 11 Jan 2011 20:58:23 +0000 (07:58 +1100)]
docs: use xml entity encoding for extended character last name