]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
13 years agoMove virRun, virExec*, virFork to util/command
Cole Robinson [Tue, 10 May 2011 18:42:59 +0000 (14:42 -0400)]
Move virRun, virExec*, virFork to util/command

Seems reasonable to have all command wrappers in the same place

v2:
    Dont move SetInherit

v3:
    Comment spelling fix
    Adjust WARN0 comment
    Remove spurious #include movement
    Don't include sys/types.h
    Combine virExec enums

Signed-off-by: Cole Robinson <crobinso@redhat.com>
13 years agoutil: Implement virRun as a wrapper around virCommand
Cole Robinson [Fri, 6 May 2011 20:41:03 +0000 (16:41 -0400)]
util: Implement virRun as a wrapper around virCommand

v2:
    Simplify command building
    Handle command building failure

v3:
    Remove unneeded NULL check

Signed-off-by: Cole Robinson <crobinso@redhat.com>
13 years agoutil: Remove unused virExec wrapper
Cole Robinson [Fri, 6 May 2011 20:36:16 +0000 (16:36 -0400)]
util: Remove unused virExec wrapper

v3:
    Remove obsolete comment

Signed-off-by: Cole Robinson <crobinso@redhat.com>
13 years agoqemu: Convert virExec usage to virCommand
Cole Robinson [Fri, 6 May 2011 20:10:40 +0000 (16:10 -0400)]
qemu: Convert virExec usage to virCommand

v2:
    Have virCommand cleanup intermediate process for us

v3:
    Preserve original FD closing behavior

Signed-off-by: Cole Robinson <crobinso@redhat.com>
13 years agoesx: Remove duplicated invalid-argument checks
Matthias Bolte [Tue, 7 Jun 2011 07:35:03 +0000 (09:35 +0200)]
esx: Remove duplicated invalid-argument checks

Those checks are already performed at the public API level.

13 years agodocs: Add doc for video element
Osier Yang [Tue, 7 Jun 2011 08:56:06 +0000 (16:56 +0800)]
docs: Add doc for video element

For backwards compatibility, if no <video> is set but there is a
<graphics> tag, then we add a default <video> according to the
guest type. Add docs to tell the user about this to not make
them confused. Especially if they remove the video (such as via
"virsh edit"), it will be surprised for them to see the video
element is still in domain XML.

13 years agoUse VIR_USE_CPU instead of new wheel
Osier Yang [Tue, 7 Jun 2011 08:51:51 +0000 (16:51 +0800)]
Use VIR_USE_CPU instead of new wheel

13 years agoAvoid virGetVersion failure on specific driver support configurations
Matthias Bolte [Wed, 1 Jun 2011 08:29:13 +0000 (10:29 +0200)]
Avoid virGetVersion failure on specific driver support configurations

virGetVersion itself doesn't take a virConnectPtr, but in order to obtain
the hypervisor version against which libvirt was compiled it is used in
combination with virConnectGetType like this:

hvType = virConnectGetType(conn)
virGetVersion(&libVer, hvType, &typeVer)

When virConnectGetType is called on a remote connection then the remote
driver returns the type of the underlying driver on the server side, for
example QEMU. Then virGetVersion compares hvType to a set of strings that
depend on configure options and returns LIBVIR_VERSION_NUMBER in most
cases. Now this fails in case libvirt on the client side is just compiled
with the remote driver enabled only and the server side has the actual
driver such as the QEMU driver. It just happens to work when the actual
driver is enabled on client and server side. But that's not always true.
I noticed this on FreeBSD:

freebsd# virsh -c qemu+tcp://192.168.178.22/system version
Compiled against library: libvir 0.9.2
error: failed to get the library version
error: this function is not supported by the connection driver: virGetVersion

This is not FreeBSD specific, happens on Windows as well due to the
similar driver support configuration. The problem is that virConnectGetType
returns QEMU, but virGetVersion on the client side only accepts Remote
as hvType due to all other drivers being disabled on the client side.

Daniel P. Berrange suggested to get rid of all the conditional code in
virGetVersion, ignoring the hvType and always setting typeVer to
LIBVIR_VERSION_NUMBER. virConnectGetVersion is supposed to be used to
obtain the hypervisor version.

13 years agodocs: Make hvsupport.pl pick up the host device drivers
Matthias Bolte [Sat, 4 Jun 2011 21:24:54 +0000 (23:24 +0200)]
docs: Make hvsupport.pl pick up the host device drivers

