]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
12 years agoutil: Error out if the numa nodeset is out of range
Osier Yang [Mon, 22 Apr 2013 07:14:56 +0000 (15:14 +0800)]
util: Error out if the numa nodeset is out of range

Instead of a silent warning, it's better to error out if the
numa nodeset is out of range. Just like for numa node larger
than NUMA_NUM_NODES.

12 years agoselinux: Don't mask errors of virSecuritySELinuxGenNewContext
Peter Krempa [Wed, 24 Apr 2013 12:38:54 +0000 (14:38 +0200)]
selinux: Don't mask errors of virSecuritySELinuxGenNewContext

Since cbe67ff9b0a5a94911afd4d12388bf182bcca86c
virSecuritySELinuxGenNewContext reports good error messages. Fix callers
that mask the errors by generic error message.

12 years agoqemu: Improve handling of channels when generating SPICE command line
Peter Krempa [Tue, 23 Apr 2013 12:23:30 +0000 (14:23 +0200)]
qemu: Improve handling of channels when generating SPICE command line

Improve error reporting and generating of SPICE command line arguments
according to the need to enable TLS. If TLS is disabled, there's no need
to pass the certificate dir to qemu.

This patch resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=953126

12 years agoqemu: Do sensible auto allocation of SPICE port numbers
Peter Krempa [Tue, 23 Apr 2013 05:01:38 +0000 (07:01 +0200)]
qemu: Do sensible auto allocation of SPICE port numbers

With this patch, if the autoport attribute is used, the code will
sensibly auto allocate the ports only if needed.

12 years agoMake driver method names consistent with public APIs
Daniel P. Berrange [Tue, 23 Apr 2013 12:50:18 +0000 (13:50 +0100)]
Make driver method names consistent with public APIs

Ensure that all drivers implementing public APIs use a
naming convention for their implementation that matches
the public API name.

eg for the public API   virDomainCreate make sure QEMU
uses qemuDomainCreate and not qemuDomainStart

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoDedicated name for sub-driver open/close methods
Daniel P. Berrange [Tue, 23 Apr 2013 12:49:21 +0000 (13:49 +0100)]
Dedicated name for sub-driver open/close methods

It will simplify later work if the sub-drivers have dedicated
APIs / field names. ie virNetworkDriver should have
virDrvNetworkOpen and virDrvNetworkClose methods

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoRename 'DeviceMonitor' to 'NodeDeviceDriver'
Daniel P. Berrange [Tue, 23 Apr 2013 10:15:48 +0000 (11:15 +0100)]
Rename 'DeviceMonitor' to 'NodeDeviceDriver'

The driver.h struct for node devices used an inconsistent
naming scheme 'DeviceMonitor' instead of the more usual
'NodeDeviceDriver'. Fix this everywhere it has leaked
out to.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoSanitize whitespace in driver.h
Daniel P. Berrange [Tue, 23 Apr 2013 09:49:27 +0000 (10:49 +0100)]
Sanitize whitespace in driver.h

The driver.h file has no consistent indentation usage across
all the typedefs. Attempts to vertically align struct field
members have also been inconsistently applied. Sanitize the
whitespace used for typedefs & remove all vertical alignment
from structs

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoExtend previous check to validate driver struct field names
Daniel P. Berrange [Mon, 22 Apr 2013 17:26:01 +0000 (18:26 +0100)]
Extend previous check to validate driver struct field names

Ensure that the driver struct field names match the public
API names. For an API virXXXX we must have a driver struct
field xXXXX. ie strip the leading 'vir' and lowercase any
leading uppercase letters.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoEnsure driver method names match public API names
Daniel P. Berrange [Mon, 22 Apr 2013 17:25:01 +0000 (18:25 +0100)]
Ensure driver method names match public API names

Ensure that the virDrvXXX method names exactly match
the public APIs virYYY method names. ie XXX == YYY.
Add a test case to prevent any regressions.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoMake naming of remote procedures match API names exactly
Daniel P. Berrange [Thu, 18 Apr 2013 11:07:23 +0000 (12:07 +0100)]
Make naming of remote procedures match API names exactly

A number of the remote procedure names did not match the
corresponding API names. For example, many lacked the
word 'CONNECT', others re-arranged the names. Update the
procedures so their names exactly match the API names.
Then remove the special case handling of these APIs in
the generator

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoCleanup command line options in gendispatch.pl
Daniel P. Berrange [Thu, 18 Apr 2013 10:29:56 +0000 (11:29 +0100)]
Cleanup command line options in gendispatch.pl

There are many declared options in gendispatch.pl that were
no longer used. Those which were used were obscure '-b', '-k'
and '-d'. Switch to use --mode={debug|client|server}.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: Split out SPICE port allocation into a separate function
Peter Krempa [Mon, 22 Apr 2013 14:26:57 +0000 (16:26 +0200)]
qemu: Split out SPICE port allocation into a separate function

Later on this function will be used to do more sophisticated checks and
determination if port allocation is needed.

12 years agoqemu: Use switch instead of ifs in qemuBuildGraphicsCommandLine
Peter Krempa [Mon, 22 Apr 2013 13:13:46 +0000 (15:13 +0200)]
qemu: Use switch instead of ifs in qemuBuildGraphicsCommandLine

Switch the function from a bunch of ifs to a switch statement with
correct type and reflow some code.

Also fix comment in enum describing possible graphics types

12 years agoqemu: Split out code to generate VNC command line
Peter Krempa [Mon, 22 Apr 2013 12:39:46 +0000 (14:39 +0200)]
qemu: Split out code to generate VNC command line

Decrease size of qemuBuildGraphicsCommandLine() by splitting out
spice-related code into qemuBuildGraphicsVNCCommandLine().

This patch also fixes 2 possible memory leaks on error path in the code
that was split-out. The buffer containing the already generated options
and a listen address string could be leaked.

