]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
14 years agolibxl : fix the version for the managed save APIs
Daniel Veillard [Thu, 2 Jun 2011 12:39:40 +0000 (20:39 +0800)] 
libxl : fix the version for the managed save APIs

14 years agolibxl: adds managed save and restore support
Markus Groß [Thu, 2 Jun 2011 12:24:30 +0000 (20:24 +0800)] 
libxl: adds managed save and restore support

Based on the equivalent qemu driver code

* src/libxl/libxl_driver.c: refactor the Start save and restore
  routines of the driver and adds the new entry points for
  managed saves handling

14 years agolibxl: get maximum memory of running domain
Markus Groß [Thu, 2 Jun 2011 12:16:32 +0000 (20:16 +0800)] 
libxl: get maximum memory of running domain

* src/libxl/libxl_driver.c: fix the libxlDomainGetInfo to return the
  maximum memory for running domain

14 years agoAdd a plugin for the 'sanlock' project
Daniel P. Berrange [Tue, 18 Jan 2011 18:37:45 +0000 (18:37 +0000)] 
Add a plugin for the 'sanlock' project

Sanlock is a project that implements a disk-paxos locking
algorithm. This is suitable for cluster deployments with
shared storage.

* src/Makefile.am: Add dlopen plugin for sanlock
* src/locking/lock_driver_sanlock.c: Sanlock driver
* configure.ac: Check for sanlock
* libvirt.spec.in: Add a libvirt-lock-sanlock RPM

14 years agoAllow leases to be hotpluged with QEMU guests
Daniel P. Berrange [Wed, 18 May 2011 16:20:53 +0000 (12:20 -0400)] 
Allow leases to be hotpluged with QEMU guests

* src/conf/domain_conf.c, src/conf/domain_conf.h: APIs for
  inserting/finding/removing virDomainLeaseDefPtr instances
* src/qemu/qemu_driver.c: Wire up hotplug/unplug for leases
* src/qemu/qemu_hotplug.h, src/qemu/qemu_hotplug.c: Support
  for hotplug and unplug of leases

14 years agoSupport passing QEMU lock state to dest during migration
Daniel P. Berrange [Wed, 18 May 2011 16:34:21 +0000 (12:34 -0400)] 
Support passing QEMU lock state to dest during migration

Some lock managers associate state with leases, allowing a process
to temporarily release its leases, and re-acquire them later, safe
in the knowledge that no other process has acquired + released the
leases in between.

This is already used between suspend/resume operations, and must
also be used across migration. This passes the lockstate in the
migration cookie. If the lock manager uses lockstate, then it
becomes compulsory to use the migration v3 protocol to get the
cookie support.

* src/qemu/qemu_driver.c: Validate that migration v2 protocol is
  not used if lock manager needs state transfer
* src/qemu/qemu_migration.c: Transfer lock state in migration
  cookie XML

14 years agoIntegrate the QEMU driver with the lock manager infrastructure
Daniel P. Berrange [Tue, 26 Oct 2010 14:04:46 +0000 (15:04 +0100)] 
Integrate the QEMU driver with the lock manager infrastructure

The QEMU integrates with the lock manager instructure in a number
of key places

 * During startup, a lock is acquired in between the fork & exec
 * During startup, the libvirtd process acquires a lock before
   setting file labelling
 * During shutdown, the libvirtd process acquires a lock
   before restoring file labelling
 * During hotplug, unplug & media change the libvirtd process
   holds a lock while setting/restoring labels

The main content lock is only ever held by the QEMU child process,
or libvirtd during VM shutdown. The rest of the operations only
require libvirtd to hold the metadata locks, relying on the active
QEMU still holding the content lock.

* src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
  src/qemu/libvirtd_qemu.aug, src/qemu/test_libvirtd_qemu.aug:
  Add config parameter for configuring lock managers
* src/qemu/qemu_driver.c: Add calls to the lock manager

14 years agoAdd initial docs about the lock managers
Daniel P. Berrange [Mon, 22 Nov 2010 16:44:13 +0000 (16:44 +0000)] 
Add initial docs about the lock managers

14 years agoAdd higher level lock API for domain objects
Daniel P. Berrange [Mon, 24 Jan 2011 12:16:30 +0000 (12:16 +0000)] 
Add higher level lock API for domain objects

To facilitate use of the locking plugins from hypervisor drivers,
introduce a higher level API for locking virDomainObjPtr instances.
In includes APIs targetted to VM startup, and hotplug/unplug

* src/Makefile.am: Add domain lock API
* src/locking/domain_lock.c, src/locking/domain_lock.h: High
  level API for domain locking

14 years agoAdd a 'nop' lock driver implementation.
Daniel P. Berrange [Mon, 24 Jan 2011 12:14:52 +0000 (12:14 +0000)] 
Add a 'nop' lock driver implementation.

To allow hypervisor drivers to assume that a lock driver impl
will be guaranteed to exist, provide a 'nop' impl that is
compiled into the library

* src/Makefile.am: Add nop driver
* src/locking/lock_driver_nop.c, src/locking/lock_driver_nop.h:
  Nop lock driver implementation
* src/locking/lock_manager.c: Enable direct access of 'nop'
  driver, instead of dlopen()ing it.

14 years agoBasic framework for lock manager plugins
Daniel P. Berrange [Mon, 13 Sep 2010 13:02:58 +0000 (14:02 +0100)] 
Basic framework for lock manager plugins

Define the basic framework lock manager plugins. The
basic plugin API for 3rd parties to implemented is
defined in

  src/locking/lock_driver.h

This allows dlopen()able modules for alternative locking
schemes, however, we do not install the header. This
requires lock plugins to be in-tree allowing changing of
the lock manager plugin API in future.

The libvirt code for loading & calling into plugins
is in

  src/locking/lock_manager.{c,h}

* include/libvirt/virterror.h, src/util/virterror.c: Add
  VIR_FROM_LOCKING
* src/locking/lock_driver.h: API for lock driver plugins
  to implement
* src/locking/lock_manager.c, src/locking/lock_manager.h:
  Internal API for managing locking
* src/Makefile.am: Add locking code

14 years agoSupport leases in guest XML and lock manager
Daniel P. Berrange [Thu, 9 Dec 2010 18:25:11 +0000 (18:25 +0000)] 
Support leases in guest XML and lock manager