Annotate the ESX device driver dummy.

Refactor the udev and hal device driver strcuts to match the
common annotation pattern.

13 years agoRelease of libvirt-0.9.2
Daniel Veillard [Mon, 6 Jun 2011 03:46:37 +0000 (11:46 +0800)]
Release of libvirt-0.9.2

* configure.ac docs/news.html.in libvirt.spec.in: update for release
* po/*.po*: updated translations and regenerated

13 years agoesx: Fix driver method version annotations
Matthias Bolte [Mon, 6 Jun 2011 03:08:06 +0000 (11:08 +0800)]
esx: Fix driver method version annotations

Change the driver comments for proper extraction and values by
the scripts used for documentation

13 years agoFix QEMU p2p v2 migration when run from a v3 client
Daniel P. Berrange [Mon, 6 Jun 2011 03:05:34 +0000 (11:05 +0800)]
Fix QEMU p2p v2 migration when run from a v3 client

When peer-2-peer migration was invoked by a client supporting
v3, but where the target server only supported v2, we'd not
correctly shutdown the guest.

* src/qemu/qemu_migration.c: Ensure guest is shutdown in
  v2 peer 2 peer migration

13 years agovbox: Fix typo in error message
Matthias Bolte [Sat, 4 Jun 2011 20:40:57 +0000 (22:40 +0200)]
vbox: Fix typo in error message

13 years agoDon't raise an error if the migration cookie is NULL
Daniel P. Berrange [Sat, 4 Jun 2011 10:14:05 +0000 (06:14 -0400)]
Don't raise an error if the migration cookie is NULL

The v2 migration protocol doesn't use cookies, so we should not
be raising an error if the cookie parameters are NULL.

* src/qemu/qemu_migration.c: Don't raise error if cookie is NULL

13 years agoFix check of virKillProcess return status
Daniel P. Berrange [Sat, 4 Jun 2011 10:05:28 +0000 (06:05 -0400)]
Fix check of virKillProcess return status

The error code for virKillProcess is returned in the errno variable
not the return value. THis mistake caused the logs to be filled with
errors when shutting down QEMU processes

* src/qemu/qemu_process.c: Fix process kill check.

13 years agovbox: Fix version extraction on Windows for newer VirtualBox versions
Matthias Bolte [Sat, 4 Jun 2011 08:50:36 +0000 (10:50 +0200)]
vbox: Fix version extraction on Windows for newer VirtualBox versions

VirtualBox 4.0.8 changed the registry key layout. Before the version
number was in a Version key. Now the Version key contains %VER% and
the actual version number is in VersionExt now.

Move value lookup code into its own function: vboxLookupRegistryValue.

13 years agoAPI: consolidate common unreleased enums
Eric Blake [Fri, 3 Jun 2011 16:10:58 +0000 (10:10 -0600)]
API: consolidate common unreleased enums

This commit is safe precisely because there has been no release
for any of the enum values being deleted (they were added post-0.9.1).

After the 0.9.2 release, we can then take advantage of
virDomainModificationImpact in more places.

* include/libvirt/libvirt.h.in (virDomainModificationImpact): New
enum.
(virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since
these were never released, and the new enum works fine here.
* src/libvirt.c (virDomainGetMemoryParameters)
(virDomainSetMemoryParameters)
(virDomainGetSchedulerParametersFlags)
(virDomainSetSchedulerParametersFlags): Update documentation.
* src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters)
(qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags)
(qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags)
(qemuGetSchedulerParameters): Adjust clients.
* tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise.
Based on ideas by Daniel Veillard and Hu Tao.

13 years agoqemu: Avoid use after free in qemuCaps parsing
Jiri Denemark [Fri, 3 Jun 2011 14:33:25 +0000 (16:33 +0200)]
qemu: Avoid use after free in qemuCaps parsing

13 years agovirsh: Document nodeinfo output
Jiri Denemark [Thu, 2 Jun 2011 08:56:43 +0000 (10:56 +0200)]
virsh: Document nodeinfo output

13 years agosecurity driver: ignore EINVAL when chowning an image file
Laine Stump [Fri, 3 Jun 2011 15:59:09 +0000 (11:59 -0400)]
security driver: ignore EINVAL when chowning an image file

This fixes:

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

Both of these complain of a failure to use an image file that resides
on a read-only NFS volume. The function in the DAC security driver
that chowns image files to the qemu user:group before using them
already has special cases to ignore failure of chown on read-only file
systems, and in a few other cases, but it hadn't been checking for
EINVAL, which is what is returned if the qemu user doesn't even exist
on the NFS server.

Since the explanation of EINVAL in the chown man page almost exactly
matches the log message already present for the case of EOPNOTSUPP,
I've just added EINVAL to that same conditional.

13 years agoMake dlopen usage in lock manager conditional
Matthias Bolte [Fri, 3 Jun 2011 08:20:49 +0000 (10:20 +0200)]
Make dlopen usage in lock manager conditional

This fixes a build failure on MinGW, due to MinGW not supporting dlopen.

13 years agoCorrect 'cputune' documentation example.
Neil Wilson [Fri, 3 Jun 2011 13:43:30 +0000 (14:43 +0100)]
Correct 'cputune' documentation example.

Signed-off-by: Neil Wilson <neil@aldur.co.uk>
13 years agobuild: silence coverity false positive
Eric Blake [Thu, 2 Jun 2011 21:45:31 +0000 (15:45 -0600)]
build: silence coverity false positive

Coverity couldn't see that priv is NULL on failure.  But on failure,
we might as well guarantee that callers don't try to free uninitialized
memory.

* src/remote/remote_driver.c (remoteGenericOpen): Even on failure,
pass priv back to caller.

13 years agobuild: silence coverity false positive
Eric Blake [Thu, 2 Jun 2011 21:31:48 +0000 (15:31 -0600)]
build: silence coverity false positive

Coverity complained that infd could be -1 at the point where it is
passed to write, when in reality, this code can only be reached if
infd is non-negative.

* src/util/command.c (virCommandProcessIO): Help out coverity.

13 years agomigrate: detect xml incompatibility
Eric Blake [Thu, 2 Jun 2011 23:40:39 +0000 (17:40 -0600)]
migrate: detect xml incompatibility

Detected by Coverity.  Bug introduced in 08106e2044 (unreleased).

* src/conf/domain_conf.c (virDomainChannelDefCheckABIStability):
Use correct sizeof operand.

13 years agoevent: avoid memory leak on cleanup
Eric Blake [Thu, 2 Jun 2011 22:54:09 +0000 (16:54 -0600)]
event: avoid memory leak on cleanup

Detected by Coverity.  Introduced in commit aaf2b70, and turned into
a regression in the next few commits through 4e6e6672 (unreleased).

* src/conf/domain_event.c (virDomainEventStateFree): Free object,
per documentation.

13 years agoqemu: avoid memory leak on vcpupin
Eric Blake [Thu, 2 Jun 2011 22:47:53 +0000 (16:47 -0600)]
qemu: avoid memory leak on vcpupin

Detected by Coverity.  This leaked a cpumap on every iteration
of the loop.  Leak introduced in commit 1cc4d02 (v0.9.0).

* src/qemu/qemu_process.c (qemuProcessSetVcpuAffinites): Plug
leak, and hoist allocation outside loop.

13 years agoremote: avoid leak on failure
Eric Blake [Thu, 2 Jun 2011 22:42:45 +0000 (16:42 -0600)]
remote: avoid leak on failure

Detected by Coverity.  Only possible in OOM situations.

* daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak.

13 years agolock: avoid leak on failure
Eric Blake [Thu, 2 Jun 2011 22:38:38 +0000 (16:38 -0600)]
lock: avoid leak on failure

Detected by Coverity.  Only possible on OOM situations.

* src/locking/lock_manager.c (virLockManagerPluginNew): Plug leak.

13 years agostorage: avoid memory leak on stat failure
Eric Blake [Thu, 2 Jun 2011 22:27:48 +0000 (16:27 -0600)]
storage: avoid memory leak on stat failure

Spotted by coverity.  Triggers on failed stat, although I'm not sure
how easy that condition is, so I'm not sure if this is a runtime
memory hog.  Regression introduced in commit 8077d64 (unreleased).

* src/util/storage_file.c (virStorageFileGetMetadataFromFD):
Reduce need for malloc, avoiding a leak.

13 years agostorage: avoid memory leak
Eric Blake [Thu, 2 Jun 2011 22:08:28 +0000 (16:08 -0600)]
storage: avoid memory leak

Coverity detected that options was being set by strdup but never
freed.  But why even bother with an options variable?  The options
parameter never changes!  Leak present since commit 44948f5b (0.7.0).

This function could probably be rewritten to take better advantage
of virCommand, but that is more invasive.

* src/storage/storage_backend_fs.c
(virStorageBackendFileSystemMount): Avoid wasted strdup, and
guarantee proper cleanup on all paths.

13 years agolibvirtd: avoid leak on failure
Eric Blake [Thu, 2 Jun 2011 21:56:32 +0000 (15:56 -0600)]
libvirtd: avoid leak on failure

Spotted by Coverity.  Only possible on an OOM condition, so
unlikely to bite in the wild.

* daemon/libvirtd.c (qemudSetLogging): Don't leak memory.

13 years agocommand: avoid leak on failure
Eric Blake [Thu, 2 Jun 2011 21:50:11 +0000 (15:50 -0600)]
command: avoid leak on failure

Detected by Coverity.  While it is possible on OOM condition, as
well as with bad code that passes binary == NULL, it is unlikely
to be encountered in the wild.

* src/util/command.c (virCommandNewArgList): Don't leak memory.

13 years agoExplicitly set VM state to paused after migration completes
Daniel P. Berrange [Thu, 2 Jun 2011 15:40:33 +0000 (11:40 -0400)]
Explicitly set VM state to paused after migration completes

In v3 migration, once migration is completed, the VM needs
to be left in a paused state until after Finish3 has been
executed on the target. Only then will the VM be killed
off. When using non-JSON QEMU monitor though, we don't
receive any 'STOP' event from QEMU, so we need to manually
set our state offline & thus release lock manager leases.
It doesn't hurt to run this on the JSON case too, just in
case the event gets lost somehow

* src/qemu/qemu_migration.c: Explicitly set VM state to
  paused when migration completes

13 years agoFix regressions BlockStats/Info APIs in QEMU driver
Daniel P. Berrange [Thu, 2 Jun 2011 13:55:56 +0000 (14:55 +0100)]
Fix regressions BlockStats/Info APIs in QEMU driver

The change 18c2a592064d69499f70428e498f4a3cb5161cda caused
some regressions in behaviour of virDomainBlockStats
and virDomainBlockInfo in the QEMU driver.

The virDomainBlockInfo API stopped working for inactive
guests if querying a block device.

The virDomainBlockStats API did not promptly report
an error if the guest was not running in some cases.

* src/qemu/qemu_driver.c: Fix inactive guest handling
  in BlockStats/Info APIs

13 years agoFix minor issues in libxenlight managed save
Jim Fehlig [Thu, 2 Jun 2011 21:41:13 +0000 (15:41 -0600)]
Fix minor issues in libxenlight managed save

There were a few minor issues in commit 5b6c961e
- leak managed save path
- leak managed save fd
- functions that open an fd should also close it

13 years agouml: correct command line networking parameters
Heath Petersen [Thu, 2 Jun 2011 16:23:43 +0000 (11:23 -0500)]
uml: correct command line networking parameters

I have been finding that some UML command line networking parameters are
being generated incorrectly.

For more information, see
https://bugzilla.redhat.com/show_bug.cgi?id=706295 .

13 years agodocs: document iface-* commands
Eric Blake [Tue, 31 May 2011 19:45:50 +0000 (13:45 -0600)]
docs: document iface-* commands

I intentionally set things up so 'virsh help interface' lists
commands in alphabetical order, but 'man virsh' lists them in
topical order; this matches our practice on some other commands.

* tools/virsh.pod: Document all iface commands.
* tools/virsh.c (ifaceCmds): Sort.

13 years agoFix auditing of disk hotunplug operations
Daniel P. Berrange [Thu, 2 Jun 2011 13:52:24 +0000 (14:52 +0100)]
Fix auditing of disk hotunplug operations

The qemuAuditDisk calls in disk hotunplug operations were being
passed 'ret >= 0', but the code which sets ret to 0 was not yet
executed, and the error path had already jumped to the 'cleanup'
label. This meant hotunplug failures were never audited, and
hotunplug success was audited as a failure

* src/qemu/qemu_hotplug.c: Fix auditing of hotunplug

13 years agoAvoid crash on NULL pointer in lock driver impls during hotplug
Daniel P. Berrange [Thu, 2 Jun 2011 13:44:10 +0000 (14:44 +0100)]
Avoid crash on NULL pointer in lock driver impls during hotplug

When virLockDriverAcquire is invoked during hotplug the state
parameter will be left as NULL.

* src/locking/lock_driver_nop.c,
  src/locking/lock_driver_sanlock.c: Don't reference NULL state
  parameter

13 years agoFix return value in lock manager hotplug methods
Daniel P. Berrange [Thu, 2 Jun 2011 13:43:20 +0000 (14:43 +0100)]
Fix return value in lock manager hotplug methods

Refactoring of the lock manager hotplug methods lost the
ret = 0 assignment for successful return path

* src/locking/domain_lock.c: Add missing ret = 0 assignments

13 years agoMake sure virDomainSave/virDomainManagedSave reset id to -1
Daniel P. Berrange [Thu, 2 Jun 2011 13:42:21 +0000 (14:42 +0100)]
Make sure virDomainSave/virDomainManagedSave reset id to -1

After successfull virDomainSave/virDomainManagedSave calls
the guest will no longer be active, so the domain ID must
be reset to -1

* daemon/remote_generator.pl: Special case virDomainSave &
  virDomainManagedSave for same reason as virDomainDestroy

13 years agoFix handling of VIR_EVENT_HANDLE_ERROR in QEMU monitor
Daniel P. Berrange [Thu, 2 Jun 2011 10:50:03 +0000 (11:50 +0100)]
Fix handling of VIR_EVENT_HANDLE_ERROR in QEMU monitor

Commit 4454a9efc728b91e791b1f14c26ea23a19d57f48 introduced bad
behaviour on the VIR_EVENT_HANDLE_ERROR condition. This condition
is only hit when an invalid FD is used in poll() (typically due
to a double-close bug). The QEMU monitor code was treating this
condition as non-fatal, and thus libvirt would poll() in a fast
loop forever burning 100% CPU. VIR_EVENT_HANDLE_ERROR must be
handled in the same way as VIR_EVENT_HANDLE_HANGUP, killing the
QEMU instance.

* src/qemu/qemu_monitor.c: Treat VIR_EVENT_HANDLE_ERROR as EOF

13 years agoAdd call to sanlock_restrict() in QEMU lock driver
Daniel P. Berrange [Thu, 2 Jun 2011 10:46:56 +0000 (11:46 +0100)]
Add call to sanlock_restrict() in QEMU lock driver

In between fork and exec, a connection to sanlock is acquired
and the socket file descriptor is intionally leaked to the
child process. sanlock watches this FD for POLL_HANGUP to
detect when QEMU has exited. We don't want a rogus/compromised
QEMU from issuing sanlock RPC calls on the leaked FD though,
since that could be used to DOS other guests. By calling
sanlock_restrict() on the socket before exec() we can lock
it down.

* configure.ac: Check for sanlock_restrict API
* src/locking/domain_lock.c: Restrict lock acquired in
  process startup phase
* src/locking/lock_driver.h: Add VIR_LOCK_MANAGER_ACQUIRE_RESTRICT
* src/locking/lock_driver_sanlock.c: Add call to sanlock_restrict
  when requested by VIR_LOCK_MANAGER_ACQUIRE_RESTRICT flag

13 years agobuild: fix VPATH build break from previous patch
Eric Blake [Thu, 2 Jun 2011 14:17:25 +0000 (08:17 -0600)]
build: fix VPATH build break from previous patch

Partial revert of commit c3c30d4de9d.

* docs/Makefile.am (internals/%.html.tmp): Restore MKDIR_P; it is
needed for intermediate file after all.
Reported by Daniel P. Berrange.

13 years agoscreenshot: Expose the new API in virsh
Michal Privoznik [Thu, 12 May 2011 16:29:12 +0000 (18:29 +0200)]
screenshot: Expose the new API in virsh

* tools/virsh.c: Add screenshot command
* tools/virsh.pod: Document new command
* src/libvirt.c: Fix off-be-one error

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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.

13 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

13 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

13 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

13 years agosecurity: plug regression introduced in disk probe logic
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.

13 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.

13 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.

13 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

13 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.

13 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.

13 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.

13 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.

13 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.

13 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

13 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.

13 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.

13 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'>.

13 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

13 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.

13 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.

13 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.

13 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.

13 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

13 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

13 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

13 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:'

13 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.

13 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

13 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.

13 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

13 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

13 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

13 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

13 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

13 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.

13 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.

13 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.

13 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.

13 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

13 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

13 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.

13 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

13 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

13 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

13 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.