Commit Graph
8172 Commits
Author SHA1 Message Date
Keir Fraser e13255b6c5 xend: Add interface name definition support for xend-relocation-address
Add a new feature for xend-relocation-address option to support
definition by interface name which can be useful for people having
e.g. a cluster environment with multiple network interfaces on all of
the machines with only one reserved to be registered to a private
cluster network. This way they won't need to specify the relocation
address manually on all the machines but just simple providing the
interface name to get the IP address from would do the job (all the
machines have to have this interface named the same to make it
working, of course).

Technically it reads the interface name and gets its IP address using
ioctl call of SIOCGIFADDR and if the interface doesn't have the
address, i.e. if non-existing interface or hostname was provided the
original ifname is returned to preserve the old behaviour.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2010-05-25 09:08:34 +01:00
Keir Fraser 8aca668075 xl: fix block-attach command parsing
Fix two command-line parsing problems:
 - the argc check is wrong: it must be provided with the frontend
 device
 - the ro/rw mode is optional, so default to rw if it is absent

Also, update the usage message accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-21 15:25:10 +01:00
Keir Fraser ceba28edd5 ocaml: fix ocaml xc compilation on 32 bit
cc1: warnings being treated as errors
  xc_lib.c: In function 'xc_domain_get_pfn_list':
  xc_lib.c:1217: error: assignment from incompatible pointer type

The XEN_DOMCTL_getmemlist interface has been 32/64 invariante since
13594:30af6cfdb05c and uint64_t is now the correct type for the PFN
list on all word sizes.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2010-05-20 14:12:14 +01:00
Keir Fraser 070cf3db9e xentop: fix NULL pointer dereference
On my system, I'm getting SIGSEGVs in xentop because
xenstat_node_domain() is returning NULL.  Skip the loop if it does
rather than crashing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-20 14:10:07 +01:00
Keir Fraser 785effb80a xen-hptool: A few usage cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-19 14:18:56 +01:00
Keir Fraser d015de71fe xl: Check for dom0 when instructed to destroy a domain.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-19 12:53:44 +01:00
Keir Fraser 00c08b5e07 xl: Add subcommand "xl debug-keys"
Can be used to send debug keys to Xen.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-19 12:51:16 +01:00
Keir Fraser 5c898a05f4 libxl: Add tmem support commands
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-19 12:48:32 +01:00
Keir Fraser 7e62eca7a1 libxl: Compilation and other small fixes
* Some of the library functions such as fscanf, system, and asprintf
are declared with warn_unused_result (ubuntu server 9.10), causing
compilation errors in libxl.
* When using asprintf, the caller is responsible for freeing the
memory.
* memset takes wrong size argument in one of the places (caught by
a builtin gcc check).

Signed-off-by: Dulloor Rao <dulloor@gmail.com>
2010-05-19 08:20:46 +01:00
Keir Fraser 4d8af85966 xl: recognize the "extra" entry in the domain config file
"extra" defines extra parameters to be added to the kernel command
line, so append it accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-19 08:18:51 +01:00
Keir Fraser 034b34e084 libxl: Set default shadow memory based on final values for vcpus and memory
Set default shadow memory based on final versions of memory and vcpus,
not on minimum default versions.

