Commit Graph
1789 Commits
Author SHA1 Message Date
Ewan Mellor cbdf115ddb Fix printing of usage when OptionError is thrown.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-17 18:24:40 +00:00
Ewan Mellor 324ad7a4a8 An error occurs if the first detach was successful and the 2nd one is
not (of course). Return if the 1st detach is successful, try the 2nd one
if it was not successful. Throw an error if the 2nd one fails.
This should also fix problems I am currently seeing in the xm-test
suite.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-16 12:52:18 +00:00
Brendan Cully 24a6ed484b Improve XendCheckpoint's forkHelper error handling.
When inputHandler raises an exception, close stdin and stdout in the
child before attempting to close stderr, which is held open by a
separate thread. Without this patch, exceptions raised by device
migration caused xend to hang on child.childerr.close().

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2006-12-13 17:45:50 -08:00
Ewan Mellor 0a38a347b7 Persist all the Xen-API data values for VMs.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-16 12:49:23 +00:00
Ewan Mellor cd48fe7de0 Write the new version of the persisted config to a tempfile and then rename it,
to avoid corrupting the file on failure.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-15 17:19:00 +00:00
Ewan Mellor 539d271eff Allow the XenAPI Session object to have login_with_password called as a
methodname, to re-login through the same object (say when the server is
restarted).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-15 17:18:02 +00:00
kfraser@localhost.localdomain a090ca495e VNC pasword authentication support for the paravirt framebuffer server.
The rules for configuring the password are equivalent of those used
for HVM, but the actual guest config option is a little different as a
result of the recent refactoring of the PVFB config file syntax.

 - If the 'vfb' option in the guest config has a 'vncpasswd' parameter
   specified
      - If the passwd is not zero length, use that
      - Else run with no authentication (important as it enables
        override of next rule)
 - Else-if the xend-config.sxp has a password specified use that
 - Else run with no authentication

Example configuration:

 - To set an explicit guest password:
    vfb = [ "type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=123456"]

 - To disable authentication, overriding any XenD configured
   default password
    vfb = [ "type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd="]

 - To run with default XenD configured password (if any)
    vfb = [ "type=vnc,vncunused=1,vnclisten=0.0.0.0"]

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-15 17:33:31 +00:00
Ewan Mellor 1c67fc6446 Fix mem-set, mem-max, and vcpu-set commands when used against inactive domains.
Signed-off-by: Daniel P. Berrange  <berrange@redhat.com>
2006-12-15 11:50:04 +00:00
Ewan Mellor 14a3d5c056 Use new -p flag to qcow-create.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-15 11:48:40 +00:00
jfehlig@jfehlig2.provo.novell.com 160ed4756b Fix VM.get_power_state API. On the xend side an integer representation of the power state was being returned instead of a string representation as specified by the XenAPI spec.
On the c-bindings side the marshalling code converts the string representation to an enum value.  A subsequent attempt to convert the enum from a string to an enum was causing a seg fault.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2006-12-13 18:06:48 -07:00
kfraser@localhost.localdomain d2cd19a8b2 [XM] Fix network-attach help message.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-12-15 09:52:19 +00:00
Ewan Mellor b5c55da7ce Replace the error message when invalid xm commands are given.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-15 09:08:41 +00:00
Ewan Mellor 2b0ca176fc Fix exit status for failed commands, and tidy up the usage display.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-15 02:01:38 +00:00
Steven Hand 58295d5027 Fix exception handling in xend start-of-day.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-12-14 20:58:27 +00:00
Ewan Mellor 184500f7fc Implement new booting parameters for Xen-API, and backwards compatibility for
the old bootloader settings.

We now have two mutually exclusive config groups HVM and PV, with HVM/boot
and PV/{bootloader,kernel,ramdisk,args,bootloader_args}.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-14 18:24:14 +00:00
Ewan Mellor a7416ebe65 Stub implementations of VM.auto_power_on, VM.consoles.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-14 17:43:41 +00:00
Ewan Mellor 8e5b7018e7 Remove a number of unused configuration dictionaries -- these have all
moved into XendConfig now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-14 17:37:29 +00:00
Ewan Mellor 5d46b4c636 Fix calls to destroyDevice that are missing a force flag.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-14 15:32:44 +00:00
Ewan Mellor 4a5cb14abe Add some exception logging.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-14 15:10:47 +00:00
Ewan Mellor e5ec710fa4 Added xm shell command, taken from xapi.py, to make testing the Xen-API calls
a little easier.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-14 14:54:24 +00:00
kfraser@localhost.localdomain 89bc2ddec0 Merge with xen-ia64-unstable.hg 2006-12-14 18:22:58 +00:00
awilliam@xenbuild2.aw a3e94225c7 [IA64][HVM] Use vcpu info from getdomaininfo
This replaces the get/set_param using HVM_PARAM_VCPUS

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-12-14 09:56:41 -07:00
kfraser@localhost.localdomain b1d71c83cc [XM] Fix typo in 'xm vcpu-list' header.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
2006-12-14 11:39:40 +00:00
Ewan Mellor f39983e1f6 Hack xm block-detach to remove tap disks as well as vbds.
This isn't very pretty -- a better solution would be nice.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-13 20:43:47 +00:00
kfraser@localhost.localdomain 70efc627d2 [Xend] Add a --force option to detach operations.
In some situations triggered by errors found on guest side,
the device will be held forever, due to the online flag being still
on. Detach operations mostly fails from this point on, as the backend
will not see frontend's state change anymore.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
2006-12-14 10:17:37 +00:00
kfraser@localhost.localdomain 49f6907f34 [XEND] Activate a declared external device migration script for all devices and all save modes.
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2006-12-14 10:00:56 +00:00
jfehlig@jfehlig2.provo.novell.com 336be6552e When enumerating VMs resident on a host (Host.get_resident_VMs RPC), ensure VMs with same UUID only appear once in the list.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
2006-12-11 13:07:20 -07:00
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