Commit Graph
1762 Commits
Author SHA1 Message Date
jfehlig@jfehlig2.provo.novell.com 379e2ea7a9 Allow adding VIF devices to a VM when in halted state. Do not attempt to create the VIF device if VM is in halted state.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2006-12-12 15:28:23 -07:00
Ewan Mellor 3fdae5e58f Tidy error message.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-09 19:24:46 +00:00
Ewan Mellor b02c5adc45 When recreating the record for dom 0, read the current VCPU settings from Xen,
rather than from the store, allowing boot-time configuration to take precedence.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-13 14:36:36 +00:00
kfraser@localhost.localdomain 9331049186 [XEND] Fix maxmem config issues.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-13 11:07:47 +00:00
kfraser@localhost.localdomain 15e8ea54ac [TOOLS] Fix the build. Clearly demarcate PPC-specific stuff.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-13 10:23:53 +00:00
Hollis Blanchard 8cadd348b3 [POWERPC] Merge with xen-unstable.hg.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-12-12 09:58:42 -06:00
Hollis Blanchard bdd61e7052 [POWERPC] Merge in outstanding changes from xenppc-unstable.hg.
It's a long story, but basically a small divergence in xenppc-unstable meant a
large number of changesets couldn't be directly imported to xen-unstable, so
this changeset includes all of them.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-12-12 09:56:06 -06:00
kaf24@localhost.localdomain 5334214feb pygrub tmp files should live in /var/run/ not /var/lib/, as they are
indeed runtime only.

Also fix a race condition in making the pygrub fifo.

Signed-off-by: John Levon <john.levon@sun.com>
2006-12-09 15:04:27 +00:00
kaf24@localhost.localdomain 74d9fdb147 Merge with xen-ia64-unstable.hg 2006-12-09 14:34:53 +00:00
john.levon@sun.com 1dd304690d xm block-attach can take an optional 5th argument, show it in the help.
Signed-off-by: John Levon <john.levon@sun.com>
2006-12-08 07:22:21 -08:00
Alastair Tse e2bfc5ae07 [XEND] Keep vif IP addresses as space separated string.
They were inconsistently represented as strings or lists making it
difficult to know the type of the IP parameter for vifs. Since both xm
and DevController represents these as space separated strings, that is
what it will be stored as.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-08 13:31:21 +00:00
Alastair Tse 781b258bf0 [XEND] Make sure UUID is in the right format.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-08 13:28:22 +00:00
kfraser@localhost.localdomain 43ff8f0aef [XEN] Implement XENMEM_set_memory_map, which specifies memory map to
be returned by XENMEM_memory_map. Hook this into the domain builder.

Based on a patch by Glauber de Oliveira Costa <gcosta@redhat.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-08 11:30:30 +00:00
Alastair Tse a3b9408baf [XEND] Fix xm vcpu-set when decrementing VCPU count
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-08 11:08:26 +00:00
awilliam@xenbuild2.aw 0741834153 merge with xen-unstable.hg 2006-12-08 09:09:18 -07:00
Ewan Mellor 4f2a113ba6 Diagnose bad config files.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-07 17:47:43 +00:00
Alastair Tse eee69a2a82 [XEND] Only return valid VIF and VBD parameters via Xen API.
Also fix typo for memory_dynamic_{min,max}.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 16:43:22 +00:00
Alastair Tse 69370cc992 [XEND] Sync Xen API with newer VDB and VIF specification.
Fix breakage with storing VIF and VBD refs, remove extraneous
debugging. Also fixing some type errors in default values for Xen API
if things are missing in XendConfig.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 16:08:44 +00:00
Alastair Tse dee1d9ba0c [XEND] Make SXP parsing re-use device_add in XendConfig
This will fix the IP address configuration problem for vifs.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 14:40:13 +00:00
Alastair Tse 6fe80e69d0 [XEND] Prevent None values from appearing in Device SXP
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 14:38:16 +00:00
Alastair Tse e150713e68 [XEND] Fix resume for managed domains.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 13:47:13 +00:00
Ewan Mellor b744adfbba The new lifecycle patches in xen-unstable added 3 new operations which can
be performed on domains - new, start and delete.  libvirt has had no-op
stub implementations of these APIs for a while & thus we'd enable their
use for Xen 3.0.4 builds. The new APIs are not currently exposed via the
existing SEXPR protocol, and since the new Xen-API protocol is unsupported
tech-preview for 3.0.4 we don't want to re-write against that just yet.

Thus the attached patch adds the 3 neccessary bindings for the SEXPR protocol
to allow the lifecycle functionality to be invoked. It also allows the 'state'
parameter to be specified when listing domains, so we can explicitly request
inactive domains if we know we're running against a 3.0.4 era XenD

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 12:15:30 +00:00
Ewan Mellor 504c725be0 Scrub VNC passwords from the logs.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 12:14:22 +00:00
Ewan Mellor a2b0be5248 Do an explicit check for bootloader path existence prior
to the one for executable permissions. Also print out the path being
tested.

Signed-off-by: Daniel P, Berrange <berrange@redhat.com>
2006-12-07 12:11:40 +00:00
Ewan Mellor 09ddbb1ce5 The HTTP service used for SEXPR based RPC calls currently serializes all
incoming client requests. Since some requests can take non-trivial time
blocking out other clients in this way has bad consequences. The attached
patch makes XenD spawn a new thread to handle each incoming HTTP request.
This same approach is already taken in the XML-RPC service in XenD so I
don't anticipate any multi-thread issues (at least none which don't already
exist).

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 12:07:53 +00:00
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
awilliam@xenbuild.aw 9d64d3ff83 merge with xen-unstable.hg 2006-12-05 10:01:15 -07:00
awilliam@xenbuild.aw 04d0fece67 [IA64] Fix VTi domain creation
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-12-05 09:44:24 -07: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