Also break a few very long lines and reflow code that fits now.

12 years agoqemu: Split out code to generate SPICE command line
Peter Krempa [Mon, 22 Apr 2013 12:39:46 +0000 (14:39 +0200)]
qemu: Split out code to generate SPICE command line

Decrease size of qemuBuildGraphicsCommandLine() by splitting out
spice-related code into qemuBuildGraphicsSPICECommandLine().

This patch also fixes 2 possible memory leaks on error path in the code
that was split-out. The buffer containing the already generated options
and a listen address string could be leaked.

Also break a few very long lines.

12 years agoqemu: Use -machine accel=tcg|kvm when available
Jiri Denemark [Tue, 23 Apr 2013 14:17:08 +0000 (16:17 +0200)]
qemu: Use -machine accel=tcg|kvm when available

This is a better interface to choose accelerator than guessing whether
we should enable or disable kvm to get the right one.

12 years agoqemu: Move -enable-kvm and friends earlier in the command line
Jiri Denemark [Tue, 23 Apr 2013 14:15:22 +0000 (16:15 +0200)]
qemu: Move -enable-kvm and friends earlier in the command line

12 years agoSwitch to a more extensible annotation system for RPC protocols
Daniel P. Berrange [Wed, 17 Apr 2013 12:04:27 +0000 (13:04 +0100)]
Switch to a more extensible annotation system for RPC protocols

Currently the RPC protocol files can contain annotations after
the protocol enum eg

   REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */

This is not very extensible as the number of annotations grows.
Change it to use

    /**
     * @generate: both
     * @priority: high
     */
   REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247,

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: Fix setting of memory tunables
Peter Krempa [Wed, 17 Apr 2013 15:50:56 +0000 (17:50 +0200)]
qemu: Fix setting of memory tunables

Refactoring done in 19c6ad9ac7e7eb2fd3c8262bff5f087b508ad07f didn't
correctly take into account the order cgroup limit modification needs to
be done in. This resulted into errors when decreasing the limits.

The operations need to take place in this order:

decrease hard limit
change swap hard limit

or

change swap hard limit
increase hard limit

This patch also fixes the check if the hard_limit is less than
swap_hard_limit to print better error messages. For this purpose I
introduced a helper function virCompareLimitUlong to compare limit
values where value of 0 is equal to unlimited. Additionally the check is
now applied also when the user does not provide all of the tunables
through the API and in that case the currently set values are used.

This patch resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=950478

12 years agologging: Make log regexp more compact (and readable)
Jiri Denemark [Mon, 22 Apr 2013 16:33:01 +0000 (18:33 +0200)]
logging: Make log regexp more compact (and readable)

12 years agoqemu: Ignore libvirt logs when reading QEMU error output
Jiri Denemark [Mon, 22 Apr 2013 16:20:21 +0000 (18:20 +0200)]
qemu: Ignore libvirt logs when reading QEMU error output

When QEMU fails to start, libvirt read its error output and reports it
back in an error message. However, when libvirtd is configured to log
debug messages, one would get the following unhelpful garbage:

    virsh # start cd
    error: Failed to start domain cd
    error: internal error process exited while connecting to monitor: \
      2013-04-22 14:24:54.214+0000: 2194219: debug : virFileClose:72 : \
      Closed fd 21
    2013-04-22 14:24:54.214+0000: 2194219: debug : virFileClose:72 : \
      Closed fd 27
    2013-04-22 14:24:54.215+0000: 2194219: debug : virFileClose:72 : \
      Closed fd 3
    2013-04-22 14:24:54.215+0000: 2194220: debug : virExec:602 : Run \
      hook 0x7feb8f600bf0 0x7feb86ef9300
    2013-04-22 14:24:54.215+0000: 2194220: debug : qemuProcessHook:2507 \
      : Obtaining domain lock
    2013-04-22 14:24:54.216+0000: 2194220: debug : \
      virDomainLockProcessStart:170 : plugin=0x7feb780261f0 \
      dom=0x7feb7802a360 paused=1 fd=0x7feb86ef8ec4
    2013-04-22 14:24:54.216+0000: 2194220: debug : \
      virDomainLockManagerNew:128 : plugin=0x7feb780261f0 \
      dom=0x7feb7802a360 withResources=1
    2013-04-22 14:24:54.216+0000: 2194220: debug : \
      virLockManagerPluginGetDriver:297 : plugin=0x7feb780261f0
    2013-04-22 14:24:54.216+0000: 2194220: debug : \
      virLockManagerNew:321 : driver=0x7feb8ef08640 type=0 nparams=5 \
      params=0x7feb86ef8d60 flags=0
    2013-04-22 14:24:54.216+000

instead of (the output with this patch applied):

    virsh # start cd
    error: Reconnected to the hypervisor
    error: Failed to start domain cd
    error: internal error process exited while connecting to monitor: \
      char device redirected to /dev/pts/33 (label charserial0)
    qemu-system-x86_64: -drive file=/home/vm/systemrescuecd-x86-1.2.0.\
      iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw,cache=none: \
      could not open disk image /home/vm/systemrescuecd-x86-1.2.0.iso: \
      Permission denied

12 years agoqemu: Move QEMU log reading into a separate function
Jiri Denemark [Mon, 22 Apr 2013 16:16:57 +0000 (18:16 +0200)]
qemu: Move QEMU log reading into a separate function

12 years agoupdate input ip processing
Gene Czarcinski [Sun, 21 Apr 2013 14:34:40 +0000 (10:34 -0400)]
update input ip processing

1. Handle invalid ULong prefix specified.
When parsing for @prefix as a ULong, a -2 can be returned
if the specification is not a valid ULong.

2.  Error out if address= is not specified.

