Commit Graph
387 Commits
Author SHA1 Message Date
Ewan Mellor 56906a3ab2 [XEND] Fix pygrub when run server-side on a domain with blktap disks.
Equivalent fix to xen-unstable 11706:bf0deb09facd847db87ab59ed377db6eb0f5a3ad.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-10-28 17:45:43 +01:00
Ewan Mellor c702ebb631 These are the proposed changes to XenD that adapt vTPM handling to the
document and the implementation in the library. It's implementation is
now similar to VIF and VBD. The implementation passes the first 2 tests
in the vTPM- related tests in the xm-test suite.

Minor conflict resolution by Ewan Mellor.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-28 17:12:04 +01:00
Ewan Mellor 370c459ec5 Implement new VTPM model.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-10-28 12:14:47 +01:00
Alastair Tse a5f7c42094 [XEND] Add more API implementations, add sched_id_get to xc.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-26 17:59:49 +01:00
Alastair Tse 9856f07de5 [XEND] Remove mistake of not checking xenstore's name entry for Dom0
Also fix logic with detecting whether devid is an int or not because
xm passes this as a string all the time.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-19 17:48:54 +01:00
Alastair Tse f1587234c9 [XEND] Fix bugs in vbd_create logic when handling VDIs
Attempt to handle 'tap' devices as 'vbd' devices even though the
internal configuration has no idea that 'tap' is a subclass of 'vbd'.

Add option parsing to vbd-create and vdi-create so you can override
the configuration file options.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 17:17:45 +01:00
Alastair Tse 76b24ff4e2 [XEND] Updates to SR and VDI implementations
* Moved xenapi transport util method, stringify to xen.util.xmlrpclib2
* XenVDI now preserves configuration to an XML-ish file
* Update Xen API's class names to be all lowercase
* Update get_by_label to get_by_name_label and return sets as the API
  expects.
* Add support for VBD creation with a VDI reference.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 15:13:21 +01:00
Alastair Tse 7d5ba9b430 [XEND] Conform to Xen API XMLRPC Wire Protocol Customisation
1. Int(s) all have to be String(s).
2. Enums are not transmitted as Ints, but as Descriptive Strings.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 22:50:29 +01:00
Alastair Tse 1e66d26cbd [XEND] Save device updates to VM configuration via Xen API
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 17:34:49 +01:00
Alastair Tse 4abcfe99ad [XEND] Fix check for whether domain is running.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 16:40:39 +01:00
Alastair Tse 943f4e6d26 [XEND] Proper support for devices with UUID. Removing old workaround
with augmented VM UUIDs with devids.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 16:27:06 +01:00
Alastair Tse b2b451d4cd [XEND] Fix many typos with VM interface to XenAPI
1. Python XMLRPC does not allow integer keys to structs.
2. Typo with on_suspend and on_preserve
3. Changed all tuples in constants to lists so .index() works.
4. Made get_vcpus_utils to return seconds of CPU time.
5. Fix flawed login in VM.get_record()
2006-10-05 18:48:54 +01:00
Alastair Tse 7e63b4bf7e [XEND][XM] Fix bug in XendDomainInfo.recreate introduced by refactoring.
* Replaced autostart and autostop with more descriptive on_xend_start
  and on_xend_stop for the configuration.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 18:24:18 +01:00
Alastair Tse 02ba67937c [XEND] Massive XendDomain XendDomainInfo reorganisation to use XendConfig.
* Added some constants to do with lifecycle management in XendDomain
* Added docstrings
* Made all private functions prefixed with an underscore (_)
* Added lifecycle management in XendDomain which stores configs in SXP
  format.
* Added bits of XenAPI support.
* Moved all XendDomainInfo constants to a separate file
* Moved most of the domain creation login into XendDomainInfo rather
  than in module level functions.
* Moved to use Xen API compatible reporting of state.
* Reorganised methods into logical groups in XendDomain and XendDomainInfo
* Moved all domain configuration validation into XendConfig
* Removed DevController cruft from the bottom of XendDomainInfo to
  XendDevices.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +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
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
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 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
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 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
tdeegan@york.uk.xensource.com 49f7c7364e Replace shadow pagetable code with shadow2. 2006-08-16 17:02:35 +01:00
emellor@leeni.uk.xensource.com 99c694310f Implement xm block-configure for CD-ROMs.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-08-16 12:59:30 +01:00
kfraser@localhost.localdomain 13451be1da [XEND] Apply the domain cpumask fully to every vcpu in the domain.
Apply the domain cpumask to each vcpu rather than mapping vcpus to
cpus in the list.  This is more inline with the comments for the
cpus parameter and also allows the credit scheduler to balance
vcpus within the domain cpumask.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2006-08-15 10:56:59 +01:00
kfraser@localhost.localdomain 87f45629c6 [XEND] Better checking of shutdown of domain0.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-07-28 17:35:39 +01:00
kfraser@localhost.localdomain 19b294d7fc Fix memory allocation for IA64 guest on Xen-unstable.hg with new Qemu.
After balloon drive ready, we can remove this line safely.

