This commit is contained in:
parent
5a31fb9842
commit
6349b62b6e
22
00-domain-restore.patch
Normal file
22
00-domain-restore.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -r c21b18b97a61 tools/libxc/xc_domain_restore.c
|
||||
--- a/tools/libxc/xc_domain_restore.c Tue Jun 05 17:05:13 2007 +0100
|
||||
+++ b/tools/libxc/xc_domain_restore.c Tue Jun 05 17:40:40 2007 +0100
|
||||
@@ -903,13 +903,14 @@ int xc_domain_restore(int xc_handle, int
|
||||
|
||||
/* Get the list of PFNs that are not in the psuedo-phys map */
|
||||
{
|
||||
- unsigned int count;
|
||||
+ unsigned int count = 0;
|
||||
unsigned long *pfntab;
|
||||
int nr_frees, rc;
|
||||
|
||||
- if ( !read_exact(io_fd, &count, sizeof(count)) )
|
||||
- {
|
||||
- ERROR("Error when reading pfn count");
|
||||
+ if ( !read_exact(io_fd, &count, sizeof(count)) ||
|
||||
+ (count > (1U << 28)) ) /* up to 1TB of address space */
|
||||
+ {
|
||||
+ ERROR("Error when reading pfn count (= %u)", count);
|
||||
goto out;
|
||||
}
|
||||
|
68
15157_modified.patch
Normal file
68
15157_modified.patch
Normal file
@ -0,0 +1,68 @@
|
||||
diff -ru a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- a/tools/python/xen/xend/XendDomainInfo.py 2007-06-08 11:19:37.000000000 -0600
|
||||
+++ b/tools/python/xen/xend/XendDomainInfo.py 2007-06-08 11:23:59.000000000 -0600
|
||||
@@ -545,20 +545,17 @@
|
||||
|
||||
def destroyDevice(self, deviceClass, devid, force = False):
|
||||
try:
|
||||
- devid = int(devid)
|
||||
+ dev = int(devid)
|
||||
except ValueError:
|
||||
- # devid is not a number, let's search for it in xenstore.
|
||||
- devicePath = '%s/device/%s' % (self.dompath, deviceClass)
|
||||
- for entry in xstransact.List(devicePath):
|
||||
- backend = xstransact.Read('%s/%s' % (devicePath, entry),
|
||||
- "backend")
|
||||
- devName = xstransact.Read(backend, "dev")
|
||||
- if devName == devid:
|
||||
- # We found the integer matching our devid, use it instead
|
||||
- devid = entry
|
||||
- break
|
||||
-
|
||||
- return self.getDeviceController(deviceClass).destroyDevice(devid, force)
|
||||
+ # devid is not a number but a string containing either device
|
||||
+ # name (e.g. xvda) or device_type/device_id (e.g. vbd/51728)
|
||||
+ dev = type(devid) is str and devid.split('/')[-1] or None
|
||||
+ if dev == None:
|
||||
+ log.debug("Could not find the device %s", devid)
|
||||
+ return None
|
||||
+
|
||||
+ log.debug("dev = %s", dev)
|
||||
+ return self.getDeviceController(deviceClass).destroyDevice(dev, force)
|
||||
|
||||
def getDeviceSxprs(self, deviceClass):
|
||||
if self._stateGet() in (DOM_STATE_RUNNING, DOM_STATE_PAUSED):
|
||||
@@ -1354,20 +1351,19 @@
|
||||
self.image.destroy(suspend)
|
||||
return
|
||||
|
||||
- while True:
|
||||
- t = xstransact("%s/device" % self.dompath)
|
||||
- for devclass in XendDevices.valid_devices():
|
||||
- for dev in t.list(devclass):
|
||||
- try:
|
||||
- t.remove(dev)
|
||||
- except:
|
||||
- # Log and swallow any exceptions in removal --
|
||||
- # there's nothing more we can do.
|
||||
- log.exception(
|
||||
- "Device release failed: %s; %s; %s",
|
||||
- self.info['name_label'], devclass, dev)
|
||||
- if t.commit():
|
||||
- break
|
||||
+ t = xstransact("%s/device" % self.dompath)
|
||||
+ for devclass in XendDevices.valid_devices():
|
||||
+ for dev in t.list(devclass):
|
||||
+ try:
|
||||
+ log.debug("Removing %s", dev);
|
||||
+ self.destroyDevice(devclass, dev, False);
|
||||
+ except:
|
||||
+ # Log and swallow any exceptions in removal --
|
||||
+ # there's nothing more we can do.
|
||||
+ log.exception("Device release failed: %s; %s; %s",
|
||||
+ self.info['name_label'], devclass, dev)
|
||||
+
|
||||
+
|
||||
|
||||
def getDeviceController(self, name):
|
||||
"""Get the device controller for this domain, and if it
|
@ -32,6 +32,10 @@ optional packages are also installed:
|
||||
virt-manager (Optional, to manage VMs graphically)
|
||||
tightvnc (Optional, to view VMs outside virt-manager)
|
||||
|
||||
Additional packages:
|
||||
nbd-client (Optional, to access virtual disks stored on NBD servers)
|
||||
open-iscsi (Optional, to access virtual disks stored on iSCSI targets)
|
||||
|
||||
You then need to reboot your machine. Instead of booting a normal Linux
|
||||
kernel, you will boot the Xen hypervisor and a slightly changed Linux kernel.
|
||||
This Linux kernel runs in the first virtual machine and will drive most of
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cc63852b3a7401ff69ba3348247ae18373b5d67ad36610c4796d0b9b4e8fc207
|
||||
size 5797383
|
||||
oid sha256:1d7c196292084bc708381e51e3dd9a750b7c4050a336ff07d5fe67a50806bf8f
|
||||
size 5796338
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb5f079f1f13a77acbf4f8a1e64d26bf4892ed5191f6db9c373bb2c374c67186
|
||||
size 173451
|
||||
oid sha256:e5f43dfaf099df2502edd0175866f74c86cda6de3aafbaaae695f957cf4d9227
|
||||
size 188098
|
||||
|
@ -142,3 +142,53 @@ Index: xen-3.1-testing/tools/blktap/drivers/block-qcow.c
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
Index: xen-3.1-testing/tools/xenstore/utils.c
|
||||
===================================================================
|
||||
--- xen-3.1-testing.orig/tools/xenstore/utils.c
|
||||
+++ xen-3.1-testing/tools/xenstore/utils.c
|
||||
@@ -27,33 +27,38 @@ void xprintf(const char *fmt, ...)
|
||||
void barf(const char *fmt, ...)
|
||||
{
|
||||
char *str;
|
||||
+ int bytes;
|
||||
va_list arglist;
|
||||
|
||||
xprintf("FATAL: ");
|
||||
|
||||
va_start(arglist, fmt);
|
||||
- vasprintf(&str, fmt, arglist);
|
||||
+ bytes = vasprintf(&str, fmt, arglist);
|
||||
va_end(arglist);
|
||||
|
||||
- xprintf("%s\n", str);
|
||||
- free(str);
|
||||
+ if (bytes >= 0) {
|
||||
+ xprintf("%s\n", str);
|
||||
+ free(str);
|
||||
+ }
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void barf_perror(const char *fmt, ...)
|
||||
{
|
||||
char *str;
|
||||
- int err = errno;
|
||||
+ int bytes, err = errno;
|
||||
va_list arglist;
|
||||
|
||||
xprintf("FATAL: ");
|
||||
|
||||
va_start(arglist, fmt);
|
||||
- vasprintf(&str, fmt, arglist);
|
||||
+ bytes = vasprintf(&str, fmt, arglist);
|
||||
va_end(arglist);
|
||||
|
||||
- xprintf("%s: %s\n", str, strerror(err));
|
||||
- free(str);
|
||||
+ if (bytes >= 0) {
|
||||
+ xprintf("%s: %s\n", str, strerror(err));
|
||||
+ free(str);
|
||||
+ }
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
25
xen.changes
25
xen.changes
@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 8 12:11:42 MDT 2007 - ccoffing@novell.com
|
||||
|
||||
- Update to official rc10 (changeset 15042).
|
||||
- Updated vm-install:
|
||||
+ easier to exit with Ctrl-C
|
||||
+ drop "TERM=xterm" for Linux (breaks PVFB text install)
|
||||
+ use "TERM=vt100" when calling "xm" to suppress terminal codes
|
||||
+ command-line support for VNC password
|
||||
+ fixed disk groups (e.g., 2 disks on command line w/o PDEV)
|
||||
+ fixed regression: Don't let user close progress window
|
||||
+ failure to open a device should not completely fail search for
|
||||
bootsector (consider: no media in /dev/cdrom)
|
||||
+ always remove PV kernel and initrd from /tmp
|
||||
+ #279153: Support disks on iscsi/qcow/vmdk/nbd/file/phy/...
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 8 11:33:41 MDT 2007 - jfehlig@novell.com
|
||||
|
||||
- Added a modified version of upstream c/s 15157. Original version
|
||||
of c/s 15157 fixed bug #262805 but also broke
|
||||
'xm block-detach dom dev_name'. Modified version fixes bug 262805
|
||||
without introducing regression. Patch fixing c/s 15157 has been
|
||||
submitted upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 23 16:36:54 MDT 2007 - ccoffing@novell.com
|
||||
|
||||
|
31
xen.spec
31
xen.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package xen (Version 3.1.0_15040)
|
||||
# spec file for package xen (Version 3.1.0_15042)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@ -13,7 +13,7 @@
|
||||
Name: xen
|
||||
%define xvers 3.1
|
||||
%define xvermaj 3
|
||||
%define changeset 15040
|
||||
%define changeset 15042
|
||||
%define xen_build_dir xen-3.1-testing
|
||||
%define with_install 1
|
||||
%if %sles_version
|
||||
@ -34,8 +34,8 @@ BuildRequires: glibc-32bit glibc-devel-32bit
|
||||
%if %{?with_kmp}0
|
||||
BuildRequires: kernel-source kernel-syms xorg-x11
|
||||
%endif
|
||||
Version: 3.1.0_15040
|
||||
Release: 9
|
||||
Version: 3.1.0_15042
|
||||
Release: 1
|
||||
License: GNU General Public License (GPL)
|
||||
Group: System/Kernel
|
||||
Autoreqprov: on
|
||||
@ -60,6 +60,8 @@ Source15: sysconfig.xend
|
||||
Source16: network-multi
|
||||
# Upstream patches
|
||||
Patch0: 15048-localtime.diff
|
||||
Patch1: 15157_modified.patch
|
||||
Patch2: 00-domain-restore.patch
|
||||
# Our patches
|
||||
Patch100: xen-config.diff
|
||||
Patch101: xend-config.diff
|
||||
@ -516,6 +518,8 @@ Authors:
|
||||
%setup -q -c -n %xen_build_dir/tools -D -T -a 1
|
||||
cd ..
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
@ -920,6 +924,25 @@ rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Fri Jun 08 2007 - ccoffing@novell.com
|
||||
- Update to official rc10 (changeset 15042).
|
||||
- Updated vm-install:
|
||||
+ easier to exit with Ctrl-C
|
||||
+ drop "TERM=xterm" for Linux (breaks PVFB text install)
|
||||
+ use "TERM=vt100" when calling "xm" to suppress terminal codes
|
||||
+ command-line support for VNC password
|
||||
+ fixed disk groups (e.g., 2 disks on command line w/o PDEV)
|
||||
+ fixed regression: Don't let user close progress window
|
||||
+ failure to open a device should not completely fail search for
|
||||
bootsector (consider: no media in /dev/cdrom)
|
||||
+ always remove PV kernel and initrd from /tmp
|
||||
+ #279153: Support disks on iscsi/qcow/vmdk/nbd/file/phy/...
|
||||
* Fri Jun 08 2007 - jfehlig@novell.com
|
||||
- Added a modified version of upstream c/s 15157. Original version
|
||||
of c/s 15157 fixed bug #262805 but also broke
|
||||
'xm block-detach dom dev_name'. Modified version fixes bug 262805
|
||||
without introducing regression. Patch fixing c/s 15157 has been
|
||||
submitted upstream.
|
||||
* Wed May 23 2007 - ccoffing@novell.com
|
||||
- Drop xen-messages.diff; Xen now supports HVM save/restore.
|
||||
* Tue May 22 2007 - ccoffing@novell.com
|
||||
|
Loading…
x
Reference in New Issue
Block a user