3.  Merge netmask process/tests under family tests.

4. Max sure that prefix does not exceed maximum.
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
12 years agocreate virSocketAddrGetIpPrefix utility function
Gene Czarcinski [Sat, 20 Apr 2013 19:45:46 +0000 (15:45 -0400)]
create virSocketAddrGetIpPrefix utility function

Create the utility function virSocketAddrGetIpPrefix() to
determine the prefix for this network.  The code in this
function was adapted from virNetworkIpDefPrefix().

Update virNetworkIpDefPrefix() in src/conf/network_conf.c
to use the new utility function.

Signed-off-by: Gene Czarcinski <gene@czarc.net>
12 years agoReplace more cases of /system with /machine
Daniel P. Berrange [Mon, 22 Apr 2013 16:11:11 +0000 (17:11 +0100)]
Replace more cases of /system with /machine

The change in commit aed4986322fe77bdf718e31a0587d00f04f3d97a
was incomplete, missing a couple of cases of /system. This
caused failure to start VMs.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agosheepdog: Omit braces with a single-line body
Harry Wei [Mon, 22 Apr 2013 12:33:46 +0000 (20:33 +0800)]
sheepdog: Omit braces with a single-line body

libvirt/HACKING suggests omitting braces with a
single-line body; this patch fixes the coding style
problem for the Sheepdog storage backend driver.

Signed-off-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoChange default resource partition to /machine
Daniel P. Berrange [Thu, 18 Apr 2013 10:07:17 +0000 (11:07 +0100)]
Change default resource partition to /machine

After discussions with systemd developers it was decided that
a better default policy for resource partitions is to have
3 default partitions at the top level

   /system   - system services
   /machine - virtual machines / containers
   /user    - user login session

This ensures that the default policy isolates guest from
user login sessions & system services, so a mis-behaving
guest can't consume 100% of CPU usage if other things are
contending for it.

Thus we change the default partition from /system to
/machine

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: Fix the wrong expression
Osier Yang [Mon, 22 Apr 2013 11:40:19 +0000 (19:40 +0800)]
qemu: Fix the wrong expression

Wrong use of the parentheses causes "rc" always having a boolean value,
either "1" or "0", and thus we can't get the detailed error message
when it fails:

Before (I only have 1 node):
% virsh numatune f18 --nodeset 12
error: Unable to change numa parameters
error: unable to set numa tunable: Unknown error -1

After:
virsh numatune f18 --nodeset 12
error: Unable to change numa parameters
error: unable to set numa tunable: Invalid argument

12 years agodocs: fix usage of 'onto'
Eric Blake [Fri, 19 Apr 2013 20:18:14 +0000 (14:18 -0600)]
docs: fix usage of 'onto'

http://www.uhv.edu/ac/newsletters/writing/grammartip2009.07.01.htm
(and several other sites) give hints that 'onto' is best used if
you can also add 'up' just before it and still make sense. In many
cases in the code base, we really want the two-word form, or even
a simplification to just 'on' or 'to'.

* docs/hacking.html.in: Use correct 'on to'.
* python/libvirt-override.c: Likewise.
* src/lxc/lxc_controller.c: Likewise.
* src/util/virpci.c: Likewise.
* daemon/THREADS.txt: Use simpler 'on'.
* docs/formatdomain.html.in: Better usage.
* docs/internals/rpc.html.in: Likewise.
* src/conf/domain_event.c: Likewise.
* src/rpc/virnetclient.c: Likewise.
* tests/qemumonitortestutils.c: Likewise.
* HACKING: Regenerate.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoaudit: properly encode device path in cgroup audit
Eric Blake [Fri, 19 Apr 2013 17:30:44 +0000 (11:30 -0600)]
audit: properly encode device path in cgroup audit

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

Commit d04916fa introduced a regression in audit quality - even
though the code was computing the proper escaped name for a
path, it wasn't feeding that escaped name on to the audit message.
As a result, /var/log/audit/audit.log would mention a pair of
fields class=path path=/dev/hpet instead of the intended
class=path path="/dev/hpet", which in turn caused ausearch to
format the audit log with path=(null).

* src/conf/domain_audit.c (virDomainAuditCgroupPath): Use
constructed encoding.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoqemu: rename CheckSlot to SlotInUse
Ján Tomko [Mon, 15 Apr 2013 17:56:03 +0000 (19:56 +0200)]
qemu: rename CheckSlot to SlotInUse

Also change its return value from int to bool.

12 years agoqemu: switch PCI address set from hash table to an array
Ján Tomko [Mon, 15 Apr 2013 17:53:41 +0000 (19:53 +0200)]
qemu: switch PCI address set from hash table to an array

Each bus is represented as an array of 32 8-bit integers
where each bit represents a PCI function and each byte represents
a PCI slot.

Uses just one bus so far.

12 years agoconf: add model attribute to virDomainDefMaybeAddController
Ján Tomko [Wed, 17 Apr 2013 12:01:21 +0000 (14:01 +0200)]
conf: add model attribute to virDomainDefMaybeAddController

12 years agoqemu: move PCI address check out of qemuPCIAddressAsString
Ján Tomko [Mon, 15 Apr 2013 17:12:37 +0000 (19:12 +0200)]
qemu: move PCI address check out of qemuPCIAddressAsString

Create a new function qemuPCIAddressValidate and call it everywhere
the user might supply an incorrect address:
* qemuCollectPCIAddress for domain definition
* qemuDomainPCIAddressEnsureAddr and ReleaseSlot for hotplug

Slot and function shouldn't be wrong at this point, since values
out of range should be rejected by the XML parser.

12 years agoqemu: QEMU_PCI constant consistency
Ján Tomko [Tue, 5 Mar 2013 12:22:50 +0000 (13:22 +0100)]
qemu: QEMU_PCI constant consistency

