Commit Graph
2974 Commits
Author SHA1 Message Date
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 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 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 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 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 c4826676c4 libxl: Support cpupools
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-05-07 09:36:58 +01:00
Keir Fraser cd62ba5322 xl: Add "xl rename" command, a clone of "xm rename".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-07 09:31:38 +01:00
Keir Fraser 526bdf67f5 xl: Add "xl domname" command, a clone of "xm domname".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-07 09:31:21 +01:00
Keir Fraser 8a3067e096 xl: Add "xl domid" command, a clone of "xm domid".
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-07 09:30:56 +01:00
Keir Fraser 5c0704bc6f libxl: support vncpassword in device-model specification
From: Gihan Munasinghe <GMunasinghe@flexiant.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-07 09:26:49 +01:00
Keir Fraser 0cb7b470ae xl: Start enumerating vifs from 0.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-07 09:15:19 +01:00
Keir Fraser 08bbf1f316 xl: fix printf format specifier for 64-bit arguments
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-06 16:01:49 +01:00
Keir Fraser c871af7f4d libxl: make use of libxl path functions
Make use of the new libxl_*_path functions to specify the correct
absolute path of qemu-dm, hvmloader and ioemu-stubdom.gz.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-06 15:59:35 +01:00
Keir Fraser 68f722c809 xl: If domain creation fails, destroy the domain
This patch makes sure that if the domain creation fails for any
reason, no zombie domains are left around.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-06 15:55:31 +01:00
Keir Fraser ed13686ad6 xl: fix bash completion
Changeset 21263:9a12204ac0e4 changes the output format of "xl help"
which bash completion use, so update bash completion to compatible
with this.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-06 11:12:11 +01:00
Keir Fraser fb69f60385 libxl: Ensure install directories are created, and copy
bash-completion script relative to $(DESTDIR).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-05 20:23:27 +01:00
Keir Fraser 15fb9e3a4e libxl: make set_memory_target work on domains with no videoram
If a domain has no videoram (say, dom0), then treat the size as 0 and
continue, rather than just failing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-05-04 12:36:30 +01:00
Keir Fraser 9fdb81c40a xl: Make xl usage summary legible
The xl usage summary is illegible with its double spacing and huge gap
between the command and its description.  Tighten it up.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-04 12:19:50 +01:00
Keir Fraser 335c738c44 Change the global suspend event channel lock file to a per-domain lock file
This allows multiple guests to be migrated or protected by Remus
simultaneously.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Brendan Cully <brendan@cs.ubc.ca>
2010-05-04 12:12:28 +01:00
Keir Fraser ba6ae3d1ef xl: Add option '-c' for 'xl create'
* -c Connect to the console after the domain is created.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-04 12:09:48 +01:00
Keir Fraser 73aeac4a30 xl: Add support of specifying '[vars]' in 'xl create'.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-04 12:03:20 +01:00
Keir Fraser b2372dcbc5 xl: Add some return-code sanity checks to 'xl info'.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-05-04 11:56:26 +01:00
Keir Fraser 61cddd709e xl: fix XL_LOG_ERRNOVAL output
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-04 11:49:46 +01:00
Keir Fraser 9136a919b1 xl: Add basic bash completion for xl command.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-04 11:48:10 +01:00
Keir Fraser 817ad21add xl: Remove unused variable verbose in info function
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-04 11:46:24 +01:00
Keir Fraser 3f7c998a0d xl: Add help for 'xl info' command
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-04 11:44:19 +01:00
Keir Fraser ba1da95d66 libxl: Build with -Werror
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-04 11:38:24 +01:00
Keir Fraser a14ec1a1e5 xl: Add command description to command table
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-04 11:37:06 +01:00
Keir Fraser 0618421fbd xl: Use command table to store command name and implementation
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-04 11:28:06 +01:00
Keir Fraser 52efdec3ea xl: Move xl command implementation to a seperate file
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
2010-05-04 11:23:17 +01:00
Keir Fraser 3747e06272 xl: Add subcommand "xl sched-credit"
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2010-05-04 11:09:32 +01:00
Keir Fraser 147e14cc8e libxl: Expose build-time install paths inside libxl.
Use this to construct the fully-qualified path to xenconsole.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-29 19:38:52 +01:00
Keir Fraser 6b19626a0e xl: Add option '-p' for command 'xl create'
Add option '-p' for command 'xl create', and update
the help info.
* -p Leave the domain paused after it is created.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-04-26 06:52:44 +01:00
Keir Fraser bd8daf6035 xl: Fix segment fault of 'xl list'
If libxl_list_domain() returns NULL, segment fault occurs now.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
2010-04-26 06:52:13 +01:00
Keir Fraser f7167a003c xl: support oos domain parameter
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-04-23 08:39:29 +01:00
Keir Fraser 2cb79e82a0 xl: add "xl info" command
The info subcommand was missing from the xl tool. Use the new libxl
wrapper functions to create a clone of "xm info". The splitting into
several smaller functions is enspired by the implementation in
XendNode.py.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-04-22 09:39:58 +01:00
Keir Fraser 63e8bcc364 libxl: add version_info function
Xen provides a xen_version hypercall to query the values of several
interesting things (like hypervisor version, commandline used, actual
changeset, etc.). Create a user-friendly and efficient wrapper around
the libxc function to provide values for xl info output.
Since the information is static during the whole runtime, we store
it within the libxl_ctx structure and just deliver the pointer on
subsequent calls.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-04-22 09:39:17 +01:00
Keir Fraser 419794de68 libxl: add sched_get_id function
To get the name of the currently used scheduler, Xen provides a
sched_id sysctl. Add a libxl wrapper around the libxc function to
query this.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-04-22 09:38:39 +01:00
Keir Fraser 6de99b587a libxl: extend physinfo structure
The libxl version of the physinfo sysctl does not contain some
fields like nr_nodes or capabilities needed for xl info output.
Add them to the structure and the retrieving function.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-04-22 09:37:31 +01:00
Keir Fraser 7da1c9269c libxl: <sys/signal.h> -> <signal.h>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-04-13 12:48:17 +01:00
Keir Fraser 0e9cb215cf libxl: build fix for netbsd
<sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-04-13 12:21:28 +01:00
Keir Fraser 4cdb003c2d xl: Migration support
Implement "xl migrate".

