Commit Graph
3452 Commits
Author SHA1 Message Date
Juergen Gross 8e6048545a tools/python: Rebuild python extensions if depends have changed
Adds depends information for building python extensions.
The extensions depend on the library binaries they are using.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-10 18:13:15 +00:00
Jan Beulich d3d32407be xend: fix "xm block-detach 0 ..." for extended-ID devices
Simply taking stat()'s st_rdev doesn't work here, as the minor is
split into two parts, the major is present, and the "extended" bit
isn't set.

Rather than fixing this in a way that would likely be OS-dependent,
simply remove the access to the device file, and instead just parse
the provided string (as is done e.g. for block-attach).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-10 18:08:19 +00:00
Juergen Gross 9d679c393b tools: Add xl python bindings for cpumap
Signed-off-by: juergen.gross@ts.fujitsu.com
2010-11-23 19:35:09 +00:00
Jim Fehlig 0d84911192 Fix pci passthru in xend interface used by libvirt
Attempting to define or create a domain whose XML config contains a
passthru PCI device fails with libvirt

xen84: # cat win2k8r2.xml
...
   <hostdev mode='subsystem' type='pci' managed='no'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
    </hostdev>
...

xen84: # virsh create ./win2k8r2.xml
error: Failed to create domain from ./win2k8r2.xml
error: POST operation failed: xend_post: error from xen daemon:
  (xend.err "Error creating domain: 'key'")

The PCI device config maintained by xend includes a 'key' field, which is
initialized by xm client when using that tool and traditional xen config
file.  libvirt, which uses xend's sexpr-over-http interface (is that the
proper name for that interface??), does not initialize this field - and
shouldn't be expected to do so IMO.  Clients should not be bothered with
xend's internal representation of a PCI device.

This patch populates the 'key' field within xend if it is uninitialized,
similar to current initialization of 'uuid' field.  The 'vdevfn' field
suffers a similar problem if not (optionally) specified by user.
AFAICT, the xm client initializes 'vdevfn' to 0x100 if not specified so
I've done the same here.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-08 16:24:22 +00:00
Lutz Dube eb37dccf5b tools: fix cpu_weight/cap loss (22000:4fc66044477d)
Correction/Extension of changeset 22000:4fc66044477d
  "Values of cpu_weight and cpu_cap are lost after xend restart"

Values of cpu_weight and cpu_cap taken from managed SXP file have to
be converted from str to int.

Signed-off-by: Lutz Dube <lutz.dube@ts.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-03 17:23:42 +00:00
Juergen Gross 9180abe568 tools: change cpumaps to uint8_t
Cpumap types in tools (libxc and libxl) are changed to be based on bytes like
in the interface to the hypervisor.
To make handling easier the size of used cpumaps is always based on the
number of physical cpus supported by the hypervisor. This eliminates the need
to keep track of the cpumap size in external interfaces.
In libxl a macro for cycling through a cpumap is added (libxl_for_each_cpu).

Interfaces changed:
libxl_set_vcpuaffinity()
libxl_cpumap_alloc()
xc_vcpu_setaffinity()
xc_vcpu_getaffinity()
xc_cpupool_freeinfo()

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-03 12:10:46 +00:00
Juergen Gross e57101211f avoid numa placement of cpus with active cpupools
When using cpupools don't pin vcpus to numa nodes as this might
conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-28 12:22:09 +01:00
Miroslav Rezanina 0f114a5181 Do not wait for memory teardown when live migrate
When trying to live migrate guest with great memory (e.g. 20 GB),
there's delay caused by destroying source copy of domain.  To speed up
this process we can close socket before starting guest destroy, as
source guest is not running anymore.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-28 11:40:32 +01:00
Ian Campbell 4fd0fc305b libxc: finalise transition to hypercall buffers.
Rename xc_set_xen_guest_handle to set_xen_guest_handle[0] and remove now
unused functions:
  - xc_memalign
  - lock_pages
  - unlock_pages
  - hcall_buf_prep
  - hcall_buf_release