Change QEMU_PCI_ADDRESS_LAST_SLOT to the number of slots in the bus,
not the maximum slot value, to match QEMU_PCI_ADDRESS_LAST_FUNCTION
and rename them both to have _LAST at the end.

12 years agoqemu: print PCI address hexadecimally in errors
Ján Tomko [Wed, 3 Apr 2013 16:11:32 +0000 (18:11 +0200)]
qemu: print PCI address hexadecimally in errors

Use the same formatting as we do for XML in error and debug outputs.

12 years agoqemu: make qemuComparePCIDevice aware of multiple buses
Ján Tomko [Wed, 3 Apr 2013 16:09:47 +0000 (18:09 +0200)]
qemu: make qemuComparePCIDevice aware of multiple buses

Bus and domain need to be checked as well, otherwise we might
get false positives when searching for multi-function devices.

12 years agoconf: Reword error message to be more universal
Peter Krempa [Tue, 16 Apr 2013 09:50:10 +0000 (11:50 +0200)]
conf: Reword error message to be more universal

The error message reported when attempting to change/get persistent
configuration of a transient domain suggests that changes are being
made. Reword it to suit getter APIs too.

Before:
$ virsh vcpucount transient-domain --config
error: Requested operation is not valid: cannot change persistent config of a transient domain

After:
$ virsh vcpucount transient-domain --config
error: Requested operation is not valid: transient domains do not have any persistent config

12 years agonetwork: bridge_driver: don't lose transient networks on daemon restart
Peter Krempa [Tue, 16 Apr 2013 16:35:59 +0000 (18:35 +0200)]
network: bridge_driver: don't lose transient networks on daemon restart

Until now tranisent networks weren't really useful as libvirtd wasn't
able to remember them across restarts. This patch adds support for
loading status files of transient networks (that already were generated)
so that the status isn't lost.

This patch chops up virNetworkObjUpdateParseFile and turns it into
virNetworkLoadState and a few friends that will help us to load status
XMLs and refactors the functions that are loading the configs to use
them.

12 years agocpu: Rename PowerPCUpdate and PowerPCDataFree functions
Jiri Denemark [Thu, 20 Dec 2012 11:38:25 +0000 (12:38 +0100)]
cpu: Rename PowerPCUpdate and PowerPCDataFree functions

For consistency with other functions in PowerPC CPU driver, the two
functions are renamed as ppcUpdate and ppcDataFree, respectively.

12 years agocpu: Remove hardcoded list of PowerPC models
Jiri Denemark [Wed, 19 Dec 2012 00:35:51 +0000 (01:35 +0100)]
cpu: Remove hardcoded list of PowerPC models

The cpu_map.xml file is there to separate CPU model definitions from the
code. Having the only interesting data for PowerPC models only in the
source code. This patch moves this data to the XML file and removes the
hardcoded list completely.

12 years agocpu: Reimplement PowerPCDecode
Jiri Denemark [Wed, 19 Dec 2012 00:53:25 +0000 (01:53 +0100)]
cpu: Reimplement PowerPCDecode

PowerPC CPUs are either identical or incompatible and thus we just need
to look up the right model for given PVR without pretending we have
several candidates which we may choose from.

The function is also renamed as ppcDecode to match other functions in
PowerPC CPU driver.

12 years agocpu: Reimplement PowerPCBaseline
Jiri Denemark [Wed, 19 Dec 2012 00:33:01 +0000 (01:33 +0100)]
cpu: Reimplement PowerPCBaseline

Baseline API is supposed to return guest CPU definition that can be used
on any of the provided host CPUs. Since PowerPC CPUs are either
identical or incompatible, the API just needs to check that all provided
CPUs are identical. Previous implementation was completely bogus.

The function is also renamed as ppcBaseline to match other functions in
PowerPC CPU driver.

12 years agocpu: Fix loading PowerPC vendor from cpu_map.xml
Jiri Denemark [Tue, 18 Dec 2012 23:06:45 +0000 (00:06 +0100)]
cpu: Fix loading PowerPC vendor from cpu_map.xml

When ppcVendorLoad fails to parse the vendor element for whatever
reason, it is supposed to ignore it and return 0 rather than -1. The
patch also removes PowerPC vendor string from the XML as it is not
actually used for anything.

12 years agocpu: Fix PowerPCNodeData
Jiri Denemark [Tue, 18 Dec 2012 22:42:34 +0000 (23:42 +0100)]
cpu: Fix PowerPCNodeData

Make getting node CPU data for PowerPC unsupported on other
architectures. The function is also renamed as ppcNodeData to match
other functions in PowerPC CPU driver.

12 years agocpu: Make comparing PowerPC CPUs easier to read
Jiri Denemark [Tue, 18 Dec 2012 22:32:01 +0000 (23:32 +0100)]
cpu: Make comparing PowerPC CPUs easier to read

Revert the condition to make it easier to read. The function is also
renamed as ppcCompare to match other functions in PowerPC CPU driver.

12 years agocpu: Introduce cpuModelIsAllowed internal API
Jiri Denemark [Wed, 19 Dec 2012 11:08:32 +0000 (12:08 +0100)]
cpu: Introduce cpuModelIsAllowed internal API

The API can be used to check if the model is on the supported models
list, which needs to be done in several places.

12 years agovirsh-domain: Refactor cmdVcpucount and fix output on inactive domains
Peter Krempa [Mon, 15 Apr 2013 09:07:23 +0000 (11:07 +0200)]
virsh-domain: Refactor cmdVcpucount and fix output on inactive domains

This patch factors out the vCPU count retrieval including fallback means
into vshCPUCountCollect() and removes the duplicated code to retrieve
individual counts.

The --current flag (this flag is assumed by default) now works also with
--maximum or --active without the need to explicitly specify the state
of the domain that is requested.