A lock manager may operate in various modes. The direct mode of
operation is to obtain locks based on the resources associated
with devices in the XML. The indirect mode is where the app
creating the domain provides explicit leases for each resource
that needs to be locked. This XML extension allows for listing
resources in the XML

  <devices>
     ...
     <lease>
       <lockspace>somearea</lockspace>
       <key>thequickbrownfoxjumpsoverthelazydog</key>
       <target path='/some/lease/path' offset='23432'/>
     </lease>
     ...
  </devices>

The 'lockspace' is a unique identifier for the lockspace which
the lease is associated

The 'key' is a unique identifier for the resource associated
with the lease.

The 'target' is the file on disk where the leases are held.

* docs/schemas/domain.rng: Add lease schema
* src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and
  formatting for leases
* tests/qemuxml2argvdata/qemuxml2argv-lease.args,
  tests/qemuxml2argvdata/qemuxml2argv-lease.xml,
  tests/qemuxml2xmltest.c: Test XML handling for leases

14 years agoAllow handshake with child process during startup
Daniel P. Berrange [Mon, 22 Nov 2010 13:31:35 +0000 (13:31 +0000)] 
Allow handshake with child process during startup

Allow the parent process to perform a bi-directional handshake
with the child process during fork/exec. The child process
will fork and do its initial setup. Immediately prior to the
exec(), it will stop & wait for a handshake from the parent
process. The parent process will spawn the child and wait
until the child reaches the handshake point. It will do
whatever extra setup work is required, before signalling the
child to continue.

The implementation of this is done using two pairs of blocking
pipes. The first pair is used to block the parent, until the
child writes a single byte. Then the second pair pair is used
to block the child, until the parent confirms with another
single byte.

* src/util/command.c, src/util/command.h,
  src/libvirt_private.syms: Add APIs to perform a handshake

14 years agosecurity: plug regression introduced in disk probe logic CVE-2011-2178
Eric Blake [Thu, 26 May 2011 14:18:46 +0000 (08:18 -0600)] 
security: plug regression introduced in disk probe logic

Regression introduced in commit d6623003 (v0.8.8) - using the
wrong sizeof operand meant that security manager private data
was overlaying the allowDiskFormatProbing member of struct
_virSecurityManager.  This reopens disk probing, which was
supposed to be prevented by the solution to CVE-2010-2238.

* src/security/security_manager.c
(virSecurityManagerGetPrivateData): Use correct offset.

14 years agotests: really fix QEMU XML-2-ARGV graphics-spice-timeout test
Eric Blake [Wed, 1 Jun 2011 21:02:06 +0000 (15:02 -0600)] 
tests: really fix QEMU XML-2-ARGV graphics-spice-timeout test

Alas, /usr/bin/kvm is also not directly supported by testutilsqemu.c.

In fact, _any_ test that uses <cpu match=...> has to use our faked
qemu.sh in order to properly answer the 'qemu -cpu ?' probe done
during qemu command line building.