Signed-off-by:Zhang Xiantao <xiantao.zhang@intel.com>
2006-07-25 15:12:47 +01:00
kaf24@firebug.cl.cam.ac.uk 345a97c4db [powerpc] [xend] PPC doesn't support ballooning yet
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-07-14 10:23:04 +01:00
jchesterfield@dhcp92.uk.xensource.com 0da81aa1d4 Added blktap support. Includes kernel driver (enabled as CONFIG_XEN_BLKDEV_TAP=y) and userspace tools. The userspace deamon (blktapctrl) is enabled by default when xend is activated. For further information on using and configuring blktap see tools/blktap/README. 2006-07-13 10:13:26 +01:00
kfraser@localhost.localdomain 2fdede6154 Revert c/s 10651: "prevent double uuid use". Breaks localhost
migration, since old and new domains can coexist at same time
with same uuid.

Possibly this patch could be accepted if xend were to be able to
deal with localhost migration (and save/restore, which can also
occasionally race).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-12 16:34:39 +01:00
kfraser@localhost.localdomain 1a1f70afb8 [XEND] Currently a domain's maxmem value is being set with the memory value
even if the user specifies maxmem in config.  This patch uses maxmem
value to set maxmem instead of memory.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2006-07-10 15:57:56 +01:00
kfraser@localhost.localdomain c98d70f46a [XEND] Prevent uuid double use.
A check_uuid() in this patch checks on uuid of the
VM configuration definition. If specified uuid is
already used with the others VM, the xm create command 
does not create the VM. The xm create command error occurs.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2006-07-10 15:10:00 +01:00
kaf24@firebug.cl.cam.ac.uk 42fae7ae02 [XEN] localtime support for paravirtualized guests
It is quite minimal
in its approach, satisfying the purposes of the paravirtualized
NetWare operating system as well as any others that expect the time
base to be provided in localtime.

Signed-off-by: Bruce Rogers <brogers@novell.com>
2006-06-21 17:09:14 +01:00
kaf24@firebug.cl.cam.ac.uk 29a0da72ab [XEND] Remember cpu-pinning information across guest restarts.
Signed-off-by: Qing He <qing.he@intel.com>
2006-05-25 14:45:40 +01:00
emellor@leeni.uk.xensource.com e73effa056 Allow a guest to determine its VM UUID.
Use xenstore-read $(xenstore-read vm)/uuid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-05-23 16:23:10 +01:00
kaf24@firebug.cl.cam.ac.uk 9892f9d1aa [IA64] Work around auto-ballooning changes.
Original patch from Kevin Tian at Intel.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-22 17:30:25 +01:00
kaf24@firebug.cl.cam.ac.uk 0a44ca5991 [XEND] separate concept of initial memory size and overhead memory size.
When a domain (whether para- or fully-virtualized) reports how much
overhead memory it requires (via getDomainMemory in image.py), all such
memory was immediately allocated to the domain itself.  This is
certainly incorrect for HVM domains, since additional
increase_reservation calls are made later in qemu.  Since all ballooned
memory is already taken, qemu will fail.  The fix is to treat the
requested memory size and the overhead size as separate values.  The
requested memory size is immediately allocated to the new domain; the
overhead is left unallocated for whatever else might need it later.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-05-19 16:07:36 +01:00
kaf24@firebug.cl.cam.ac.uk b75af341bd This patch adds a boolean parameter 'network' to the save method of the
XendCheckpoint class to differentiate between network suspend/resume
(network=True) and local suspend/resume (network=False).
Instead of passing the 'live' parameter to the migration methods, this
'network' parameter is passed now. This ends up being merely a renaming
of the parameter.
A check with the xm-test suite against this change has resulted in no
additional errors.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-05-10 16:52:55 +01:00
kaf24@firebug.cl.cam.ac.uk c61c155041 Instead of just having the bootloader config sxp replace anything else,
merge with given values.  This will allow a bootloader to not have to
specify everything which is useful for bootloaders other than pygrub.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-05-05 14:09:07 +01:00
kaf24@firebug.cl.cam.ac.uk daac965083 Instead of knowing explicitly about the pygrub entry option, allow
passing arbitrary options to the bootloader and deprecate the bootentry
option.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-05-03 11:02:30 +01:00
kaf24@firebug.cl.cam.ac.uk c57010da2d Instead of relying on xm create to always run the bootloader, make sure
we run it if we get into domain creation with a bootloader set but no
image.  This could happen if someone creates a domain config via the
XML-RPC or sxp interfaces.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-04-28 14:11:57 +01:00
kaf24@firebug.cl.cam.ac.uk 7c059c05f5 The features for a domain are more a property of the domain than the
image.  Move them into the domain info so that the image is just the
pieces needed for booting (eg, kernel + initrd + args)

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-04-28 14:10:59 +01:00