This patch also fixes the output of "virsh vcpucount domain" on inactive
domains:

Before:
$ virsh vcpucount domain
maximum      config         4
error: Requested operation is not valid: domain is not running
current      config         4
error: Requested operation is not valid: domain is not running

After:
$virsh vcpucount domain
maximum      config         4
current      config         4

.. and for transient domains too:

Before:
$ virsh vcpucount transient-domain
error: Requested operation is not valid: cannot change persistent config of a transient domain
maximum      live           3
error: Requested operation is not valid: cannot change persistent config of a transient domain
current      live           1

After:
$ virsh vcpucount transient-domain
maximum      live           3
current      live           1

12 years agoSet legacy USB option with default for ppc64.
Li Zhang [Fri, 19 Apr 2013 10:26:36 +0000 (11:26 +0100)]
Set legacy USB option with default for ppc64.

Currently, -device xxx still doesn't work well for ppc64 platform.
It's better use legacy USB option with default for ppc64.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: fix default spice password setting
Ján Tomko [Fri, 19 Apr 2013 05:00:44 +0000 (07:00 +0200)]
qemu: fix default spice password setting

Set spice password even if default VNC password hasn't been set.

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

12 years agoqemu_conf: add new configuration key bridge_helper
Paolo Bonzini [Mon, 25 Mar 2013 14:25:30 +0000 (15:25 +0100)]
qemu_conf: add new configuration key bridge_helper

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoutil: allow using virCommandAllowCap with setuid helpers
Paolo Bonzini [Mon, 25 Mar 2013 14:25:29 +0000 (15:25 +0100)]
util: allow using virCommandAllowCap with setuid helpers

When running unprivileged, virSetUIDGIDWithCaps will fail because it
tries to add the requested capabilities to the permitted and effective
sets.

Detect this case, and invoke the child with cleared permitted and
effective sets.  If it is a setuid program, it will get them.

Some care is needed also because you cannot drop capabilities from the
bounding set without CAP_SETPCAP.  Because of that, ignore errors from
setting the bounding set.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agoutil: simplify virSetUIDGIDWithCaps
Paolo Bonzini [Mon, 25 Mar 2013 14:25:28 +0000 (15:25 +0100)]
util: simplify virSetUIDGIDWithCaps

The need_prctl variable is not really needed.  If it is false,
capng_apply will be called twice with the same set, causing
a little extra work but no problem.  This keeps the code a bit
simpler.

It is also clearer to invoke capng_apply(CAPNG_SELECT_BOUNDS)
separately, to make sure it is done while we have CAP_SETPCAP.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 years agovirsh-domain: Report errors on invalid --holdtime value for cmdSendKey
Peter Krempa [Thu, 18 Apr 2013 08:42:47 +0000 (10:42 +0200)]
virsh-domain: Report errors on invalid --holdtime value for cmdSendKey

Using of a incorrect value for the --holdtime option was silently
ignored and 0 was used. In case a negative number was used, it
overflowed as the API expects a unsigned int.

Fix the data type and getter function type and report errors on
incorrect values.

12 years agovirsh-domain: Clean up cmdSendKey
Peter Krempa [Thu, 18 Apr 2013 08:40:49 +0000 (10:40 +0200)]
virsh-domain: Clean up cmdSendKey

Rename the get_integer_keycode helper to vshKeyCodeGetInt and get rid of
a unneeded typecast.

12 years agoqemu: simplify use of virArchFromHost
Tal Kain [Mon, 8 Apr 2013 12:33:07 +0000 (15:33 +0300)]
qemu: simplify use of virArchFromHost

Reusing the result of virArchFromHost instead of calling it multiple times

Signed-off-by: Tal Kain <tal.kain@ravellosystems.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agorng: tighten up domain <controller> schema
Laine Stump [Thu, 18 Apr 2013 04:25:18 +0000 (00:25 -0400)]
rng: tighten up domain <controller> schema

The rng schema for <controller> had been non-specific about which
types of controllers allowed which models, and also allowed the
num_queues attribute (since that hasn't been released yet, should we
rename it to "numQueues"?) and <master> subelement to be included for
any controller type. In reality, half of the models are allowed only
for type='scsi', and the other half only for type='usb', num_queues is
allowed only for type='scsi', and <master> only for type='usb'.

This patch makes a separate <group> for type='scsi' and type='usb',
with each group allowing only the appropriate model values, and
allowing num_queue and <master> only when appropriate.

<interleave> also hadn't been specified, forcing a specific order of
subelements, which should never be done. (Note that the <interleave>
had to surround the main element attributes that are in the <group>
subelements, due to one of the <group>s containing a subelement).

12 years agonetwork: remove autostart flag from network when undefining it
Peter Krempa [Wed, 17 Apr 2013 08:13:35 +0000 (10:13 +0200)]
network: remove autostart flag from network when undefining it

When turning a started persistent network into a transient one we forgot
to remove the autostart flag that is no longer valid at that point.

12 years agodocs: Update HACKING
Osier Yang [Wed, 17 Apr 2013 10:19:20 +0000 (18:19 +0800)]
docs: Update HACKING

To tell libvirt-{qemu,lxc}.h shouldn't be included either.

12 years agosyntax-check: Only allows to include public headers in external tools
Osier Yang [Wed, 17 Apr 2013 10:19:19 +0000 (18:19 +0800)]
syntax-check: Only allows to include public headers in external tools

With this patch, include public headers in "" form is only allowed
for "internal.h". And only the external tools (examples|tools|python
|include/libvirt) can include the public headers in <> form.

12 years agosyntax-check: Don't include public headers in internal source
Osier Yang [Wed, 17 Apr 2013 10:19:18 +0000 (18:19 +0800)]
syntax-check: Don't include public headers in internal source

