Commit Graph
1733 Commits
Author SHA1 Message Date
Alastair Tse ba855e2974 Merge 2006-12-07 11:51:22 +00:00
Alastair Tse 948c26c48d [XM] Fix xm uptime TypeError exception.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-12-07 11:50:11 +00:00
kfraser@localhost.localdomain a8740815ef merge 2006-12-07 11:47:10 +00:00
kfraser@localhost.localdomain 3679c60f52 [LIBXC] Python error extraction tweak.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-07 11:46:07 +00:00
Ewan Mellor df8016fc0b Remove broken call to XendDomainInfo.getSsidref(), fixing the obsolete HTTP
server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-07 11:45:04 +00:00
Alastair Tse 4cf8135a04 Merge 2006-12-07 11:44:05 +00:00
Alastair Tse 4393b66b51 [XEND] Fix configureBootloader to work with HTTP/SEXP.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 11:41:38 +00:00
kfraser@localhost.localdomain b07ced9c1f [LIBXC] Add an error reporting API to the libxc library.
- An 'xc_error' struct is used to pass around error
   details. Currently contains two members 'code' an enumeration of
   error types, and 'message' a free text description of the specific
   problem.

 - The xc_get_last_error() method returns a const pointer to the
   internal instance of this struct manged by libxc. By returning a
   const pointer we can add extra members to the end of the struct at
   any time without worrying about ABI of callers. This will let us
   provide more fine-grained info if needed in the future.

 - The xc_error instance is statically defined inside libxc and marked
   __thread. This ensures that errors are recorded per-thread, and
   that when dealing with errors we never need to call malloc - all
   storage needed is statically allocated.

 - The xc_clear_last_error() method resets any currently recorded
   error details

 - The xc_error_code_to_desc() method converts the integer error code
   into a generic user facing messsage. eg "Invalid kernel". Together
   with the 'message' field from xc_error, this provides the user
   visible feedback. eg "Invalid kernel: Non PAE-kernel on PAE host."

 - A callback can be registered with xc_set_error_handler to receive
   notification whenever an error is recorded, rather than querying
   for error details after the fact with xc_get_last_error

 - If built with -DDEBUG set, a default error handler will be
   registered which calls fprintf(stderr), thus maintaining current
   behaviour of logging errors to stderr during developer builds.

 - The python binding for libxc is updated to use xc_get_last_error
   to pull out error details whenever appropriate, instead of
   returning info based on 'errno'

 - The xc_set_error method is private to libxc internals, and is used
   for setting error details

 - The ERROR and PERROR macros have been updated to call xc_set_error
   automatically specifying XC_INTERNAL_ERROR as the error code. This
   gives a generic error report for all current failure points

 - Some uses of the ERROR macro have been replaced with explicit
   calls to xc_set_error to enable finer grained error reporting. In
   particular the code dealing with invalid kernel types uses this
   to report about PAE/architecture/wordsize mismatches

The patch has been tested by calling xm create against a varietry of
config files defining invalid kernels of various kinds. It has also
been tested with libvirt talking to xend. In both cases the error
messages were propagated all the way back up the stack.

There is only one place where I need to do further work. The suspend
& restore APIs in Xend invoke external helper programs rather than
calling libxc directly. This means that error details are essentially
lost. Since there is already code in XenD which scans STDERR from
these programs I will investigate adapting this to extract actual
error messages from these helpers.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 11:36:26 +00:00
kfraser@localhost.localdomain a490953a59 [HVM] Fix reboot failure when configured 'cdrom', i.e. bug 832.
Signed-off-by : Xinmei Huang <xinmei.huang@intel.com>
2006-12-07 11:16:17 +00:00
Alastair Tse 59a3344cac [XEND] Update vcpu_avail when parsing configuration.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 11:12:05 +00:00
Alastair Tse dc960266aa [XEND] Fix reboot for HVM domains if cdrom is empty.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 10:54:43 +00:00
Ewan Mellor 556d54c7ce Added Xen-API implementations for xm pause, xm unpause, xm destroy, xm rename,
and fix xm suspend and xm delete.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 11:25:51 +00:00
Ewan Mellor 2420eb41c5 Implement VM.set_name_label.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 11:24:37 +00:00
Ewan Mellor 8edc7b1c06 Added support for configuration file for xm, and use that to specify
contact and authentication details for the Xen-API server.