* tests/qemuxml2argvdata/*graphics-spice-timeout*: Switch emulator, again.

14 years agobuild: avoid corrupting / in RHEL 5
Eric Blake [Wed, 1 Jun 2011 17:42:43 +0000 (11:42 -0600)] 
build: avoid corrupting / in RHEL 5

I noticed this while building from libvirt.git on RHEL 5.6:

Generating internals/command.html.tmp
mkdir: cannot create directory `/internals': Permission denied

If I had been building as root instead, this pollutes /.

Older autoconf lacks $(builddir), but it is rigorously equal to '.'
in newer autoconf, so we could use '$(MKDIR_P) internals' instead.

However, since internals/command.html is part of the tarball, we
_already_ build it in $(srcdir), not $(builddir) during VPATH
builds, so the mkdir is wasted effort!

* docs/Makefile.am (internals/%.html.tmp): Drop unused mkdir.

14 years agotests: Add a test for correct disk device ordering
Jiri Denemark [Tue, 24 May 2011 16:01:11 +0000 (19:01 +0300)] 
tests: Add a test for correct disk device ordering

14 years agoFix order of disks and controllers
Jiri Denemark [Tue, 24 May 2011 15:53:18 +0000 (18:53 +0300)] 
Fix order of disks and controllers

Commit 2d6adabd53c8f1858191d521dc9b4948d1205955 replaced qsorting disk
and controller devices with inserting them at the right position. That
was to fix unnecessary reordering of devices. However, when parsing
domain XML devices are just taken in the order in which they appear in
the XML since. Use the correct insertion algorithm to honor device
target.

14 years agoFix QEMU XML-2-ARGV graphics-spice-timeout test
Matthias Bolte [Wed, 1 Jun 2011 16:11:14 +0000 (18:11 +0200)] 
Fix QEMU XML-2-ARGV graphics-spice-timeout test

The test used an emulator that is not supported in testutilsqemu.c.
Switch from qemu-kvm to kvm to fix this.

14 years agoremote generator: Handle some virTypedParameterPtr using functions
Matthias Bolte [Mon, 30 May 2011 18:27:37 +0000 (20:27 +0200)] 
remote generator: Handle some virTypedParameterPtr using functions

This doesn't cover the getters that allow to query nparams yet.

14 years agoapibuild: Restrict long usage to existing functions and structs
Matthias Bolte [Mon, 30 May 2011 12:36:41 +0000 (14:36 +0200)] 
apibuild: Restrict long usage to existing functions and structs

New APIs have to use long long instead of long.

Also make apibuild errors fatal.

14 years agoremote generator: Legacy support for hyper to long mappings
Matthias Bolte [Mon, 30 May 2011 10:58:57 +0000 (12:58 +0200)] 
remote generator: Legacy support for hyper to long mappings

Remove some special case code that took care of mapping hyper to the
correct C types.

As the list of procedures that is allowed to map hyper to long is fixed
put it in the generator instead annotations in the .x files. This
results in simpler .x file parsing code.

Use macros for hyper to long assignments that perform overflow checks
when long is smaller than hyper. Map hyper to long long by default.

Suggested by Eric Blake.

14 years agoRemove call to deprecated gnutls_certificate_type_set_priority
Daniel P. Berrange [Wed, 1 Jun 2011 12:20:58 +0000 (13:20 +0100)] 
Remove call to deprecated gnutls_certificate_type_set_priority

The gnutls_certificate_type_set_priority method is deprecated.
Since we already set the default gnutls priority, and do not
support OpenGPG credentials in any case, it was not serving
any useful purpose and can be removed

* src/remote/remote_driver.c: Remove src/remote/remote_driver.c
  call

14 years agoUse common parameter order for remote(De)SerializeTypedParameters
Matthias Bolte [Mon, 30 May 2011 18:12:18 +0000 (20:12 +0200)] 
Use common parameter order for remote(De)SerializeTypedParameters

We commonly use "value, length" order, let's stick to this.

14 years agoopenvz: Add simple test for openvzReadNetworkConf
Matthias Bolte [Tue, 31 May 2011 12:58:58 +0000 (14:58 +0200)] 
openvz: Add simple test for openvzReadNetworkConf

Convert openvzLocateConfFile to a replaceable function pointer to
allow testing the config file parsing without rewriting the whole
OpenVZ config parsing to a more testable structure.

14 years agoopenvz: Set virtType to openvz in openvzLoadDomains
Matthias Bolte [Wed, 1 Jun 2011 08:36:39 +0000 (10:36 +0200)] 
openvz: Set virtType to openvz in openvzLoadDomains

Otherwise virsh dumpxml will report <domain type='qemu'> instead
of the expected <domain type='openvz'>.

14 years agoutil: Fix incorrect error in PCI functions
Osier Yang [Wed, 1 Jun 2011 02:32:41 +0000 (10:32 +0800)] 
util: Fix incorrect error in PCI functions

Substitute VIR_ERR_NO_SUPPORT with VIR_ERR_INTERNAL_ERROR. Error
like following is not what user want to see.

error : pciDeviceIsAssignable:1487 : this function is not supported
by the connection driver: Device 0000:07:10.0 is behind a switch
lacking ACS and cannot be assigned

14 years agomaint: use consistent file name for threading notes
Eric Blake [Tue, 31 May 2011 19:13:24 +0000 (13:13 -0600)] 
maint: use consistent file name for threading notes

* daemon/THREADING.txt: Rename...
* daemon/THREADS.txt: ...to match qemu thread notes.
* daemon/Makefile.am (EXTRA_DIST): Reflect rename.

14 years agoopenvz: Restore original EOF handling in openvzGetProcessInfo
Matthias Bolte [Fri, 27 May 2011 15:13:58 +0000 (17:13 +0200)] 
openvz: Restore original EOF handling in openvzGetProcessInfo

This function is also affected by getline conversion. But this
didn't result in a regression in general, because the difference
would only affect the behavior of the function when the line in
/proc/vz/vestat for the given vpsid wasn't found. Under normal
conditions this should not happen.

14 years agoopenvz: Handle getline failures in openvzReadConfigParam properly
Matthias Bolte [Fri, 27 May 2011 10:35:50 +0000 (12:35 +0200)] 
openvz: Handle getline failures in openvzReadConfigParam properly

The regression fix in 3aab7f2d6b068f0 altered the error handling.
getline returns -1 on failure to read a line (including EOF). The
original openvzReadConfigParam function using openvz_readline only
treated EOF as not-found. The current getline version treats all
getline failures as not-found.

This patch fixes this and distinguishes EOF from other getline
failures.

14 years ago* .gitignore: Exempt a new test binary.
Eric Blake [Tue, 31 May 2011 17:35:32 +0000 (11:35 -0600)] 
* .gitignore: Exempt a new test binary.

14 years agostorage: List directory volumes for dir/fs/netfs pools
Cole Robinson [Thu, 26 May 2011 18:05:32 +0000 (14:05 -0400)] 
storage: List directory volumes for dir/fs/netfs pools

Since directories can be used for <filesystem> passthrough, they are
basically storage volumes.

v2:
    Skip ., .., lost+found dirs

v3:
    Use gnulib last_component

v4:
    Use gnulib "dirname.h", not system <dirname.h>
    Don't skip lost+found

14 years agotests: Add more complex domain scheme test data
Michal Privoznik [Thu, 26 May 2011 11:52:08 +0000 (13:52 +0200)] 
tests: Add more complex domain scheme test data

14 years agotests: Test for SPICE compression options
Michal Privoznik [Tue, 31 May 2011 13:52:05 +0000 (15:52 +0200)] 
tests: Test for SPICE compression options

and check regression

14 years agoIgnore backward compatibility macros in apibuild.py
Matthias Bolte [Tue, 31 May 2011 08:41:37 +0000 (10:41 +0200)] 
Ignore backward compatibility macros in apibuild.py

This fixes this three warnings from the parser by allowing the parser
to ignore some macros in the same way as it can ignore functions.

Parsing ./../include/libvirt/libvirt.h
Misformatted macro comment for _virSchedParameter
 Expecting '* _virSchedParameter:' got '* virSchedParameter:'
Misformatted macro comment for _virBlkioParameter
 Expecting '* _virBlkioParameter:' got '* virBlkioParameter:'
Misformatted macro comment for _virMemoryParameter
 Expecting '* _virMemoryParameter:' got '* virMemoryParameter:'

14 years agoconf: Fix incorrect spice graphic XML format on compression options
Michal Privoznik [Tue, 24 May 2011 11:43:30 +0000 (13:43 +0200)] 
conf: Fix incorrect spice graphic XML format on compression options

If spice graphics has no <channel> elements, the output graphics XML
is messed up. To prevent this, we need to end the <graphics> element
just before adding any compression selecting elements.

14 years agoFix sysinfo/virsh build problems on Win32
Daniel P. Berrange [Tue, 31 May 2011 13:12:33 +0000 (14:12 +0100)] 
Fix sysinfo/virsh build problems on Win32

The virSysinfoIsEqual method was mistakenly inside a #ifndef WIN32
conditional.

The existing virSysinfoFormat is also stubbed out on Win32, even
though the code works without any trouble. This breaks XML output
on Win32, so the stub is removed.

virsh migrate mistakenly had some variables inside the conditional

* src/util/sysinfo.c: Build virSysinfoIsEqual on Win32 and remove
  Win32 stub for virSysinfoFormat
* tools/virsh.c: Fix variable declaration on Win32

14 years agoopenvz: fix bridge devices parsing in openvzReadNetworkConf()
Jean-Baptiste Rouault [Tue, 31 May 2011 09:57:21 +0000 (11:57 +0200)] 
openvz: fix bridge devices parsing in openvzReadNetworkConf()

strchrnul() was called on the wrong string so it returned
the same result for each iteration.

14 years agoEnsure hvsupport.html.in is built before HTML validation
Daniel P. Berrange [Fri, 27 May 2011 10:16:43 +0000 (11:16 +0100)] 
Ensure hvsupport.html.in is built before HTML validation

In a parallel make, HTML validation tries to run before
hvsupport.html.in has been built.

* docs/Makefile.am: List hvsupport.html.in as a built source

14 years agoAllow custom XML to be passed in during migration
Daniel P. Berrange [Fri, 27 May 2011 10:30:26 +0000 (11:30 +0100)] 
Allow custom XML to be passed in during migration

Update the qemuDomainMigrateBegin method so that it accepts
an optional incoming XML document. This will be validated
for ABI compatibility against the current domain config,
and if this check passes, will be passed back out for use
by the qemuDomainMigratePrepare method on the target

* src/qemu/qemu_domain.c, src/qemu/qemu_domain.h,
  src/qemu/qemu_migration.c: Allow custom XML to be passed

14 years agoAllow virsh to pass in a custom XML document for migration
Daniel P. Berrange [Fri, 27 May 2011 10:28:35 +0000 (11:28 +0100)] 
Allow virsh to pass in a custom XML document for migration

Switch virsh migrate over to use virDomainMigrate2 and
virDomainMigrateToURI2. This is still compatible with
older libvirts, because these methods dynamically choose
whether to perform v1, v2 or v3 migration based on declared
RPC support from the libvirtd instances

Add a --xml arg which allows the user to pass in a custom
XML document. This XML document must be ABI compatible
with the current *live* XML document for the running guest
on the source host. ABI compatibility will be enforced by
any driver supporting this function

* tools/virsh.c: Add '--xml' arg to migrate command

14 years agoAdd an API for comparing the ABI of two guest configurations
Daniel P. Berrange [Fri, 27 May 2011 09:47:30 +0000 (10:47 +0100)] 
Add an API for comparing the ABI of two guest configurations

To allow a client app to pass in custom XML during migration
of a guest it is neccessary to ensure the guest ABI remains
unchanged. The virDomainDefCheckABIStablity method accepts
two virDomainDefPtr structs and compares everything in them
that could impact the guest machine ABI

* src/conf/domain_conf.c, src/conf/domain_conf.h,
  src/libvirt_private.syms: Add virDomainDefCheckABIStablity
* src/conf/cpu_conf.c, src/conf/cpu_conf.h: Add virCPUDefIsEqual
* src/util/sysinfo.c, src/util/sysinfo.h: Add virSysinfoIsEqual

14 years agoRemove unused 'target' field in virDomainHostdevDef
Daniel P. Berrange [Fri, 27 May 2011 10:25:01 +0000 (11:25 +0100)] 
Remove unused 'target' field in virDomainHostdevDef

The virDomainHostdevDef struct contains a 'char *target'
field. This is set to 'NULL' when parsing XML and never
used / set anywhere else. Clearly it is bogus & unused

* src/conf/domain_conf.c, src/conf/domain_conf.h: Remove
  target from virDomainHostdevDef

14 years agolxc: Seperate domain config loading
Osier Yang [Tue, 31 May 2011 10:03:41 +0000 (18:03 +0800)] 
lxc: Seperate domain config loading

This patch seperate the domain config loading just as qemu driver
does, first loading config of running or trasient domains, then
of persistent inactive domains. And only try to reconnect the
monitor of running domains, so that it won't always throws errors
saying can't connect to domain monitor.

And as "virDomainLoadConfig->virDomainAssignDef->virDomainObjAssignDef",
already do things like "vm->newDef = def", removed the codes
in "lxcReconnectVM" that does the same work.

14 years agoFix virTypedParameter alias comments
Matthias Bolte [Sun, 29 May 2011 15:02:33 +0000 (17:02 +0200)] 
Fix virTypedParameter alias comments

Remove the Domain prefix from the comments.

14 years agoopenvz: Automatically disable on non-Linux systems
Matthias Bolte [Sun, 29 May 2011 10:40:24 +0000 (12:40 +0200)] 
openvz: Automatically disable on non-Linux systems

As OpenVZ is Linux specific.

14 years agoSupport maximum and current memory flags in libxl driver
Markus Groß [Mon, 30 May 2011 09:53:03 +0000 (11:53 +0200)] 
Support maximum and current memory flags in libxl driver

Add support to set the maximum memory of the domain.
Also add support to change the memory of the current
state of the domain, which translates to a running
domain or the config of the domain.

Based on the code from the qemu driver.

14 years agoAdd domainSave/Restore to libxl driver
Markus Groß [Mon, 30 May 2011 09:53:02 +0000 (11:53 +0200)] 
Add domainSave/Restore to libxl driver

v3:
* initialize xml pointer to avoid segfault
* throw error message if domain is paused as
  libxenlight itself will pause it

v2:
* header is now padded and has a version field
* the correct restore function from libxl is used
* only create the restore event once in libxlVmStart

14 years agoAdd domainCoreDump to libxl driver
Markus Groß [Mon, 30 May 2011 09:53:01 +0000 (11:53 +0200)] 
Add domainCoreDump to libxl driver

v2:
* incorporated Jim Fehlig's review

14 years agoPopulate domid field of devices for libxenlight
Markus Groß [Mon, 30 May 2011 09:53:00 +0000 (11:53 +0200)] 
Populate domid field of devices for libxenlight

This patch fixes the population of the
libxenlight data structures. Now the devices
should be removed correctly from the xenstore
if they are detached.

14 years agoIssue full error messages when processing QEMU monitor I/O
Daniel P. Berrange [Sun, 29 May 2011 12:51:08 +0000 (20:51 +0800)] 
Issue full error messages when processing QEMU monitor I/O

Currently the QEMU monitor I/O handler code uses errno values
to report errors. This results in a sub-optimal error messages
on certain conditions, in particular when parsing JSON strings
malformed data simply results in 'EINVAL'.

This changes the code to use the standard libvirt error reporting
APIs. The virError is stored against the qemuMonitorPtr struct,
and when a monitor API is run, any existing stored error is copied
into that thread's error local

* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Use
  virError APIs for all monitor I/O handling code

14 years agoDon't kill QEMU process when a monitor I/O parsing error occurs
Daniel P. Berrange [Sun, 29 May 2011 12:37:29 +0000 (20:37 +0800)] 
Don't kill QEMU process when a monitor I/O parsing error occurs

Currently whenever there is any failure with parsing the monitor,
this is treated in the same was as end-of-file (ie QEMU quit).
The domain is terminated, if not already dead.

With this change, failures in parsing the monitor stream do not
result in the death of QEMU. The guest continues running unchanged,
but all further use of the monitor will be disabled.

The VMM_FAILURE event will be emitted, and the mgmt application
can decide when to kill/restart the guest to re-gain control

* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Run a
  different callback for monitor EOF vs error conditions.
* src/qemu/qemu_process.c: Emit VMM_FAILURE event when monitor
  fails

14 years agoIntroduce a new event emitted when a virtualization failure occurs
Daniel P. Berrange [Sun, 29 May 2011 12:21:53 +0000 (20:21 +0800)] 
Introduce a new event emitted when a virtualization failure occurs

This introduces a new domain

  VIR_DOMAIN_EVENT_ID_CONTROL_ERROR

Which uses the existing generic callback

typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn,
                                                     virDomainPtr dom,
                                                     void *opaque);

This event is intended to be emitted when there is a failure in
some part of the domain virtualization system. Whether the domain
continues to run/exist after the failure is an implementation
detail specific to the hypervisor.

The idea is that with some types of failure, hypervisors may
prefer to leave the domain running in a "degraded" mode of
operation. For example, if something goes wrong with the QEMU
monitor, it is possible to leave the guest OS running quite
happily. The mgmt app will simply loose the ability todo various
tasks. The mgmt app can then choose how/when to deal with the
failure that occured.
* daemon/remote.c: Dispatch of new event
* examples/domain-events/events-c/event-test.c: Demo catch
  of event
* include/libvirt/libvirt.h.in: Define event ID and callback
* src/conf/domain_event.c, src/conf/domain_event.h: Internal
  event handling
* src/remote/remote_driver.c: Receipt of new event from daemon
* src/remote/remote_protocol.x: Wire protocol for new event
* src/remote_protocol-structs: add new event for checks

14 years agosched: provide new API shims for remaining drivers
Eric Blake [Tue, 17 May 2011 22:33:53 +0000 (16:33 -0600)] 
sched: provide new API shims for remaining drivers

Well, the remaining drivers that already had the get/set
scheduler parameter functionality to begin with.

For now, this blindly treats VIR_DOMAIN_SCHEDINFO_CURRENT as
the only supported operation for these 5 domains; it will
take domain-specific patches if more specific behavior is
preferred.

* src/esx/esx_driver.c (esxDomainGetSchedulerParameters)
(esxDomainSetSchedulerParameters): Move guts...
(esxDomainGetSchedulerParametersFlags)
(esxDomainSetSchedulerParametersFlags): ...to new functions.
* src/libxl/libxl_driver.c (libxlDomainGetSchedulerParameters)
(libxlDomainSetSchedulerParameters)
(libxlDomainGetSchedulerParametersFlags)
(libxlDomainSetSchedulerParametersFlags): Likewise.
* src/lxc/lxc_driver.c (lxcGetSchedulerParameters)
(lxcSetSchedulerParameters, lxcGetSchedulerParametersFlags)
(lxcSetSchedulerParametersFlags): Likewise.
* src/test/test_driver.c (testDomainGetSchedulerParams)
(testDomainSetSchedulerParams, testDomainGetSchedulerParamsFlags)
(testDomainSetSchedulerParamsFlags): Likewise.
* src/xen/xen_driver.c (xenUnifiedDomainGetSchedulerParameters)
(xenUnifiedDomainSetSchedulerParameters)
(xenUnifiedDomainGetSchedulerParametersFlags)
(xenUnifiedDomainSetSchedulerParametersFlags): Likewise.

14 years agovirsh: improve schedinfo querying ability
Eric Blake [Tue, 17 May 2011 22:06:12 +0000 (16:06 -0600)] 
virsh: improve schedinfo querying ability

Since we can now set just --live or --config, we also need to be
able to query that back.

In the case of setting both --live and --config, it shouldn't matter
which value we read back; otherwise, since querying treats the two
flags as mutually exclusive, so does this patch.

* tools/virsh.c (cmdSchedinfo): Use new API where appropriate.

14 years agoremote: introduce remoteGetSchedulerParametersFlags
Eric Blake [Tue, 17 May 2011 21:45:03 +0000 (15:45 -0600)] 
remote: introduce remoteGetSchedulerParametersFlags

* daemon/remote.c (remoteDispatchDomainGetSchedulerParameters):
New function.
* src/remote/remote_driver.c (remoteDomainGetSchedulerParameters):
Likewise.
* src/remote/remote_protocol.x
(remote_domain_get_scheduler_parameters_flags_args)
(remote_domain_get_scheduler_parameters_flags_ret): New types.
(remote_procedure): New RPC.
* src/remote_protocol-structs: Likewise.

14 years agoqemu: introduce qemuGetSchedulerParametersFlags
Eric Blake [Tue, 17 May 2011 21:35:26 +0000 (15:35 -0600)] 
qemu: introduce qemuGetSchedulerParametersFlags

* src/qemu/qemu_driver.c (qemuGetSchedulerParameters): Move
guts...
(qemuGetSchedulerParametersFlags): ...to new callback, and honor
flags more accurately.

14 years agosched: introduce virDomainGetSchedulerParametersFlags
Eric Blake [Tue, 17 May 2011 21:17:14 +0000 (15:17 -0600)] 
sched: introduce virDomainGetSchedulerParametersFlags

If we can choose live or config when setting, then we need to
be able to choose which one we are querying.

Also, make the documentation clear that set must use a non-empty
subset (some of the hypervisors fail if params is NULL).

* include/libvirt/libvirt.h.in
(virDomainGetSchedulerParametersFlags): New prototype.
* src/libvirt.c (virDomainGetSchedulerParametersFlags): Implement
it.
* src/libvirt_public.syms: Export it.
* python/generator.py (skip_impl): Don't auto-generate.
* src/driver.h (virDrvDomainGetSchedulerParametersFlags): New
callback.

14 years agoremote: consolidate typed parameter handling
Eric Blake [Tue, 17 May 2011 20:58:40 +0000 (14:58 -0600)] 
remote: consolidate typed parameter handling

* src/remote/remote_protocol.x (remote_typed_param_value)
(remote_typed_param):  New types.
(remote_sched_param_value, remote_sched_param)
(remote_blkio_param_value, remote_blkio_param)
(remote_memory_param_value, remote_memory_param): Delete.
(remote_domain_get_scheduler_parameters_ret)
(remote_domain_set_scheduler_parameters_args)
(remote_domain_set_scheduler_parameters_flags_args)
(remote_domain_set_blkio_parameters_args)
(remote_domain_get_blkio_parameters_ret)
(remote_domain_set_memory_parameters_args)
(remote_domain_get_memory_parameters_ret): Update clients.
* src/remote_protocol-structs: Likewise.
* src/remote/remote_driver.c (remoteSerializeTypedParameters)
(remoteDeserializeTypedParameters): New functions.
(remoteDomainSetMemoryParameters)
(remoteDomainGetMemoryParameters, remoteDomainSetBlkioParameters)
(remoteDomainGetBlkioParameters)
(remoteDomainGetSchedulerParameters)
(remoteDomainSetSchedulerParameters)
(remoteDomainSetSchedulerParametersFlags): Update clients.
* daemon/remote.c (remoteSerializeTypedParameters)
(remoteDeserializeTypedParameters): New functions.
(remoteDispatchDomainGetSchedulerParameters)
(remoteDispatchDomainSetSchedulerParameters)
(remoteDispatchDomainSetSchedulerParametersFlags)
(remoteDispatchDomainSetMemoryParameters)
(remoteDispatchDomainGetMemoryParameters)
(remoteDispatchDomainSetBlkioParameters)
(remoteDispatchDomainGetBlkioParameters): Update clients.

14 years agomaint: prefer newer API names internally
Eric Blake [Thu, 26 May 2011 17:39:04 +0000 (11:39 -0600)] 
maint: prefer newer API names internally

Rather mechanical in nature.

* src/driver.h: Use newer virTypedParameter API names.
* src/libvirt.c: Likewise.
* daemon/remote.c: Likewise.
* src/esx/esx_driver.c: Likewise.
* src/libxl/libxl_driver.c: Likewise.
* src/lxc/lxc_driver.c: Likewise.
* src/qemu/qemu_driver.c: Likewise.
* src/remote/remote_driver.c: Likewise.
* src/test/test_driver.c: Likewise.
* src/xen/xen_driver.c: Likewise.
* src/xen/xen_hypervisor.c: Likewise.
* src/xen/xen_hypervisor.h: Likewise.
* src/xen/xend_internal.c: Likewise.
* tools/virsh.c: Likewise.

14 years agolibvirt.h: avoid regression, and document preferred name
Eric Blake [Sun, 29 May 2011 10:24:20 +0000 (18:24 +0800)] 
libvirt.h: avoid regression, and document preferred name

Commit 824dcaff was a regression (thankfully unreleased) for any
client code that used 'struct _virSchedParameter' directly rather
than the preferred virSchedParameter typedef.  Adding a #define
avoids even that API change, while rearranging the file makes it
clear what the old vs. new API is.

* include/libvirt/libvirt.h.in: Rearrange older names to the
bottom and improve documentation on preferred names.
(virDomainGetSchedulerParameters, virDomainSetSchedulerParameters)
(virDomainSetSchedulerParametersFlags)
(virDomainSetBlkioParameters, virDomainGetBlkioParameters)
(virDomainSetMemoryParameters, virDomainGetMemoryParameters):
Use newer type names.
* python/libvirt-override.c: Adjust code generation to cope.
Suggested by Daniel P. Berrange.

14 years agoFix a make check error
Daniel Veillard [Sun, 29 May 2011 10:21:24 +0000 (18:21 +0800)] 
Fix a make check error

Apparently introdunced in commit 376e1d9420b
the generator produces u_int flags not unsigned int flags.

* src/remote_protocol-structs: fix to the actual expected type and
  alignment

14 years agoFix virExecWithHook Prototype
Richard Laager [Sun, 29 May 2011 01:56:22 +0000 (20:56 -0500)] 
Fix virExecWithHook Prototype

This was necessary to get libvirt to build on Solaris 11 Express and
seems correct (as it makes this match the definition in util.c):

14 years agonwfilter: reorder locks
Stefan Berger [Fri, 27 May 2011 20:50:40 +0000 (16:50 -0400)] 
nwfilter: reorder locks

This patch reorders the locks for the nwfilter updates and the access
the nwfilter objects. In the case that the IP address learning thread
was instantiating filters while an update happened, the previous order
lead to a deadlock.

14 years agointerface: reformat error logs
Laine Stump [Thu, 26 May 2011 17:14:36 +0000 (13:14 -0400)] 
interface: reformat error logs

It was suggested during review of a different patch that the libvirt
interface driver API's should have "netcf:" in their log
messages. This patch eliminates that from all interface driver API
functions, and also eliminates the extra " - " in the case that netcf
returns no details in its error info (which *never* happens at
present, but could happen sometime in the future.

14 years agointerface: implement a test driver for network config transaction API.
Michal Privoznik [Mon, 9 May 2011 19:17:26 +0000 (21:17 +0200)] 
interface: implement a test driver for network config transaction API.

14 years agointerface: Implement driver methods for network config transaction API
Michal Privoznik [Fri, 6 May 2011 12:54:53 +0000 (14:54 +0200)] 
interface: Implement driver methods for network config transaction API

This is the functionality at the end of the libvirt part of the call
chain - for each function, the corresponding netcf API is called.

14 years agointerface: expose network config transaction API to virsh
Michal Privoznik [Fri, 6 May 2011 11:52:13 +0000 (13:52 +0200)] 
interface: expose network config transaction API to virsh

This implements the commands iface-begin, iface-commit, and iface-rollback,
which simply call the corresponding functions in the libvirt API.

14 years agointerface: implement remote protocol for network config transaction API
Michal Privoznik [Thu, 5 May 2011 13:35:40 +0000 (15:35 +0200)] 
interface: implement remote protocol for network config transaction API

14 years agointerface: implement public APIs for libvirt transactional network changes
Michal Privoznik [Thu, 5 May 2011 13:32:15 +0000 (15:32 +0200)] 
interface: implement public APIs for libvirt transactional network changes

14 years agointerface: define internal driver API for network config transactions
Michal Privoznik [Thu, 5 May 2011 10:06:53 +0000 (12:06 +0200)] 
interface: define internal driver API for network config transactions

14 years agointerface: new public API for network config change transactions
Michal Privoznik [Thu, 5 May 2011 09:21:41 +0000 (11:21 +0200)] 
interface: new public API for network config change transactions

This is the API agreed on in:

  https://www.redhat.com/archives/libvir-list/2011-May/msg00026.html

(with a slight name change to use "...begin" rather than
"...start"). This implements transactional changes to the host network
config. When a transaction is begun with ncf_change_begin(), all other
netcf APIs will continue to work as they always have, but a snapshot
of the existing config will be taken, allowing reversion (rollback,
using ncf_change_rollback()) to the exact state of config at the time
ncf_change_begin() was called. Alternately, if it's determined that
the new changes are acceptable, ncf_change_commit() can be called,
which will eliminate the snapshot and make the changes permanent.

As a failsafe measure, if neither ncf_change_commit() or
ncf_change_rollback() is called by the next time the system reboots,
the netcf-transaction initscript will be automatically called to
rollback the changes.

14 years agoopenvz: Fix regression in openvzGetVPSUUID
Matthias Bolte [Fri, 27 May 2011 11:50:13 +0000 (13:50 +0200)] 
openvz: Fix regression in openvzGetVPSUUID

Commit f044376530f313a replaced openvz_readline with getline and
changed EOF-handling in the openvzGetVPSUUID.

This patch restores original EOF-handling.

Reported by Jean-Baptiste Rouault.

14 years agoAdd sexpr.c to the list of file with translatable messages
Matthias Bolte [Fri, 27 May 2011 13:48:47 +0000 (15:48 +0200)] 
Add sexpr.c to the list of file with translatable messages

This should have been in the last commit.

14 years agosexpr: Improve serialization error reporting
Matthias Bolte [Fri, 27 May 2011 13:08:43 +0000 (15:08 +0200)] 
sexpr: Improve serialization error reporting

14 years agoFix build with --with-driver-modules enabled
Matthias Bolte [Thu, 26 May 2011 21:30:21 +0000 (23:30 +0200)] 
Fix build with --with-driver-modules enabled

Export a bunch of missing symbols and link the remote driver to gnulib.

14 years agoqemu: implement the new flags for setting memory parameters
Hu Tao [Fri, 27 May 2011 07:47:41 +0000 (15:47 +0800)] 
qemu: implement the new flags for setting memory parameters

* src/qemu/qemu_driver.c: update qemuDomainSetMemoryParameters to
  look at the flag parameter and depending on it save the config
  or the live amount

14 years agoqemu: implement the new flags for getting memory parameters
Hu Tao [Fri, 27 May 2011 07:41:29 +0000 (15:41 +0800)] 
qemu: implement the new flags for getting memory parameters

* src/qemu/qemu_driver.c: update qemuDomainGetMemoryParameters to
  look at the flag parameter and depending on it read the config
  or the live amount

14 years agoAdd new flags for setting memory parameters
Hu Tao [Fri, 27 May 2011 07:35:11 +0000 (15:35 +0800)] 
Add new flags for setting memory parameters

The new flags allow to pick current state, config or the live
parameter, with current being the existing API default (0).
This also hooks this to --config, --live, --current parameters for
the memtune virsh command

* include/libvirt/libvirt.h.in: defines the new flags
* tools/virsh.c: adds support at virsh level
* tools/virsh.pod: updates virsh documentation

14 years agoqemu : support persistent add/delete network interface
KAMEZAWA Hiroyuki [Fri, 27 May 2011 07:01:47 +0000 (15:01 +0800)] 
qemu : support persistent add/delete network interface

This patch allows to modify interfaces of domain(qemu)
* src/conf/domain_conf.c src/conf/domain_conf.h src/libvirt_private.syms:
  (virDomainNetInsert)     : Insert a network device to domain definition.
  (virDomainNetIndexByMac) : Returns an index of net device in array.
  (virDomainNetRemoveByMac): Remove a NIC of passed MAC address.
* src/qemu/qemu_driver.c
  (qemuDomainAttachDeviceConfig): add codes for NIC.
  (qemuDomainDetachDeviceConfig): add codes for NIC.

14 years agoesx: Fix regression in absolute file name handling
Matthias Bolte [Thu, 26 May 2011 15:40:51 +0000 (17:40 +0200)] 
esx: Fix regression in absolute file name handling

Before commit 145d6cb05c45f4 (in August 2010) absolute file names
in VMX and domain XML configs were handled correctly. But this got
lost during the refactoring. The test cases didn't highlight this
problem because they have their own set of file name handling
functions. The actual ones require a real connection to an ESX
server. Also the test case functions always worked correctly.

Fix the regression and add a new in-the-wild VMX file that contains
such a problematic absolute path. Even though this test case won't
protect against new regressions.

Reported by lofic (IRC nick)

14 years agoopenvz: Add simple testcase for config file parsing function
Matthias Bolte [Thu, 26 May 2011 17:45:41 +0000 (19:45 +0200)] 
openvz: Add simple testcase for config file parsing function

This testcase passes before the regression is added in f0443765, fails
after that commit and passes again after the regression was fixed.

14 years agodon't check flags in virDomainSetSchedulerParametersFlags
Hu Tao [Wed, 18 May 2011 02:34:20 +0000 (10:34 +0800)] 
don't check flags in virDomainSetSchedulerParametersFlags

drivers implementing domainSetSchedulerParametersFlags should check
flags themselves.

14 years agoopenvz: Fix regression in config file parsing
Taisuke Yamada [Thu, 26 May 2011 17:28:54 +0000 (19:28 +0200)] 
openvz: Fix regression in config file parsing

As reported by Diego Blanco in

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

commit f0443765 which replaced openvz_readline to getline(3)
broke OpenVZ driver as it changed semantics of EOF-handling
when parsing OpenVZ configuration.

There're several other issues reported with current OpenVZ driver:

 #1: unclear error message when parsing "CPUS=" line
 #2: openvz driver goes into crashing loop
 #3: "NETIF=" line in configuration is not parsed correctly
 #4: aborts even when optional parameter is missing
 #5: there's a potential memory leak

This updated patch to fix #[145]. This patch does not fix #[23]
as I haven't verified these yet, but this at least got me to run
OpenVZ on libvirt once again.

14 years agoaudit: fix minor off-by-one
Eric Blake [Thu, 26 May 2011 15:09:42 +0000 (09:09 -0600)] 
audit: fix minor off-by-one

Coverity spotted this off-by-one.  Thankfully, no one in libvirt
was ever calling virAuditSend with an argument of 3.

* src/util/virtaudit.c (virAuditSend): Use correct comparison.

14 years agoqemu: allow blkstat/blkinfo calls during migration
Federico Simoncelli [Fri, 13 May 2011 10:11:47 +0000 (06:11 -0400)] 
qemu: allow blkstat/blkinfo calls during migration

Originally most of libvirt domain-specific calls were blocking
during a migration.
A new mechanism to allow specific calls (blkstat/blkinfo) to be
executed in such condition has been implemented.
In the long term it'd be desirable to get a more general
solution to mark further APIs as migration safe, without needing
special case code.

 * src/qemu/qemu_migration.c: add some additional job signal
   flags for doing blkstat/blkinfo during a migration
 * src/qemu/qemu_domain.c: add a condition variable that can be
   used to efficiently wait for the migration code to clear the
   signal flag
 * src/qemu/qemu_driver.c: execute blkstat/blkinfo using the
   job signal flags during migration

14 years agoAdd disk attach/detach support to libxl driver
Markus Groß [Thu, 26 May 2011 15:27:06 +0000 (23:27 +0800)] 
Add disk attach/detach support to libxl driver

Based on the device attach/detach code from the QEMU driver,
but using the new functions to create the structures associated.
* src/libxl/libxl_driver.c: implements domainAttachDevice,
  domainAttachDeviceFlags, domainDetachDevice, domainDetachDeviceFlags
  and domainUpdateDeviceFlags

14 years agoFix libxl vm def handling on domU cleanup
Markus Groß [Thu, 26 May 2011 15:16:31 +0000 (23:16 +0800)] 
Fix libxl vm def handling on domU cleanup

* src/libxl/libxl_driver.c: in libxlVmCleanup, free up the
  newDef definition if present overwise it would be leaked.

14 years agoRefactored libxl datastructure instantiation
Markus Groß [Thu, 26 May 2011 15:09:01 +0000 (23:09 +0800)] 
Refactored libxl datastructure instantiation

Create 3 new function refactored from previous list ones and
exports them internally to the driver

* src/libxl/libxl_conf.c src/libxl/libxl_conf.h: create libxlMakeDisk,
  libxlMakeNic libxlMakeVfb out of the exsting static List functions
  and exports them

14 years agoFix modifying disk devices in qemu driver
Markus Groß [Thu, 26 May 2011 14:28:23 +0000 (22:28 +0800)] 
Fix modifying disk devices in qemu driver

When modifying the disk devices of a live domain and the domain
configuration, the function qemuDomainAttachDeviceConfig
first sets dev->data->disk to NULL. Later qemuDomainAttachDeviceLive
accesses dev->data.disk and causes a segfault.
* src/qemu/qemu_driver.c: fix qemuDomainModifyDeviceFlags() accordingly

14 years agoschema: Add graphics element passwdValidTo attribute to schema
Michal Privoznik [Thu, 26 May 2011 11:47:39 +0000 (13:47 +0200)] 
schema: Add graphics element passwdValidTo attribute to schema

We support this in code, but forgot to add this to RNG schema as well.
According to documentation, the value match the dateTime type.

14 years agobuild: fix 'make dist' for ./configure --without-remote
Eric Blake [Wed, 11 May 2011 20:26:06 +0000 (14:26 -0600)] 
build: fix 'make dist' for ./configure --without-remote

Anything generated that must end up in the tarball must either
have unconditional rules for generation (remote_protocol.c) or
must live in libvirt.git for the case where the person running
'make dist' has disabled the configure options that control the
rebuild of the generated file (remote_protocol-structs).

* src/Makefile.am (remote_protocol-structs): Add a dependency and
document why it must live in git.
($(srcdir)/remote/%_protocol.c, $(srcdir)/remote/%_protocol.c):
Unconditionally generate.

14 years agojson: Avoid passing large positive 64 bit integers to QMP.
Richard W.M. Jones [Wed, 25 May 2011 16:52:26 +0000 (17:52 +0100)] 
json: Avoid passing large positive 64 bit integers to QMP.

http://lists.gnu.org/archive/html/qemu-devel/2011-05/threads.html#02162

Currently, qemu silently clips any JSON integer in the range
0x8000000000000000 - 0xffffffffffffffff (all numbers in this range
will be clipped to 0x7fffffffffffffff == LLONG_MAX).

To avoid this, pass these as signed 64 bit integers in the QMP
request.

14 years agoFix sign mismatches between public API, driver API and XDR protocol
Matthias Bolte [Sat, 21 May 2011 14:20:44 +0000 (16:20 +0200)] 
Fix sign mismatches between public API, driver API and XDR protocol

In most cases this affects flags parameters that are unsigned in the
public and driver API but signed in the XDR protocol. Switch the
XDR protocol to unsigned for those.

A counterexample is virNWFilterGetXMLDesc. Its flags parameter is signed
in the public API and XDR protocol, but unsigned in the driver API.

14 years agoremote generator: Fix XDR sign mismatch for virNodeGet(Cells)FreeMemory
Matthias Bolte [Sat, 21 May 2011 10:24:40 +0000 (12:24 +0200)] 
remote generator: Fix XDR sign mismatch for virNodeGet(Cells)FreeMemory

virNodeGetFreeMemory used unsigned long long in the public API but
signed hyper in the XDR protocol. Convert the XDR protocol to use
unsigned hyper.

As explained by Eric before, this doesn't affect the on-the-wire protocol.

14 years agoremote generator: Handle stream-using functions
Matthias Bolte [Sat, 21 May 2011 09:24:28 +0000 (11:24 +0200)] 
remote generator: Handle stream-using functions

Extend procedure annotation in the .x file for stream handling.

Adds a missing remoteStreamRelease call to remoteDomainScreenshot
error path.

14 years agoremote generator: Make call-by-reference handling stricter
Matthias Bolte [Sat, 21 May 2011 09:16:07 +0000 (11:16 +0200)] 
remote generator: Make call-by-reference handling stricter

Several functions return values by reference parameters. This is realized
by passing the members of remote_CALL_ret by reference to the called
function.

The position of this parameters in the function signature follows some
patterns with some exceptions. This patterns and exceptions are hardcoded
in the generator.

Add an insert@<offset> annotation to the remote_CALL_ret struct members
for functions that return lists to remove some of the hardcoded patterns
and exceptions.

14 years agoremote generator: Rename virNodeGetCellsFreeMemory parameters to common pattern
Matthias Bolte [Sat, 21 May 2011 07:52:19 +0000 (09:52 +0200)] 
remote generator: Rename virNodeGetCellsFreeMemory parameters to common pattern

This allows to remove some special case code from the generator.

14 years agoremote generator: Handle virDomainCreateWithFlags
Matthias Bolte [Fri, 20 May 2011 15:58:34 +0000 (17:58 +0200)] 
remote generator: Handle virDomainCreateWithFlags

Add special case code for updating a given domain object instead of
returning a new one.

14 years agovirsh: time_t is not a long on FreeBSD
Matthias Bolte [Fri, 13 May 2011 06:31:03 +0000 (08:31 +0200)] 
virsh: time_t is not a long on FreeBSD

localtime_r expects time_t.