Directories python/tools/examples should include them in <> form,
though this patch allows "" form in these directories by excluding
them, a later patch will do the cleanup.

12 years agosyntax-check: Don't include duplicate header
Osier Yang [Wed, 17 Apr 2013 10:25:57 +0000 (18:25 +0800)]
syntax-check: Don't include duplicate header

gnulib is excluded.

12 years agoconf: fix comment about parsing graphics listen address
Ján Tomko [Mon, 15 Apr 2013 10:53:41 +0000 (12:53 +0200)]
conf: fix comment about parsing graphics listen address

12 years agoremote: Revert removing "libvirt/libvirt.h" in remote_protocol.x
Osier Yang [Wed, 17 Apr 2013 15:14:52 +0000 (23:14 +0800)]
remote: Revert removing "libvirt/libvirt.h" in remote_protocol.x

Commit 2d25fd4f410f removed the including of "libvirt/libvirt.h",
which breaks the build. Pushed under build-breaker rule.

12 years agoqemu: Allow the disk wwn to have "0x" prefix
Osier Yang [Wed, 17 Apr 2013 13:23:44 +0000 (21:23 +0800)]
qemu: Allow the disk wwn to have "0x" prefix

The recent qemu requires "0x" prefix for the disk wwn, this patch
changes virValidateWWN to allow the prefix, and prepend "0x" if
it's not specified. E.g.

qemu-kvm: -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=6000c60016ea71ad:
Property 'scsi-hd.wwn' doesn't take value '6000c60016ea71ad'

Though it's a qemu regression, but it's nice to allow the prefix,
and doesn't hurt for us to always output "0x".

12 years agocleanup: Don't include libvirt/virterror.h
Osier Yang [Tue, 16 Apr 2013 13:41:46 +0000 (21:41 +0800)]
cleanup: Don't include libvirt/virterror.h

Which is already included in "internal.h", later patch will add
syntax-check to avoid it.

12 years agocleanup: Don't include libvirt/libvirt.h
Osier Yang [Tue, 16 Apr 2013 13:41:45 +0000 (21:41 +0800)]
cleanup: Don't include libvirt/libvirt.h

Which is already included by "internal.h", later patch will add
syntax-check to avoid it.

12 years agocleanup: Remove the duplicate header
Osier Yang [Tue, 16 Apr 2013 13:41:43 +0000 (21:41 +0800)]
cleanup: Remove the duplicate header

Detected by a simple Shell script:

for i in $(git ls-files -- '*.[ch]'); do
    awk 'BEGIN {
        fail=0
    }
    /# *include.*\.h/{
        match($0, /["<][^">]*[">]/)
        arr[substr($0, RSTART+1, RLENGTH-2)]++
    }
    END {
        for (key in arr) {
            if (arr[key] > 1) {
                fail=1
                printf("%d %s\n", arr[key], key)
            }
        }
        if (fail == 1)
            exit 1
    }' $i

    if test $? != 0; then
        echo "Duplicate header(s) in $i"
    fi
done;

A later patch will add the syntax-check to avoid duplicate
headers.

12 years agocleanup: Only include testutils.h once
Osier Yang [Tue, 16 Apr 2013 13:41:44 +0000 (21:41 +0800)]
cleanup: Only include testutils.h once

No reason to include it in both "if" and "else" branches.

12 years agoFix compilation error in util/vircgroup.c
Stefan Berger [Tue, 16 Apr 2013 12:16:37 +0000 (08:16 -0400)]
Fix compilation error in util/vircgroup.c

Fix the error

util/vircgroup.c: In function 'virCgroupNewDomainPartition':
util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow]

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
12 years agoFix build breaker with ATTRIBUTE_NONNULL defs
John Ferlan [Tue, 16 Apr 2013 11:17:00 +0000 (07:17 -0400)]
Fix build breaker with ATTRIBUTE_NONNULL defs

Using "./autogen.sh --system lv_cv_static_analysis=yes" for my daily
Coverity builds resulted in the following error when building:

In file included from util/vircgrouppriv.h:32:0,
                 from util/vircgroup.c:44:
util/vircgroup.h:59:5: error: nonnull argument with out-of-range operand number (argument 1, operand 5)
util/vircgroup.h:74:5: error: nonnull argument references non-pointer operand (argument 1, operand 4)
make[3]: *** [libvirt_util_la-vircgroup.lo] Error 1
make[3]: Leaving directory `/home/jferlan/libvirt.cov.curr/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/jferlan/libvirt.cov.curr/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jferlan/libvirt.cov.curr'
make: *** [all] Error 2

12 years agoResolve valgrind error
John Ferlan [Mon, 15 Apr 2013 15:50:59 +0000 (11:50 -0400)]
Resolve valgrind error

Commit id '1acfc171' resulted in the following valgrind failure:

==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
==25317==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
==25317==    by 0x4C6F851: virAlloc (viralloc.c:124)
==25317==    by 0x4C71493: virBitmapNew (virbitmap.c:74)
==25317==    by 0x4C71B79: virBitmapNewData (virbitmap.c:434)
==25317==    by 0x402EF2: test8 (virbitmaptest.c:436)
==25317==    by 0x40499F: virtTestRun (testutils.c:157)
==25317==    by 0x402E8D: mymain (virbitmaptest.c:474)
==25317==    by 0x404FDA: virtTestMain (testutils.c:719)
==25317==    by 0x39D0821A04: (below main) (in /usr/lib64/libc-2.16.so)

12 years agoCheck for unsupported QMP command
Stefan Berger [Tue, 16 Apr 2013 11:05:21 +0000 (07:05 -0400)]
Check for unsupported QMP command

Check for an unsupported QMP command when using the query-tpm-models
and query-tpm-types commands before checking for general errors
in order to avoid error messages in the log.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
12 years agoRevert checking for QMP query-tpm-models
Stefan Berger [Tue, 16 Apr 2013 11:05:21 +0000 (07:05 -0400)]
Revert checking for QMP query-tpm-models

Revert the patch checking for the QMP query-tpm-models
command.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
12 years agoqemu_agent: Add support for appending arrays to commands
Peter Krempa [Mon, 15 Apr 2013 15:00:04 +0000 (17:00 +0200)]
qemu_agent: Add support for appending arrays to commands

Add support for array elements for agent commands just like 64d5e815 did for
monitor commands

12 years agolib: Fix docs about return value of virDomainGetVcpusFlags()
Peter Krempa [Mon, 15 Apr 2013 09:04:56 +0000 (11:04 +0200)]
lib: Fix docs about return value of virDomainGetVcpusFlags()

The return value description stated that 0 is returned in case of success
instead of the count of vCPUs.

12 years agoCheck for QMP query-tpm-models
Stefan Berger [Mon, 15 Apr 2013 20:46:53 +0000 (16:46 -0400)]
Check for QMP query-tpm-models

Check for QMP query-tpm-models and set a capability flag. Do not use
this QMP command if it is not supported.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
12 years agoAdd support for perf_event and net_cls cgroup controllers
Daniel P. Berrange [Mon, 15 Apr 2013 14:17:33 +0000 (15:17 +0100)]
Add support for perf_event and net_cls cgroup controllers

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace LXC cgroup mount code with call to virCgroupIsolateMount
Daniel P. Berrange [Fri, 5 Apr 2013 11:50:27 +0000 (12:50 +0100)]
Replace LXC cgroup mount code with call to virCgroupIsolateMount

The LXC driver currently has code to detect cgroups mounts
and then re-mount them inside the new root filesystem. Replace
this fragile code with a call to virCgroupIsolateMount.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd an API for re-mounting cgroups, to isolate the process location
Daniel P. Berrange [Fri, 5 Apr 2013 11:48:47 +0000 (12:48 +0100)]
Add an API for re-mounting cgroups, to isolate the process location

Add a virCgroupIsolateMount method which looks at where the
current process is place in the cgroups (eg /system/demo.lxc.libvirt)
and then remounts the cgroups such that this sub-directory
becomes the root directory from the current process' POV.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoTrack symlinks for co-mounted cgroup controllers
Daniel P. Berrange [Fri, 5 Apr 2013 10:28:04 +0000 (11:28 +0100)]
Track symlinks for co-mounted cgroup controllers

If a cgroup controller is co-mounted with another, eg

   /sys/fs/cgroup/cpu,cpuacct

Then it is a requirement that there exist symlinks at

   /sys/fs/cgroup/cpu
   /sys/fs/cgroup/cpuacct

pointing to the real mount point. Add support to virCgroupPtr
to detect and track these symlinks

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoRemove non-functional code for setting up non-root cgroups
Daniel P. Berrange [Thu, 4 Apr 2013 11:10:55 +0000 (12:10 +0100)]
Remove non-functional code for setting up non-root cgroups

The virCgroupNewDriver method had a 'bool privileged' param.
If a false value was ever passed in, it would simply not
work, since non-root users don't have any privileges to create
new cgroups. Just delete this broken code entirely and make
the QEMU driver skip cgroup setup in non-privileged mode

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoChange default cgroup layout for QEMU/LXC and honour XML config
Daniel P. Berrange [Wed, 3 Apr 2013 10:01:49 +0000 (11:01 +0100)]
Change default cgroup layout for QEMU/LXC and honour XML config

Historically QEMU/LXC guests have been placed in a cgroup layout
that is

   $LOCATION-OF-LIBVIRTD/libvirt/{qemu,lxc}/$VMNAME

This is bad for a number of reasons

 - The cgroup hierarchy gets very deep which seriously
   impacts kernel performance due to cgroups scalability
   limitations.

 - It is hard to setup cgroup policies which apply across
   services and virtual machines, since all VMs are underneath
   the libvirtd service.

To address this the default cgroup location is changed to
be

    /system/$VMNAME.{lxc,qemu}.libvirt

This puts virtual machines at the same level in the hierarchy
as system services, allowing consistent policy to be setup
across all of them.

This also honours the new resource partition location from the
XML configuration, for example

  <resource>
    <partition>/virtualmachines/production</partitions>
  </resource>

will result in the VM being placed at

    /virtualmachines/production/$VMNAME.{lxc,qemu}.libvirt

NB, with the exception of the default, /system, path which
is intended to always exist, libvirt will not attempt to
auto-create the partitions in the XML. It is the responsibility
of the admin/app to configure the partitions. Later libvirt
APIs will provide a way todo this.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd XML config for resource partitions
Daniel P. Berrange [Thu, 21 Mar 2013 11:28:10 +0000 (11:28 +0000)]
Add XML config for resource partitions

Allow VMs to be placed into resource groups using the
following syntax

  <resource>
    <partition>/virtualmachines/production</partition>
  </resource>

A resource cgroup will be backed by some hypervisor specific
functionality, such as cgroups with KVM/LXC.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd a new virCgroupNewPartition for setting up resource partitions
Daniel P. Berrange [Thu, 28 Mar 2013 18:08:39 +0000 (18:08 +0000)]
Add a new virCgroupNewPartition for setting up resource partitions

A resource partition is an absolute cgroup path, ignoring the
current process placement. Expose a virCgroupNewPartition API
for constructing such cgroups

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoCleanup if creating cgroup directories fails
Daniel P. Berrange [Wed, 3 Apr 2013 17:08:41 +0000 (18:08 +0100)]
Cleanup if creating cgroup directories fails

Currently if virCgroupMakeGroup fails, we can get in a situation
where some controllers have been setup, but others not. Ensure
we call virCgroupRemove to remove what we've done upon failure

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd misc extra debugging into cgroups code
Daniel P. Berrange [Wed, 3 Apr 2013 17:06:41 +0000 (18:06 +0100)]
Add misc extra debugging into cgroups code

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoRefactor cgroups internal data structures
Daniel P. Berrange [Fri, 22 Mar 2013 11:11:34 +0000 (11:11 +0000)]
Refactor cgroups internal data structures

Currently the virCgroupPtr struct contains 3 pieces of
information

 - path - path of the cgroup, relative to current process'
   cgroup placement
 - placement - current process' placement in each controller
 - mounts - mount point of each controller

When reading/writing cgroup settings, the path & placement
strings are combined to form the file path. This approach
only works if we assume all cgroups will be relative to
the current process' cgroup placement.

To allow support for managing cgroups at any place in the
heirarchy a change is needed. The 'placement' data should
reflect the absolute path to the cgroup, and the 'path'
value should no longer be used to form the paths to the
cgroup attribute files.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd a test suite for cgroups functionality
Daniel P. Berrange [Thu, 28 Mar 2013 14:36:52 +0000 (14:36 +0000)]
Add a test suite for cgroups functionality

Some aspects of the cgroups setup / detection code are quite subtle
and easy to break. It would greatly benefit from unit testing, but
this is difficult because the test suite won't have privileges to
play around with cgroups. The solution is to use monkey patching
via LD_PRELOAD to override the fopen, open, mkdir, access functions
to redirect access of cgroups files to some magic stubs in the
test suite.

Using this we provide custom content for the /proc/cgroup and
/proc/self/mounts files which report a fixed cgroup setup. We
then override open/mkdir/access so that access to the cgroups
filesystem gets redirected into files in a temporary directory
tree in the test suite build dir.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoRename virCgroupForXXX to virCgroupNewXXX
Daniel P. Berrange [Thu, 28 Mar 2013 16:33:22 +0000 (16:33 +0000)]
Rename virCgroupForXXX to virCgroupNewXXX

Rename all the virCgroupForXXX methods to use the form
virCgroupNewXXX since they are all constructors. Also
make sure the output parameter is the last one in the
list, and annotate all pointers as non-null. Fix up
all callers, and make sure they use true/false not 0/1
for the boolean parameters

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoPull definition of structs out of vircgroup.c to vircgrouppriv.h
Daniel P. Berrange [Thu, 28 Mar 2013 14:32:23 +0000 (14:32 +0000)]
Pull definition of structs out of vircgroup.c to vircgrouppriv.h

The definition of structs for cgroups are kept in vircgroup.c since
they are intended to be private from users of the API. To enable
effective testing, however, they need to be accessible. To address
the latter issue, without compronmising the former, this introduces
a new vircgrouppriv.h file to hold the struct definitions.

To prevent other files including this private header, it requires
that __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__ be defined before inclusion

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoStore a virCgroupPtr instance in virLXCDomainObjPrivatePtr
Daniel P. Berrange [Thu, 21 Mar 2013 14:40:29 +0000 (14:40 +0000)]
Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr

Instead of calling virCgroupForDomain every time we need
the virCgrouPtr instance, just do it once at Vm startup
and cache a reference to the object in virLXCDomainObjPrivatePtr
until shutdown of the VM. Removing the virCgroupPtr from
the LXC driver state also means we don't have stale mount
info, if someone mounts the cgroups filesystem after libvirtd
has been started

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoStore a virCgroupPtr instance in qemuDomainObjPrivatePtr
Daniel P. Berrange [Thu, 21 Mar 2013 14:40:29 +0000 (14:40 +0000)]
Store a virCgroupPtr instance in qemuDomainObjPrivatePtr

Instead of calling virCgroupForDomain every time we need
the virCgrouPtr instance, just do it once at Vm startup
and cache a reference to the object in qemuDomainObjPrivatePtr
until shutdown of the VM. Removing the virCgroupPtr from
the QEMU driver state also means we don't have stale mount
info, if someone mounts the cgroups filesystem after libvirtd
has been started

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd missing param to virCgroupForDriver stub
Daniel P. Berrange [Mon, 15 Apr 2013 16:06:19 +0000 (17:06 +0100)]
Add missing param to virCgroupForDriver stub

The virCgroupForDriver method recently gained an 'int controllers'
parameter, but the stub impl did not

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoIntroduce a virFileDeleteTree method
Daniel P. Berrange [Thu, 28 Mar 2013 14:46:45 +0000 (14:46 +0000)]
Introduce a virFileDeleteTree method

Introduce a method virFileDeleteTree for recursively deleting
an entire directory tree

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConditionally compile storagevolxml2argvtest
Daniel P. Berrange [Mon, 15 Apr 2013 16:01:02 +0000 (17:01 +0100)]
Conditionally compile storagevolxml2argvtest

Only compile storagevolxml2argvtest if WITH_STORAGE is
set, because it links to that driver

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConditionalize use of symlink() function in test suite
Daniel P. Berrange [Mon, 15 Apr 2013 16:00:17 +0000 (17:00 +0100)]
Conditionalize use of symlink() function in test suite

On Win32 symlink() is not available, so virstoragetest.c
must be conditionalized to avoid compile failures.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoFix signature of dummy virNetlinkCommand stub
Daniel P. Berrange [Mon, 15 Apr 2013 15:59:36 +0000 (16:59 +0100)]
Fix signature of dummy virNetlinkCommand stub

The second param of virNetlinkCommand should be
struct nlmsghdr, not unsigned char.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd empty stub for virThreadCancel on Win32
Daniel P. Berrange [Mon, 15 Apr 2013 15:58:56 +0000 (16:58 +0100)]
Add empty stub for virThreadCancel on Win32

Win32 does not like undefined symbols, so define an
empty virThreadCancel impl.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>