[0] sed -i -e 's/xc_set_xen_guest_handle/set_xen_guest_handle/g' \
	tools/libxc/*.[ch] \
	tools/python/xen/lowlevel/xc/xc.c \
	tools/python/xen/lowlevel/acm/acm.c \
	tools/libxc/ia64/xc_ia64_stubs.c \
	tools/security/secpol_tool.c \
	tools/misc/xenpm.c

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-10-22 15:14:51 +01:00
Ian Campbell 33ebf9e235 python xc: use hypercall buffer interface.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-10-22 15:14:51 +01:00
Ian Campbell c3be68bfca python acm: use hypercall buffer interface.
I have a suspicion these routines should be using libxc rather than
reimplementing all the hypercalls again, but I don't have the
enthusiasm to fix it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-10-22 15:14:51 +01:00
Ian Campbell a050657a54 tools: cleanup domain save switch_qemu_logdirty callback
Move the function into struct save_callbacks with the others and add
the void *closure to the callback arguments.

Add and propagate an error return code from the callback.

Use this in libxl to pass the save context to
libxl__domain_suspend_common_switch_qemu_logdirty allowing us to reuse
the parent's xenstore handle, gc context etc.

Also add an apparently missing libxl__free_all to
libxl__domain_suspend_common.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-21 18:46:32 +01:00
Juergen Gross 18dd3dbdf2 tools: cpupools: Rename cpu-pool commands in xm to cpupool-*
The xm commands pool-* are renamed to cpupool-*
The old pool-* commands are defined as aliases.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

--HG--
rename : tools/python/xen/xm/pool-create.py => tools/python/xen/xm/cpupool-create.py
rename : tools/python/xen/xm/pool-new.py => tools/python/xen/xm/cpupool-new.py
rename : tools/python/xen/xm/pool.py => tools/python/xen/xm/cpupool.py
2010-10-21 18:35:18 +01:00
Juergen Gross 63c5ef9841 tools: cpupools: Support arbitrary numbers of physical cpus
To be able to support arbitrary numbers of physical cpus it was necessary to
include the size of cpumaps in the xc-interfaces for cpu pools.
These were:
  definition of xc_cpupoolinfo_t
  xc_cpupool_getinfo()
  xc_cpupool_freeinfo()
xc_cpupool_getinfo() and xc_cpupool_freeinfo() are changed to allocate the
needed buffer and return it.

Signed-off-by: juergen.gross@ts.fujitsu.com
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-21 18:32:56 +01:00
Ian Campbell 2674a29698 libxc: wrappers for XENMEM {increase,decrease}_reservation and populate_physmap
Currently the wrappers for these hypercalls swallow partial success
and return failure to the caller.

In order to use these functions more widely instead of open-coding
uses of XENMEM_* and xc_memory_op add variants which return the actual
hypercall result.

Therefore add the following functions:
  xc_domain_increase_reservation
  xc_domain_decrease_reservation
  xc_domain_populate_physmap
and implement the existing semantics using these new functions as
  xc_domain_increase_reservation_exact
  xc_domain_decrease_reservation_exact
  xc_domain_populate_physmap_exact
replacing the existing xc_domain_memory_* functions.

Use these new functions to replace all open coded uses of
XENMEM_increase_reservation, XENMEM_decrease_reservation and
XENMEM_populate_physmap.

Also rename xc_domain_memory_*_pod_target to xc_domain_*_pod_target
for consistency.

Temporarily add a compatibility macro for
xc_domain_memory_populate_physmap to allow time for qemu to catch up.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-18 16:54:42 +01:00
Ian Campbell e43181a5eb libxc: remove unnecessary double indirection from xc_readconsolering
The double indirection has been unnecessary since 9867:ec61a8c25429,
there is no possibility of the buffer being reallocated now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-10-18 16:52:37 +01:00
Gianni Tedesco 92d4a8cf45 pyxl: fix build of python xl binding for python < 2.5
The python C API introduced Py_ssize_t in version 2.5. Prior to this
int's were used instead. Fix the build by way of a heinous preprocessor
macro.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-10-14 12:46:29 +01:00
Stephan Peijnik f5f0af18aa Replace pyxml/xmlproc-based XML validator with lxml based one
Pyxml/xmlproc is being used in tools/xen/xm/xenapi_create.py but is
unmaintained for several years now. xmlproc is used only for validating
XML documents against a DTD file.

This patch replaces the pyxml/xmlproc based XML validation with code
based on lxml, which is actively maintained.

Signed-off-by: Stephan Peijnik <spe@anexia.at>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-10-11 17:54:53 +01:00
Gianni Tedesco 6d01f35315 xl: Fix build in python binding since API change in 22229:1385b15e168f
Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-10-08 11:41:57 +01:00
Gianni Tedesco ce675adf0d tools/python: do not link against blktap except on Linux
Link to libblktapctl in python setup only for platforms which build it.
This fixes a build breakage on NetBSD introduced in 330c4d9010da.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-23 19:03:52 +01:00
Ian Campbell 67e27bba02 python: xl: stub out libxl_cpuid_policy_list accessors
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-17 16:12:13 +01:00
Gianni Tedesco 6d4ba52d49 libxl, tools/python: Add libxl python binding
Introduce python binding for libxl. The binding is not yet complete but
serveral methods are implemented and tested. Those which are implemented
provide examples of the two or three basic patterns that most future
methods should follow.

Over 5,000 lines of boilerplate is automatically generated to wrap and
export all relevant libxl structure definitions. There are a few places
where such code cannot be fully auto-generated and special hooks are
declared and stubbed where, for example, conversion between
libxl_file_reference and a python file object is required.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-16 17:20:22 +01:00
Matthias Klose a502f04ad6 tools/python: Replace python string exceptions with ValueError exceptions
There are at least some syntax errors when trying to use the xen utils with
python2.6.  The attached patch changes these string exception into
ValueErrors:

   - tools/python/xen/util/bugtool.py (getBugTitle)
   - tools/python/xen/xend (class XendBase): not catched
   - tools/python/xen/xm/xenapi_create.py (sxp2xmlconvert_sxp_to_xml):
     the method already raises a ValueError for similiar condition.
   - tools/python/xen/xm/main.py (xm_network_attach): not catched.

For all but maybe the first one, the replacement of the string
exceptions into ValueErrors seems to be safe.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-14 17:46:21 +01:00
Brendan Cully 167c73522e remus: use plug qdisc for network buffering instead of queue
It was renamed in the pvops [kernel] tree.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-07 19:13:55 +01:00
Ian Campbell 5545b07a5c libxl+xend: use correct paths for PV console when running bootloader
Makes "{xl,xm} create -c GUEST" work again with pygrub in interactive
mode which was broken by 21994:2e08ec0028e4

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-07 18:50:55 +01:00
Miroslav Rezanina 47e13da0a1 xend: reserve vtd_mem on guest restore
There's need for free vtd_mem more memory for guest with
xen-unstable c/s 17529.  This memory is freed when guest is
created, but is not freed when guest is restored. So restore
guest fails due  to not enough of memory for guest.

Following patch uses same calculation of memory to free in guest
restore as is in guest creation.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-09-03 18:22:31 +01:00
Michael Young 4053efae85 tools/python: fix xm list for Python 2.7
This patch fixes
  Unexpected error: <type 'exceptions.AttributeError'>
This is due to xmlrpc changes in Python 2.7.  This patch should
fixe it for both old and new versions.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-19 17:09:30 +01:00
Christoph Egger d83eb7f21e xend: remove non-ASCII characters.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-17 15:23:36 +01:00
Lutz Dube Lutz.Dube@ts.fujitsu.com 1ecf910c9b Values of cpu_weight and cpu_cap are lost after xend restart
For managed domains in state 'halted' I always get default values
for cpu_cap / cpu_weight after xend restart.
This is because the names of parameters differ between a SXP file to
create a VM (here the parameter names are cpu_cap / cpu_weight) and
a SXP file of a managed VM (here vcpus_params (cap 0) (weight 0)).
But XendConfig.py reads only cpu_cap / cpu_weight and if not found,
default values are used.
 
The patch reads first vcpus_params (cap, weight), if not found then cpu_cap,
cpu_weight and if both parameters are missing it uses the default values.
 
Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-16 17:14:10 +01:00
eXeC001er 3484b6c6c6 Fix "Error: Device 51952 not connected" error when using pygrub
The following is the process of booting a DomU with 'mounted-blktap2' (VHD
for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 the created device is disconnected from Dom0, but
xenstore does not scrape away after the device is disconnected so you
get the following error:

    "Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 xend calls destroyDevice always with 'tap' as argument.

Signed-off-by: eXeC001er <execooler@gmail.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-08-16 17:11:30 +01:00
Ian Campbell fa2244104b libxc: disable xc_ptrace on x86 Linux
It has been unused since 21732:eb34666befcc.

Removing the include of sys/ptrace.h and threaddb.h exposed a few
places which were using time(2) or gettimeofday(2) without including
time.h or sys/time.h respectively and were relying on an include.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-13 14:25:56 +01:00
Ian Jackson a0b0302a08 tools/python: Remove non-ASCII characters introduced by fffedd3d70e1.
fffedd3d70e1 introduced into tools/python/xen/util/vscsi_util.py
high-bit-set characters which appear to be UTF-8 for non-breaking
spaces.  Replace them with spaces to avoid getting a Python syntax
error.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-12 17:06:21 +01:00
"Dube, Lutz" bb3bac1c3b Exception in xen/util/vscsi_util.py while starting xend
We have pscsi device with long scsi ids like 15:0:11:101.
In this case lsscsi prints no "blank" between id and type,
so the following split of the string returns wrong output.
The field physical_HCTL is set to 15:0:11:101]dis.
The patch replaces char "]" by "] ", so split() will return the right
physical_HTCL.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-11 13:18:05 +01:00
Kuwamura Shin'ya 51e8df94ba xend: fix SyntaxError for Python 2.4 or earlier
21866:e017930af272 causes SyntaxError on Python 2.4 or earlier, since
the syntax "true_value if condition else false_value" was introduced
by Python 2.5.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-29 16:40:47 +01:00
Lutz Dube d0e15577d3 xend (XenAPI): Error in Xend-API method VM_set_actions_after_crash
Xend-API defines the method VM_set_actions_after_crash with valid
action names coredump_and_destroy, coredump_and_restart,... . These
values have to be converted into internal representation
"coredump-destroy", "coredump-restart", ...  otherwise start of the
domain is rejected.  Same error occurs, if I try to create a VM using
the Xend-API with actions_after_crash set to coredump_and_destroy.

Could you please apply my patch to xen-4-0-testing, too.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Acked-by: Jim Fehlig <jfehlig@novell.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-27 16:53:00 +01:00
"Dube, Lutz" c290fa1c4b tools/xend: Fix performance of xend with more than 10000 FC device paths
On server startup xend start or a later xend restart needs approx. 30 min to
start/restart. Without attached FC devices xend start/restart needs only some
seconds.

server type: Fujitsu Primergy RX600-S5

The time gets lost in xen/xend/XendNode.py line 329 while calling
vscsi_util.get_all_scsi_device().

329         for pscsi_record in vscsi_util.get_all_scsi_devices():
330             scsi_id = pscsi_record['scsi_id']
331             if scsi_id:
332                 saved_HBA_uuid = None

I think, in most cases we don't need all the PSCSI devices registered in
xend, but only a few of it.
So a good solution for this perforamce issue is to scan only the SCSI device
paths we need, controlled by a new option in xend-config.sxp.

I have made a patch to allow specification of scsi devices we need in xend
in the config file xend-config.sxp.
The new options pscsi-device-mask expects a list of device ids oder partial
device ids like the option of lsscsi, e.g.
(pscsi-device-mask ('<partial-dev-id1' 'partial-dev-id2' ...))

Without this option set in xend-config.sxp or if lsscsi is not support, all
device paths are process like today.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Comment from Masaki Kanno <kanno.masaki@jp.fujitsu.com>: "Well done"
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-23 17:34:35 +01:00
Stefano Stabellini 19ea926cbc Improve balloon support for NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-07-19 12:22:04 +01:00
Ian Jackson 8582d429a1 xm: Do not check path of kernel if bootloader is specified
When create DomU, if bootloader is specified, 'kernel/ramdisk' will be
used by bootloader when boots DomU. So it is needless to check the
path is existent or not.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2010-07-15 16:32:50 +01:00
Keir Fraser c9de4c5c3c xend: Continue domain building even if memshr extensions are not
present in the hypervisor.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-08 09:56:10 +01:00
Ian Jackson fa5685207c tools/xend: Revert 21541:7ff0e885b5c3 "a few blktap2 fixes"
Following discussion on xen-devel.  This changeset is doubtful and in
any case incomplete.
2010-06-29 16:21:20 +01:00
Ian Jackson b616bee08b tools/xend, xm: add a command to get the state of VMs
add a command "domstate" to get the state of Vms, which may have one state of
{'shutoff', 'idle','shutdown','running','crashed','paused' or 'paused by
admin"}.

For case of pause, I distinguish it into two conditions. One is "paused" the
other is "paused by admin".
"pasued by admin" means that users pause a domain voluntary by "xm paused
VM" or " API"

Signed-off-by James (Song Wei) <jsong@novell.com>
2010-06-29 14:52:51 +01:00
Ian Jackson f3fdbe7359 tools/python: sxp parser: show empty string
This patch makes the sxp parser show empty string.

Test case:
 import sxp
 sxp.show(sxp.from_string('(a "")'))
 sxp.show(sxp.from_string("(a '')"))

Without this patch:
 (a )(a )
With this patch:
 (a '')(a '')

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2010-06-28 16:49:45 +01:00
Ian Jackson a2fab4fce5 xend: Fix up check "mac" address sooner change
In changeset 21653,
         dev_type = sxp.name(dev_config)
should not have been moved, otherwise, the checking "mac"
paragraph is of no use.

(The original patch as submitted was correct but I had to make the
change manually as it had been mangled.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by Chunyan Liu <CYLiu@novell.com>
2010-06-25 15:13:11 +01:00
Ian Jackson b418a191ab python/xc: [PATCH 3/3] add flask capabilities in python xc bindings
The flask library is small, and putting everything in libxenctrl make
relying on flask functionalities in libxl easier.

libflask is left for compatibility purpose, but should be considered
deprecated, and remove in the near future. all flask_ symbols are now
xc_flask_ symbols in libxenctrl.

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-06-22 16:37:53 +01:00
Ian Jackson c1acfe560b Check "mac" address sooner in device_create function, before doing device_add.
In XendDomainInfo.py device_create function, when device type is
"vif", it has a paragraph to check the validity of "mac"
address. Before checking validity, device_add has been done. But after
checking validity, if the mac address is invlid, it raises VmError and
exits directly without doing clean work like removing the device item
from config info. This will cause that the incorrect mac address is
saved into VM Config file and VM fails to restart. If check "mac"
validity before doing device_add, there will be no problem.

Signed-off-by Chunyan Liu <CYLiu@novell.com>
2010-06-22 16:07:00 +01:00
Ian Jackson b9ae83b6e2 python/xc: do not crash xend if /proc/xen/privcmd cannot be opened
If /proc/xen/privcmd cannot be opened,
start xend occurs Segmentation fault.
Add check to fix it.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-06-22 16:00:08 +01:00
Keir Fraser df992155c8 xend: fix "xm list hangs"
If a command hold domains_lock, "xm list" would hang for waiting for
the lock. Such as creating many VMs at a script (such as 20), command
of "xm list" could hang for long time(10 mins).  I think domains_lock
here only protect update().  So, we shouldn't do update before command
of "list" really get this lock, but xm do need show the domain's
information quickly. In this patch, if command couldn't get the
domains_lock after 20 times trying, "xm list" would show the
information of VMs without update().

Signed-off-by: James Song (Wei) <jsong@novell.com>
2010-06-21 09:58:17 +01:00
Keir Fraser 56d6b7ac5d python/xc: fix out of bounds array access
Writing a NUL terminator here isn't even necessary, since snprintf()
already guarantees proper termination.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:27:14 +01:00
Keir Fraser d2a6ffdc54 xend: Remove use of non-existent xc.handle() function.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-09 07:55:19 +01:00
Keir Fraser 9622dc5498 blktap2: Port Xend to the tap-ctl interface.
Signed-off-by: Jake Wires <jake.wires@citrix.com>
2010-06-08 08:05:43 +01:00