The default behaviour is still to use the existing legacy XML-RPC server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 11:02:32 +00:00
Ewan Mellor 6455e182f2 Added server proxy and session manager for Xen-API clients.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:47:31 +00:00
Ewan Mellor 5ef203e373 Fix server reloading when the HTTP server is enabled.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:37:10 +00:00
Ewan Mellor 81f605d9cb Don't trace inside SrvServer.py -- it's doing a one-second sleep in a loop, so
it just fills the trace with useless clutter.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:13:46 +00:00
Ewan Mellor 1d68773ad2 Move the actual call routed by do_legacy_api_with_uuid out of the scope of
the domains_lock.  The call itself is already locking as necessary, and it
is important for domain_start to be able to release the lock across the scope
of waitForDevices.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:12:39 +00:00
Ewan Mellor 6e66f078d4 Fix HTTP server.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:10:06 +00:00
Ewan Mellor ec168504b9 Fix error message.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-05 15:47:43 +00:00
Ewan Mellor 549aad081d Close the server when instructed, so that we can reload on the same port, and
diagnose a server that fails to start.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:57:18 +00:00
Ewan Mellor bcf6d372d8 Diagnose a failing server, rather than just locking up the whole daemon.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:56:27 +00:00
Ewan Mellor d529c3d93b Added rudimentary "xend reload" functionality. This allows you to reconfigure
the services offered by Xend, without restarting the daemon itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:37:53 +00:00
Ewan Mellor aeb915bbac Tidy error message.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 10:27:23 +00:00
Alastair Tse f24b8a3348 [XEND] Fix mis-types in XendConfig
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 18:35:19 +00:00
Alastair Tse 0f07569d15 [XEND] Re-add vtpm device support in XendConfig
This patch re-adds a recently removed vTPM device handling code.
I am also removing that one code part in the test script that does not
work.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-01 17:37:42 +00:00
Alastair Tse 0ee9d7cc29 [XENAPI] Add extra param for VM.start and fix case for printing out
the output of VM.get_record.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 17:31:30 +00:00
Alastair Tse 486d848417 [XEND] Proper importing of Xen API VM Struct into new XendConfig
Use a smarter method of importing the Xen API VM struct when adding to
XendConfig.

Also add a commented __setitem__ override for XendConfig to type check
certain configuration values.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 17:30:39 +00:00
Alastair Tse 123c8f3d8c [XEND] Fix case mismatch in VM.get_record for Xen API
Also make VM.get_all return halted domains too.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 17:21:19 +00:00
Alastair Tse 916bea06a7 [XEND] Fix outputting device SXPs when domain is halted.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 16:31:36 +00:00
Alastair Tse feeb19b8cb [XEND] Fix missing vncpasswd option for HVM domains.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 14:35:33 +00:00
Alastair Tse ea1248436a [XEND] Reapply fix for ever expanding kernel_args in XendConfig
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 13:55:28 +00:00
Alastair Tse 2e23acca55 [XEND] Ensure config value types in XendConfig
Add definitions of what we expect the types to be for the values in
XendConfig and apply them when parsing SXP where all values are either
strings or list.

Also fix missing stdvga in HVM config.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 13:53:04 +00:00
Ewan Mellor 4bdbd7644a Actually return something from bool0.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:25:33 +00:00
Steven Smith e812bdf5c4 Merge. 2006-12-01 13:12:41 +00:00
Ewan Mellor 7be5d5173c Set localtime, enable_audio, clock_offset, and std_vga back to being bools, not
ints.  This is a recent breakage.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:08:36 +00:00
Ewan Mellor 2f61385eed Added log message for when a VM is deleted.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:07:19 +00:00
Ewan Mellor c7a44ef04b Include the rotated xend.log.X in the bug report.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:06:15 +00:00
Steven Smith e9167464c4 [PVFB][TOOLS] Fix save/restore for domains with PV framebuffers.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:38:41 +00:00
Steven Smith 4ae8d4056e [TOOLS][PVFB] Avoid zombie framebuffer backends.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:20:12 +00:00
Steven Smith f44748c2b6 [TOOLS] Remove some dead code.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:09:10 +00:00
Steven Smith becaa718c2 Merge. 2006-12-01 12:03:38 +00:00
Steven Smith 6bebf0edee [PVFB][TOOLS] Change the configuration syntax for PVFB backends to more
closely match that of other devices.

This involves moving the logic for backend creation out of the image
handlers and in to the device handler, which is a much more sensible
place for it.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 11:49:30 +00:00
Ewan Mellor eb1eb71059 Tidy up the creation of directories that Xend needs. This avoids potential
races in this creation.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 11:32:32 +00:00
Alastair Tse bd8806fb71 [XEND] More fixes for HVM device configuration parsing
Removed duplicated acpi option, added missing stdvga option. Do not
output empty configurations in image sxp. Remove bug with vcpus
passing in device model.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 11:07:22 +00:00
Alastair Tse 515db7a43a [XEND] Fix missing serial and localtime args in device model for HVM
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 10:47:57 +00:00
Steven Smith a5ae44fcdf This is Anthony Liguori's virtual framebuffer forward ported and
extensively hacked based on feedback from xen-devel.

Its architecture is comparable to the common split device driver
architecture: xenfb and xenkbd modules serve as frontend in domU, and
the user space vncfb or sdlfb process serves as backend in dom0.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-12-01 09:48:32 +00:00
Ewan Mellor 6a7c1b4ee0 Fix default for the authentication on the Xen-API server -- the default should
be PAM, not none!

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-30 20:16:54 +00:00
Ewan Mellor f99727ee65 Fix managed domain rebooting by only complaining about a VM name conflict if
the VM UUID conflicts as well.

Also, remove the previous_restart_time node when explicitly rebooting a guest --
the user ought to be able to drive reboots faster than the safety catch.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-30 20:07:58 +00:00
Ewan Mellor be61b6ee05 Fix registration on managed domains on xend restart.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-30 19:11:51 +00:00