Failure mode was failed p2m allocaitons, e.g., with hvm-linux PV
drivers mapping the shared-info page.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-05-19 08:15:05 +01:00
Keir Fraser 6cbd479e30 xl: allow scaling suffix on memory sizes in mem-set and mem-max
Allow mem-set and mem-max to take 'b', 'k', 'm', 'g' and 't' as
scaling suffixes for bytes, kilobytes, mega, etc.  An unadorned number
is still treated as kilobytes so no existing users should be affected.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-18 11:38:12 +01:00
Keir Fraser c8272ff4cb xend: suppress errors during capabilities check
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-17 10:56:36 +01:00
Keir Fraser f061878fab ocaml: Disable parallel make
There seem to be multiple dependency issues when building oxenstored.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-17 10:54:46 +01:00
Keir Fraser e6cbaaddae xend: Fix getStubdomDomid function
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-15 08:31:42 +01:00
Keir Fraser 865f566d8c xentrace: install scripts with python install wrapper
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-05-15 08:29:21 +01:00
Keir Fraser 1efc662aba libxl: Add missing start_time entry when create and restore VMs.
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
2010-05-15 08:27:22 +01:00
Keir Fraser e1e86ff4a2 xl: Add include-only-once checks to xl_cmd{impl,table}.h
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-14 08:05:05 +01:00
Keir Fraser 9fa16606cb xl: Add "xl uptime" command, a clone of "xm uptime".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-14 08:01:51 +01:00
Keir Fraser 102f8460ca xl: Check invalid domid in find_domain()
If domain id is invalid, find_domain should return error because
the specified domain does not exist.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-14 07:56:43 +01:00
Keir Fraser 1803120b06 libxl: Fix missing memory/target xenstore entry on domain creation
There was a simple bug in stuffing the initial setup array.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-14 07:55:14 +01:00
Keir Fraser 3921297ea2 libxl: Adjustments to memset/memmax handling
I think xl memset should change the memory currently used by the guest
and xl memmax should change the size of the guest's address space and
not the population.  For this reason libxl_set_memory_target should
provide a way to enforce the memory target, calling
xc_domain_setmaxmem.  On the other hand xl memmax shouldn't call
xc_domain_setmaxmem because that is the upper bound of the memory
reservation, it should just change static-max, that at the moment
wouldn't do much, but we can imagine that in the future could trigger
something useful in the guest.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jonathan Knowles <Jonathan.Knowles@eu.citrix.com>=20
2010-05-14 07:53:16 +01:00
Keir Fraser b4dee233da xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 12:21:16 +01:00
Keir Fraser eac0f64d80 libxl: Check return codes of write/asprintf/daemon consistently.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-13 09:35:05 +01:00
Keir Fraser f4de8d0315 xl: Implement block-detach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:52:47 +01:00
Keir Fraser a9733d50ff xl: Implement block-list command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:51:50 +01:00
Keir Fraser 2b579c5add xl: Implement block-attach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:50:54 +01:00
Keir Fraser d32239ba6e xl: Implement network-detach command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:49:41 +01:00
Keir Fraser 742c6e551a xl: Implement network-list command
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:48:35 +01:00
Keir Fraser 1a043dad2a xl: Implement network-attach
Signed-off-by: Eric Chanudet <eric.chanudet@citrix.com>
2010-05-13 08:46:57 +01:00
Keir Fraser c0910cbc5b xl: Add check for command 'xl mem-set'
Get max memory from /local/domain/$domid/memory/static-max, and then
do value check. The value larger than static-max is invalid.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-12 08:53:27 +01:00
Keir Fraser bf4215becc xl: Add command 'xl mem-max'
Add subcommand 'xl mem-max', can be used to set static max memory

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-12 08:52:59 +01:00
Keir Fraser 59e0af401a xl: Add "xl top" command, a clone of "xm top".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-12 08:52:30 +01:00
Keir Fraser c614ef19d3 xl: Add "xl sysrq" command, a clone of "xm sysrq".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-12 08:52:07 +01:00
Keir Fraser 990e331218 xs: avoid pthread_join deadlock in xs_daemon_close
Doing a pthread_cancel and join on the reader thread while holding all
the request/reply/watch mutexes can deadlock if the thread needs to
take any of those mutexes to exit.  Kill off the reader thread before
taking any mutexes (which should be redundant if we're
single-threaded at that point).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-12 08:49:13 +01:00
Keir Fraser 20a817b0a7 xs: make sure mutexes are cleaned up and memory freed if the read thread is cancelled
If the read thread is terminated with pthread cancel, it must make
sure all memory is freed and mutexes are unlocked.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-12 08:48:14 +01:00
Keir Fraser 7fa5e3ae97 xl: use help table to describe command help information
This patch generate a help table to describe command help
information.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-11 12:37:26 +01:00
Keir Fraser 1e560df12f xl: Add "xl trigger" command, a clone of "xm trigger".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-11 11:23:54 +01:00
Keir Fraser 0e13089b14 libxl: More cpupool fixes.
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-11 08:39:01 +01:00
Keir Fraser c3cd270e0f xl: "vncunused" is documented to default to 1.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-11 08:37:25 +01:00
Keir Fraser dc21ec2b12 xm: explicitly differentiate between tap and tap2 in config parsing.
From: Jim Fehlig <jfehlig@novell.com>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
2010-05-11 08:31:16 +01:00
Keir Fraser e0d20ed4b7 xl: Remove transaction handle in "xl rename"
Thanks Stefano for pointing out that transaction handle in libxl
clients is not needed.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-10 09:27:17 +01:00
Keir Fraser 5659b2e667 xl: add missing migrate commands to command table
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
2010-05-10 09:26:29 +01:00
Keir Fraser 62dcdb74d8 Remus: fix missing import in device.py
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-10 09:25:46 +01:00
Keir Fraser 2582117ae8 libxl: Check cpupool parameter during domain creation.
Signed-off-by: Jergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-10 09:25:11 +01:00
Keir Fraser dd41a2dae2 xl: ignore opengl unless sdl is enabled
The "opengl" setting is documented as having no effect unless "sdl" is
set.  Make sure this is honoured.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-10 09:21:58 +01:00
Keir Fraser 9f92203e2c libxl: fix paths for non-standard installations
Attached patch removes hardcoded pathes and corrects wrong path to
qemu-dm.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-07 19:16:40 +01:00
Keir Fraser eb8d759136 ocaml: NetBSD support and general CFLAGS cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 19:08:55 +01:00
Keir Fraser b87c206038 xl: Update memory info in xenstore when use 'xl mem-set'
'xl mem-set' should update memory info in xenstore's vm info.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-07 18:57:30 +01:00
Keir Fraser 99462ede4c xenstored: Always build and install.
It coexists quite happily with oxenstored.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 11:45:18 +01:00