Commit Graph
1435 Commits
Author SHA1 Message Date
atse@norwich.uk.xensource.com 3c9f8469ed [XM] Fix error reporting for resources.py, remove duplicate try block.
Also fixed usage message to not include misspelling of the command.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-28 12:16:11 +01:00
atse@norwich.uk.xensource.com 438289a1bd [XM] Removed traceback printing for non ACMError exceptions
Removing try,except block as cfgbootpolicy should allow exceptions to
propagate instead of printing traceback to stdout.
(http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=778)

Changed usage of string.join, string.split when creating security
policy path name.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-28 11:50:51 +01:00
atse@norwich.uk.xensource.com 9bb76d3442 [XM] Set proper return code for exceptions in xm, catch ACMError.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-28 12:03:10 +01:00
atse@norwich.uk.xensource.com 7ce79f6a21 There's a typo in create.py, which affects PV bootloaders (such as
domUloader and probably pygrub).  Patch attached.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-09-28 10:10:59 +01:00
kfraser@localhost.localdomain a301105b5b [XM] Fix 'xm uptime' command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-27 14:01:30 +01:00
kfraser@localhost.localdomain 3c9113ced2 [XM] Fix domain reported by 'xm sched-sedf'.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-27 14:00:33 +01:00
kfraser@localhost.localdomain 6681aec641 [XM] Fix 'xm rmlabel' command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-27 13:59:48 +01:00
kfraser@localhost.localdomain 32b51f8b72 [XM] Reenable the '-h' option, disabled in changeset:11572.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-27 13:58:46 +01:00
Emmanuel Ackaouy 7ccdaed2ed Adds support for the keyword 'all' to the vcpu-pin operation.
Using 'all' in place of a specific vcpu will apply the cpumask
to all vcpus in the domain.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2006-09-26 12:17:51 +01:00
kfraser@localhost.localdomain ad27570a65 [TOOLS] Wait for backend devices to set up before resuming execution
of a restored guest.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-25 09:11:52 +01:00
atse@norwich.uk.xensource.com bfde0c9ad7 [XM] Fix argument parsing for dump-core subcommand
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-23 13:39:32 +01:00
atse@norwich.uk.xensource.com 3918261f47 [XM][ACM] Add try,catch back to main() for dry-run
Signed-off-by: Alastair Tse <atse@xensource.com>
Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
2006-09-22 17:46:32 +01:00
atse@norwich.uk.xensource.com 3b61bd783a [XM] Move 'xm sysrq' into main.py
* There's not need for sysrq to be in its own file.
* Bonus advantage: can use arg_check rather than gopts for argument
  validation.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-22 16:32:30 +01:00
atse@norwich.uk.xensource.com cef39afbe9 [XEND] Do not attempt core dump to directories.
- Abort core dump if destination is a directory.
- Throw appropriate XendError expection on failure.
Reported by Masaki Kanno <kanno.masaki@jp.fujitsu.com>.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-22 16:20:36 +01:00
atse@norwich.uk.xensource.com 15473a42cf [XEND] Remove hard tabs from destroyDevice()
Reported by Hollis Blanchard.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-22 15:56:19 +01:00
atse@norwich.uk.xensource.com 8554ba8909 [XEND] Check for invalid memory sizes.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-22 15:36:11 +01:00
atse@norwich.uk.xensource.com 1681108c98 [XM] Text wrapping fix, xm create --help_config fix.
* Fix text wrap so it doesn't chop off last word in help message for
  certain cases.
* Fix handling of xm create --help_config
* Remove redundant gopts.usage() call.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-22 15:06:00 +01:00
atse@norwich.uk.xensource.com f88384ec46 [XM] Error handling cleanup
Introducing an OptionError exception to be used by all xm subcommands
to signal an error in the arguments. "xm" will catch these and output
the appropriate error and usage message.

Detailed Changes:

main.py:
 *  Cleaned up imports and moved warning filter outside of
    import block.
 *  Converted usage parameters and description to a python
    dict rather than strings to enable better usage help
    formatting.
 *  Removed unused list_label domain command.
 *  Added cmdHelp() prints out usage message for any command
 *  Added shortHelp() prints out the default help message when
    xm is invoked with no arguments.
 *  Added longHelp() prints out long help message when invoked
    with xm --help or xm help.
 *  Added extra optional paramter to getDomains() so we can
    tell Xend not to poll devices. This will speed up xm list.
    (PENDING changes to Xend itself.)
 *  Changed all references where 'dom' actually means 'domid'
    to use the correct name.
 *  Changed 'xm list' header format to use printf formatting style.
 *  Renamed xm_subcommand to xm_importcommand so it is more
    clear what it is doing (all xm commands are subcommands!)
 *  Moved cpu_make_map() inside xm_vcpu_pin as an anonymous func.
 *  Use OptionError whenever an invalid option is detected in xm.
 *  Added proper catch and error printing for XendError and
    OptionErrors in main().

addlabel.py:
cfgbootpolicy.py:
dry-run.py:
dump-policy.py:
get-label.py:
labels.py:
loadpolicy.py:
makepolicy.py:
rmlabel.py:
resources.py:
 *  Replaced usage() with help() that is called from main.py
 *  Replaced usage() invokation with raising OptionError

opts.py:
 *  Added very simple wrap() function that behaves differently
    to textwrap.wrap()
 *  Added OptionError()
 *  Replaced the string representation of Opt, Opts to output
    a nicely formatted usage message.
 *  Changed class Opts itself will throw approriate OptionErrors.
 *  Changed set_bool to recognise 'y' and 'n' as valid input

create.py:
 *  Some whitespace and column width cleanup.
 *  throws OptionError if encounters option error.

migrate.py:
 *  Replace usage() message with the string representation of
    gopts.

sysrq.py:
 * Replace usage message with throwing OptionErrors

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-09-22 11:37:31 +01:00
Tim Deegan 76ccc6e959 Merge 2006-09-21 15:04:29 +01:00
Tim Deegan 1c80d1b0a3 [XEND] Don't prepend '/dev/' to any absolute path.
Check for '/' rather than '/dev/' when translating e.g. 'hda'->'/dev/hda'
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
2006-09-21 15:00:50 +01:00
Tim Deegan fbbf99bec9 [XEND] split command-line arguments to the bootloader script properly.
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
2006-09-21 14:58:01 +01:00
Emmanuel Ackaouy 4c83c4918a This patch adds value checking of sched-credit xm options.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-21 14:10:56 +01:00
Christian Limpach 212efff62a [tools] Increases some of the timeouts
since e.g. stealing the hotplug lock after five seconds is completely insane.

From: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-21 13:53:49 +01:00
jchesterfield@wicket.uk.xensource.com 551365b6a0 Adding max block device timeout of 30 secs for live migrate. 2006-09-15 18:48:24 +01:00
root@procyon 805b7b3995 This patch add localtime to dumpcore filename.
And it add '-imcomplete' if failed.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-09-14 08:19:39 +01:00
root@procyon 34e0159ce1 xm dump command add on
xm dump-core [-L|--live][-C| --crash] <domID> [output path]

-L| --live Live dump:
        By default, xm dump does an xm pause, unpause before and
        after taking the dump, respectively.  This option disables
        the pause/unpause and simply takes the dump.

-C :| --crash crash dump:
        This executes an xm destroy after the dump file is complete.

The output path is optional, and if it is not specified, the path will be
/var/xen/dump/<domU name>.<domU ID>.core