ssh is used as the transport by default, although this can be
overridden by specifying a different sshcommand.  This is a very
standard approach nowadays and avoids the need for daemons at the
target host in the default configuration, while providing flexibility
to admins.  (In the future it might be nice to support plain
unencrypted migration over TCP, which we do not rule out now, although
it is not currently implemented.)

Properties of the migration protocol:
  * The domain on the target machine is named "<domname>--incoming"
    while it is being transferred.
  * The domain on the source machine is renamed
  "<domain>--migratedaway"
    before we give the target permission to rename and unpause.
  * The locking in libxl_domain_rename ensures that of two
    simultaneous migration attempts no more than one will succeed.
  * We go to some considerable effort to avoid leaving the domain in
    a bad state if something goes wrong with one of the ends or the
    network, although there is still (inevitably) a possibility of a
    unresolvable state (in case of very badly timed network failure)
    which is probably best resolved by destroying the domain at both
    ends.

Incidental changes:
  create_domain now returns a libxl error code rather than exiting on
  error.
  New ERROR_BADFAIL error code for reporting unpleasant failures.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-04-12 17:47:16 +01:00
Keir Fraser c31aaf24cd xl: Domain creation logging fixes
* Make create_domain always return to caller
 * Have create_domain set its log callback sooner
 * Actually write things to logfile, and some error checking

With some combinations of options, create_domain would never return to
the caller, since it would have called daemon and will later exit.  So
we fork an additional time, so that we can call daemon in the child
and also return to the caller in the parent.  It's a shame that
there's no version of daemon(3) that allows us to do this without the
extra code and pointless extra fork.

daemon(0,0) closes all the fds.  So we need to call daemon(0,1) and
organise detaching our stdin/out/err ourselves.  Doing this makes
messages actually appear in the xl logfile in /var/log/xen.

Finally, make create_domain call libxl_ctx_set_log sooner.  This makes
some lost messages appear.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-04-12 17:46:39 +01:00