This command uses the existant dumpCore(), which has been used for
coredump when a domU crashed.

Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-09-14 08:19:38 +01:00
Ewan Mellor 9054dbd238 Remove the '-instance' parameter from the qemu device model. Since this parameter
is not interpreted by the DM, it actually causes the DM to hang if
passed. Future device model support for the vTPM will read parameters
from the xenstore and won't need the command line parameter(s).
The patch includes a small change to the debugging output for the vTPM
module.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-09-14 08:18:56 +01:00
Ewan Mellor bf510c7f4c This patch adds syntax checking for "xm block-attach" command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-14 07:55:28 +01:00
Ewan Mellor 9a6d1bcab3 Show the usage message if invalid arguments are given to xm sysrq.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-09-14 07:55:27 +01:00
awilliam@xenbuild.aw 84804f40f9 merge with xen-unstable.hg 2006-09-12 11:43:22 -06:00
atse@norwich.uk.xensource.com 82f6d80e3a [XEND] Return an Internal Server Error via the Xend HTTP server.
This allows domain creation failures can be detected when done via HTTP.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-09-12 16:33:33 +01:00
Steven Hand f1b7d71605 This patch fixes return codes for the acm-related Xen management scripts
(error conditions) and addresses minor issues that 'pycheck' complains
about. It is tested with xm-test and by manually running the xm
commands. It also handles the return case (reported by Masaki Kanno)
that was missed in the originally patch.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-09-12 11:09:22 +01:00
awilliam@xenbuild.aw 296b9322bc [IA64][XEND] Fix getRequiredShadowMemory parameters
Parameter count changed in xen-unstable.hg 11417:65a41e3206ac

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-09-10 15:34:14 -06:00
Tim Deegan 06b8f9d3ab [XEND] balloon enough memory to enable shadow mode before live migration.a
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-09-08 18:55:53 +01:00
jchesterfield@dhcp92.uk.xensource.com c2a28ee6ac [BLKTAP] Fix in xend to properly destroy blktap devices when deviceClass=='tap'
Submitted by Andres Lagar Cavilla
2006-09-06 11:42:29 +01:00
Ewan Mellor bc93f293ac Fix xm create -F. This can't be very widely used, because it looks like it's
been broken for ages!

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 17:26:20 +01:00
Ewan Mellor 26f067672a Added vmunused flag to unit test results to match recent change.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 17:26:18 +01:00
Ewan Mellor 70b20785e0 Add missing import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 17:26:17 +01:00
Ewan Mellor 710a9ced48 Fix inverted sense of getRequiredAvailableMemory and
getRequiredInitialReservation on x86 HVM.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 16:23:11 +01:00
Ewan Mellor f470f70290 Fix the memory reservation calculations. Introduce a new architecture-specific
call to determine the initial reservation separately from the amount of
memory to be freed up by ballooning -- when using QEMU, we lose 8 MiB to video
RAM, which must be accounted for when ballooning, but _not_ accounted for
within the domain's memory allocation.

Tidy this code up using the new architecture-specific interface arrangement.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-09-05 14:17:50 +01:00
kaf24@firebug.cl.cam.ac.uk 5182367c40 [XENBUS] Introduce new "online" node for backend drivers.
Driver changes:  Make backend drivers check it when entering Closed
state, only unregister devices when the "online" node is either "0" or
not present.  The later maintains backward compatibility.

Tools changes:  Update "online" node when creating and hot-unplugging
devices.

Background: When kexec'ing a new kernel, the old kernel's frontend
driver will shutdown, but the backend device should *NOT* disappear
due to that, so the new kernel instance can reconnect.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2006-09-01 00:33:19 +01:00
Steven Hand 7a2e0b5994 Fix fix :-)
Signed-off-by: Steven Hand <steven@xensource.com>
2006-08-30 13:51:12 +01:00
Steven Hand 8a8378e8df Fix hard tabs.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-08-30 13:50:08 +01:00
jchesterfield@dhcp92.uk.xensource.com 458052b5ec Block IO safety patch for live migration. Xend checks that VBDs are destroyed before unpausing the domain. 2006-08-30 11:39:27 +01:00
Ewan Mellor 34784d695b Further shadow_mem_control fixes -- we need to balloon the amount of memory
that we're going to request i.e. the rounded-up value.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-30 11:05:00 +01:00
Ewan Mellor b973ec93fc Shadow memory should be in MiB, not KiB. It also needs rounding up to be safe.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-30 09:47:24 +01:00
Ewan Mellor 01fa1a0693 Fix reboot and reconfigure of HVM guests when they are configured with an
empty CD-ROM drive.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-30 02:53:48 +01:00
Ewan Mellor aab843f487 Added an entry to arch._types for x86_64.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-30 01:20:01 +01:00
Ewan Mellor 4fd2e43a20 [XEND] abstract architecture-specific bits in image.py
- create arch.type (which evaluates to "x86", "ia64" or "powerpc")
- create subclasses for x86 and ia64 HVM loaders
- rework findImageHandlerClass()
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-08-29 23:20:22 +01:00
Ewan Mellor 773367b449 This patch fixed 'xm reboot' to work as you expected with the wait
option. This patch adds a restart sequence counter to xenstore.
The completion of a VM reboot is detected by observing that
its restart sequence counter changes.


Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-08-29 22:51:06 +01:00