Accepting request 49431 from Virtualization
Copy from Virtualization/libvirt based on submit request 49431 from user jfehlig OBS-URL: https://build.opensuse.org/request/show/49431 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=59
This commit is contained in:
commit
3f61051ff0
@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- src/lxc/lxc_container.c.orig
|
--- src/lxc/lxc_container.c.orig
|
||||||
+++ src/lxc/lxc_container.c
|
+++ src/lxc/lxc_container.c
|
||||||
@@ -828,6 +828,9 @@ int lxcContainerStart(virDomainDefPtr de
|
@@ -831,6 +831,9 @@ int lxcContainerStart(virDomainDefPtr de
|
||||||
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
|
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
|
||||||
|
|
||||||
/* allocate a stack for the container */
|
/* allocate a stack for the container */
|
||||||
@ -12,7 +12,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
return -1;
|
return -1;
|
||||||
@@ -846,7 +849,11 @@ int lxcContainerStart(virDomainDefPtr de
|
@@ -849,7 +852,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||||
flags |= CLONE_NEWNET;
|
flags |= CLONE_NEWNET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
VIR_FREE(stack);
|
VIR_FREE(stack);
|
||||||
DEBUG("clone() completed, new container PID is %d", pid);
|
DEBUG("clone() completed, new container PID is %d", pid);
|
||||||
|
|
||||||
@@ -872,6 +879,7 @@ int lxcContainerAvailable(int features)
|
@@ -875,6 +882,7 @@ int lxcContainerAvailable(int features)
|
||||||
char *childStack;
|
char *childStack;
|
||||||
char *stack;
|
char *stack;
|
||||||
int childStatus;
|
int childStatus;
|
||||||
@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
|
|
||||||
if (features & LXC_CONTAINER_FEATURE_USER)
|
if (features & LXC_CONTAINER_FEATURE_USER)
|
||||||
flags |= CLONE_NEWUSER;
|
flags |= CLONE_NEWUSER;
|
||||||
@@ -879,14 +887,21 @@ int lxcContainerAvailable(int features)
|
@@ -882,14 +890,21 @@ int lxcContainerAvailable(int features)
|
||||||
if (features & LXC_CONTAINER_FEATURE_NET)
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
||||||
flags |= CLONE_NEWNET;
|
flags |= CLONE_NEWNET;
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:759f4957e6f2b905857897a84e36cbe73f7dc3a5150637430ff086c3e2b414b4
|
|
||||||
size 8250164
|
|
3
libvirt-0.8.4.tar.bz2
Normal file
3
libvirt-0.8.4.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1f07f5ba0f9be4026866ee049a555777c525d3d4c754a69ebf92185878a8c128
|
||||||
|
size 8432891
|
@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 28 14:20:32 MDT 2010 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Fix build when virtualport support is available but macvtap is
|
||||||
|
disabled.
|
||||||
|
vport-configure.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 23 02:42:39 MDT 2010 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Fix CDROM media change for Xen PV domains
|
||||||
|
modified xen-pv-cdrom.patch
|
||||||
|
bnc#636231
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 10 15:45:04 MDT 2010 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Update to libvirt 0.8.4
|
||||||
|
- various improvements to UML driver
|
||||||
|
- documentation improvements
|
||||||
|
- lot of bug fixes and other improvements
|
||||||
|
- enable ESX driver for openSUSE
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 6 21:53:21 MDT 2010 - jfehlig@novell.com
|
Fri Aug 6 21:53:21 MDT 2010 - jfehlig@novell.com
|
||||||
|
|
||||||
|
20
libvirt.spec
20
libvirt.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libvirt (Version 0.8.3)
|
# spec file for package libvirt (Version 0.8.4)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -27,7 +27,7 @@
|
|||||||
%define with_one 0
|
%define with_one 0
|
||||||
# hypervisor drivers that use a native remote protocol
|
# hypervisor drivers that use a native remote protocol
|
||||||
%define with_phyp 0
|
%define with_phyp 0
|
||||||
%define with_esx 0
|
%define with_esx 1
|
||||||
# host drivers
|
# host drivers
|
||||||
%define with_network 1
|
%define with_network 1
|
||||||
%define with_storage_fs 1
|
%define with_storage_fs 1
|
||||||
@ -45,6 +45,7 @@
|
|||||||
%define with_hal 0
|
%define with_hal 0
|
||||||
%define with_yajl 0
|
%define with_yajl 0
|
||||||
%define with_macvtap 0
|
%define with_macvtap 0
|
||||||
|
%define with_virtualport 0
|
||||||
|
|
||||||
# Xen is available only on i386 x86_64
|
# Xen is available only on i386 x86_64
|
||||||
%ifnarch %ix86 x86_64
|
%ifnarch %ix86 x86_64
|
||||||
@ -114,13 +115,16 @@ BuildRequires: libssh2-devel
|
|||||||
%if %{with_macvtap}
|
%if %{with_macvtap}
|
||||||
BuildRequires: libnl-devel
|
BuildRequires: libnl-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_esx}
|
||||||
|
BuildRequires: libcurl-devel
|
||||||
|
%endif
|
||||||
# Only for directory ownership:
|
# Only for directory ownership:
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
Url: http://libvirt.org/
|
Url: http://libvirt.org/
|
||||||
License: LGPLv2.1+
|
License: LGPLv2.1+
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
AutoReqProv: yes
|
AutoReqProv: yes
|
||||||
Version: 0.8.3
|
Version: 0.8.4
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
Summary: A C toolkit to interract with the virtualization capabilities of Linux
|
||||||
# The client side, i.e. shared libs and virsh are in a subpackage
|
# The client side, i.e. shared libs and virsh are in a subpackage
|
||||||
@ -145,13 +149,13 @@ Requires: PolicyKit >= 0.6
|
|||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: libvirtd.init
|
Source1: libvirtd.init
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
|
Patch0: vport-configure.patch
|
||||||
# Need to go upstream
|
# Need to go upstream
|
||||||
Patch100: xen-name-for-devid.patch
|
Patch100: xen-name-for-devid.patch
|
||||||
Patch102: clone.patch
|
Patch102: clone.patch
|
||||||
Patch103: xen-pv-cdrom.patch
|
Patch103: xen-pv-cdrom.patch
|
||||||
Patch104: xen-domctl-ver7.patch
|
Patch104: xen-domctl-ver7.patch
|
||||||
Patch105: xen-tap2-support.patch
|
Patch105: xend-disk-order.patch
|
||||||
Patch106: xend-disk-order.patch
|
|
||||||
# Our patches
|
# Our patches
|
||||||
Patch200: libvirtd-defaults.patch
|
Patch200: libvirtd-defaults.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -257,12 +261,12 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch102
|
%patch102
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
%patch104 -p1
|
%patch104 -p1
|
||||||
%patch105 -p1
|
%patch105 -p1
|
||||||
%patch106 -p1
|
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -320,6 +324,9 @@ Authors:
|
|||||||
%if ! %{with_macvtap}
|
%if ! %{with_macvtap}
|
||||||
%define _without_macvtap --without-macvtap
|
%define _without_macvtap --without-macvtap
|
||||||
%endif
|
%endif
|
||||||
|
%if ! %{with_virtualport}
|
||||||
|
%define _without_virtualport --without-virtualport
|
||||||
|
%endif
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
%configure --disable-static --with-pic \
|
%configure --disable-static --with-pic \
|
||||||
@ -342,6 +349,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
|||||||
%{?_without_udev} \
|
%{?_without_udev} \
|
||||||
%{?_without_yajl} \
|
%{?_without_yajl} \
|
||||||
%{?_without_macvtap} \
|
%{?_without_macvtap} \
|
||||||
|
%{?_without_virtualport} \
|
||||||
--without-xen-proxy \
|
--without-xen-proxy \
|
||||||
--libexecdir=%{_libdir}/%{name} \
|
--libexecdir=%{_libdir}/%{name} \
|
||||||
--with-init-script=none \
|
--with-init-script=none \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-0.8.0/daemon/libvirtd.conf
|
Index: libvirt-0.8.4/daemon/libvirtd.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.0.orig/daemon/libvirtd.conf
|
--- libvirt-0.8.4.orig/daemon/libvirtd.conf
|
||||||
+++ libvirt-0.8.0/daemon/libvirtd.conf
|
+++ libvirt-0.8.4/daemon/libvirtd.conf
|
||||||
@@ -18,8 +18,8 @@
|
@@ -18,8 +18,8 @@
|
||||||
# It is necessary to setup a CA and issue server certificates before
|
# It is necessary to setup a CA and issue server certificates before
|
||||||
# using this capability.
|
# using this capability.
|
||||||
@ -28,11 +28,11 @@ Index: libvirt-0.8.0/daemon/libvirtd.conf
|
|||||||
|
|
||||||
# Override the default mDNS advertizement name. This must be
|
# Override the default mDNS advertizement name. This must be
|
||||||
# unique on the immediate broadcast network.
|
# unique on the immediate broadcast network.
|
||||||
Index: libvirt-0.8.0/daemon/libvirtd.c
|
Index: libvirt-0.8.4/daemon/libvirtd.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.0.orig/daemon/libvirtd.c
|
--- libvirt-0.8.4.orig/daemon/libvirtd.c
|
||||||
+++ libvirt-0.8.0/daemon/libvirtd.c
|
+++ libvirt-0.8.4/daemon/libvirtd.c
|
||||||
@@ -141,7 +141,7 @@ static int sigwrite = -1; /* Signa
|
@@ -142,7 +142,7 @@ static int sigwrite = -1; /* Signa
|
||||||
static int ipsock = 0; /* -l Listen for TCP/IP */
|
static int ipsock = 0; /* -l Listen for TCP/IP */
|
||||||
|
|
||||||
/* Defaults for configuration file elements */
|
/* Defaults for configuration file elements */
|
||||||
@ -41,7 +41,7 @@ Index: libvirt-0.8.0/daemon/libvirtd.c
|
|||||||
static int listen_tcp = 0;
|
static int listen_tcp = 0;
|
||||||
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
|
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
|
||||||
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
|
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
|
||||||
@@ -163,7 +163,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
@@ -164,7 +164,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
||||||
#endif
|
#endif
|
||||||
static int auth_tls = REMOTE_AUTH_NONE;
|
static int auth_tls = REMOTE_AUTH_NONE;
|
||||||
|
|
||||||
|
82
vport-configure.patch
Normal file
82
vport-configure.patch
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
Rework configure logic for virtualport support
|
||||||
|
|
||||||
|
V2:
|
||||||
|
- added missing AC_ARG_WITH() for --with-virtualport
|
||||||
|
|
||||||
|
In this patch I am reworking the logic around detecting virtual port support and requiring the libnl dependency.
|
||||||
|
|
||||||
|
- It requires --with-macvtap and displays an error in case of --without-macvtap --with-virtualport.
|
||||||
|
- It tests for availability of certain data in include files and displays an error in case the include file is not at the correct level and --with-virtualport was chosen
|
||||||
|
- displays 'checking' messages for macvtap and virtualport support and results
|
||||||
|
- libnl support is required when macvtap is found or requested; if libnl is not there, please supply without-macvtap
|
||||||
|
|
||||||
|
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
|
||||||
|
|
||||||
|
Index: libvirt-0.8.4/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- libvirt-0.8.4.orig/configure.ac
|
||||||
|
+++ libvirt-0.8.4/configure.ac
|
||||||
|
@@ -2060,6 +2060,7 @@ AC_ARG_WITH([macvtap],
|
||||||
|
[with_macvtap=${withval}],
|
||||||
|
[with_macvtap=check])
|
||||||
|
|
||||||
|
+AC_MSG_CHECKING([whether to compile with macvtap support])
|
||||||
|
if test "$with_macvtap" != "no" ; then
|
||||||
|
AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||||
|
#include <linux/rtnetlink.h> ],
|
||||||
|
@@ -2077,19 +2078,35 @@ if test "$with_macvtap" != "no" ; then
|
||||||
|
AC_DEFINE_UNQUOTED([WITH_MACVTAP], $val, [whether macvtap support is enabled])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])
|
||||||
|
+AC_MSG_RESULT([$with_macvtap])
|
||||||
|
|
||||||
|
-AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||||
|
- #include <linux/rtnetlink.h> ],
|
||||||
|
- [ int x = IFLA_PORT_MAX; ],
|
||||||
|
- [ with_virtualport=yes ],
|
||||||
|
- [ with_virtualport=no ])
|
||||||
|
-if test "$with_virtualport" = "yes"; then
|
||||||
|
- val=1
|
||||||
|
-else
|
||||||
|
- val=0
|
||||||
|
+AC_ARG_WITH([virtualport],
|
||||||
|
+ AC_HELP_STRING([--with-virtualport],[enable virtual port support @<:@default=check@:>@]),
|
||||||
|
+ [with_virtualport=${withval}],
|
||||||
|
+ [with_virtualport=check])
|
||||||
|
+
|
||||||
|
+if test "$with_virtualport" != "no"; then
|
||||||
|
+ if test "$with_macvtap" = "no"; then
|
||||||
|
+ AC_MSG_ERROR([--with-virtualport requires --with-macvtap])
|
||||||
|
+ fi
|
||||||
|
+ AC_MSG_CHECKING([whether to compile with virtual port support])
|
||||||
|
+ AC_TRY_COMPILE([ #include <sys/socket.h>
|
||||||
|
+ #include <linux/rtnetlink.h> ],
|
||||||
|
+ [ int x = IFLA_PORT_MAX; ],
|
||||||
|
+ [ with_virtualport=yes ],
|
||||||
|
+ [ if test "$with_virtualport" = "yes" ; then
|
||||||
|
+ AC_MSG_ERROR([Installed linux headers don't show support for virtual port support.])
|
||||||
|
+ fi
|
||||||
|
+ with_virtualport=no ])
|
||||||
|
+ if test "$with_virtualport" = "yes"; then
|
||||||
|
+ val=1
|
||||||
|
+ else
|
||||||
|
+ val=0
|
||||||
|
+ fi
|
||||||
|
+ AC_DEFINE_UNQUOTED([WITH_VIRTUALPORT], $val,
|
||||||
|
+ [whether vsi vepa support is enabled])
|
||||||
|
+ AC_MSG_RESULT([$with_virtualport])
|
||||||
|
fi
|
||||||
|
-AC_DEFINE_UNQUOTED([WITH_VIRTUALPORT], $val,
|
||||||
|
- [whether vsi vepa support is enabled])
|
||||||
|
AM_CONDITIONAL([WITH_VIRTUALPORT], [test "$with_virtualport" = "yes"])
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2098,7 +2115,7 @@ dnl netlink library
|
||||||
|
LIBNL_CFLAGS=""
|
||||||
|
LIBNL_LIBS=""
|
||||||
|
|
||||||
|
-if test "$with_macvtap" = "yes" || test "$with_virtualport" = "yes"; then
|
||||||
|
+if test "$with_macvtap" = "yes"; then
|
||||||
|
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
|
||||||
|
], [
|
||||||
|
AC_MSG_ERROR([libnl >= $LIBNL_REQUIRED is required for macvtap support])
|
@ -13,10 +13,10 @@ Date: Wed Jan 27 16:11:41 2010 -0700
|
|||||||
This approach allows removing a disk when domain is inactive. We
|
This approach allows removing a disk when domain is inactive. We
|
||||||
obviously can't search xenstore when the domain is inactive.
|
obviously can't search xenstore when the domain is inactive.
|
||||||
|
|
||||||
Index: libvirt-0.8.1/src/xen/xend_internal.c
|
Index: libvirt-0.8.4/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.1.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.4.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.8.1/src/xen/xend_internal.c
|
+++ libvirt-0.8.4/src/xen/xend_internal.c
|
||||||
@@ -92,6 +92,7 @@ xenDaemonFormatSxprOnePCI(virDomainHostd
|
@@ -92,6 +92,7 @@ xenDaemonFormatSxprOnePCI(virDomainHostd
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -25,7 +25,7 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
char *class,
|
char *class,
|
||||||
char *ref,
|
char *ref,
|
||||||
@@ -4178,7 +4179,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
@@ -3964,7 +3965,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
||||||
|
|
||||||
sexpr = virBufferContentAndReset(&buf);
|
sexpr = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
/* device doesn't exist, define it */
|
/* device doesn't exist, define it */
|
||||||
ret = xend_op(domain->conn, domain->name, "op", "device_create",
|
ret = xend_op(domain->conn, domain->name, "op", "device_create",
|
||||||
"config", sexpr, NULL);
|
"config", sexpr, NULL);
|
||||||
@@ -4295,7 +4296,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
@@ -4081,7 +4082,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
||||||
|
|
||||||
sexpr = virBufferContentAndReset(&buf);
|
sexpr = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("requested device does not exist"));
|
_("requested device does not exist"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -4387,7 +4388,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
@@ -4173,7 +4174,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
||||||
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
||||||
@@ -6135,6 +6136,7 @@ error:
|
@@ -5923,6 +5924,7 @@ error:
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
virDomainXMLDevID(virDomainPtr domain,
|
virDomainXMLDevID(virDomainPtr domain,
|
||||||
@ -60,7 +60,7 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
char *class,
|
char *class,
|
||||||
char *ref,
|
char *ref,
|
||||||
@@ -6143,27 +6145,33 @@ virDomainXMLDevID(virDomainPtr domain,
|
@@ -5931,8 +5933,12 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||||
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
||||||
char *xref;
|
char *xref;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
@ -73,6 +73,7 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
if (dev->data.disk->driverName &&
|
if (dev->data.disk->driverName &&
|
||||||
STREQ(dev->data.disk->driverName, "tap"))
|
STREQ(dev->data.disk->driverName, "tap"))
|
||||||
strcpy(class, "tap");
|
strcpy(class, "tap");
|
||||||
|
@@ -5942,19 +5948,21 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||||
else
|
else
|
||||||
strcpy(class, "vbd");
|
strcpy(class, "vbd");
|
||||||
|
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
Index: libvirt-0.8.1/src/xen/xend_internal.c
|
Index: libvirt-0.8.4/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.1.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.4.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.8.1/src/xen/xend_internal.c
|
+++ libvirt-0.8.4/src/xen/xend_internal.c
|
||||||
@@ -5545,7 +5545,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
|
@@ -1422,7 +1422,6 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
||||||
} else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
|
/* There is a case without the uname to the CD-ROM device */
|
||||||
virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
|
offset = strchr(dst, ':');
|
||||||
} else {
|
if (!offset ||
|
||||||
- virBufferVSprintf(buf, "(dev '%s')", def->dst);
|
- !hvm ||
|
||||||
+ if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM)
|
STRNEQ(offset, ":cdrom")) {
|
||||||
+ virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
|
virXendError(VIR_ERR_INTERNAL_ERROR,
|
||||||
+ else
|
"%s", _("domain information incomplete, vbd has no src"));
|
||||||
+ virBufferVSprintf(buf, "(dev '%s')", def->dst);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (def->src) {
|
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-0.8.1.orig/src/xen/xend_internal.c
|
|
||||||
+++ libvirt-0.8.1/src/xen/xend_internal.c
|
|
||||||
@@ -1610,7 +1610,8 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
|
||||||
but blktap disks ended up in a differently named
|
|
||||||
(device (tap ....)) block.... */
|
|
||||||
if (sexpr_lookup(node, "device/vbd") ||
|
|
||||||
- sexpr_lookup(node, "device/tap")) {
|
|
||||||
+ sexpr_lookup(node, "device/tap") ||
|
|
||||||
+ sexpr_lookup(node, "device/tap2")) {
|
|
||||||
char *offset;
|
|
||||||
const char *src = NULL;
|
|
||||||
const char *dst = NULL;
|
|
||||||
@@ -1621,10 +1622,14 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
|
||||||
src = sexpr_node(node, "device/vbd/uname");
|
|
||||||
dst = sexpr_node(node, "device/vbd/dev");
|
|
||||||
mode = sexpr_node(node, "device/vbd/mode");
|
|
||||||
- } else {
|
|
||||||
+ } else if (sexpr_lookup(node, "device/tap")) {
|
|
||||||
src = sexpr_node(node, "device/tap/uname");
|
|
||||||
dst = sexpr_node(node, "device/tap/dev");
|
|
||||||
mode = sexpr_node(node, "device/tap/mode");
|
|
||||||
+ } else {
|
|
||||||
+ src = sexpr_node(node, "device/tap2/uname");
|
|
||||||
+ dst = sexpr_node(node, "device/tap2/dev");
|
|
||||||
+ mode = sexpr_node(node, "device/tap2/mode");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (VIR_ALLOC(disk) < 0)
|
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-0.8.1/src/xen/xend_internal.c
|
Index: libvirt-0.8.4/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.8.1.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.4.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.8.1/src/xen/xend_internal.c
|
+++ libvirt-0.8.4/src/xen/xend_internal.c
|
||||||
@@ -1616,20 +1616,24 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
@@ -1393,20 +1393,24 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
||||||
const char *src = NULL;
|
const char *src = NULL;
|
||||||
const char *dst = NULL;
|
const char *dst = NULL;
|
||||||
const char *mode = NULL;
|
const char *mode = NULL;
|
||||||
@ -14,20 +14,20 @@ Index: libvirt-0.8.1/src/xen/xend_internal.c
|
|||||||
dst = sexpr_node(node, "device/vbd/dev");
|
dst = sexpr_node(node, "device/vbd/dev");
|
||||||
mode = sexpr_node(node, "device/vbd/mode");
|
mode = sexpr_node(node, "device/vbd/mode");
|
||||||
+ bootable = sexpr_int(node, "device/vbd/bootable");
|
+ bootable = sexpr_int(node, "device/vbd/bootable");
|
||||||
} else if (sexpr_lookup(node, "device/tap")) {
|
} else if (sexpr_lookup(node, "device/tap2")) {
|
||||||
src = sexpr_node(node, "device/tap/uname");
|
|
||||||
dst = sexpr_node(node, "device/tap/dev");
|
|
||||||
mode = sexpr_node(node, "device/tap/mode");
|
|
||||||
+ bootable = sexpr_int(node, "device/tap/bootable");
|
|
||||||
} else {
|
|
||||||
src = sexpr_node(node, "device/tap2/uname");
|
src = sexpr_node(node, "device/tap2/uname");
|
||||||
dst = sexpr_node(node, "device/tap2/dev");
|
dst = sexpr_node(node, "device/tap2/dev");
|
||||||
mode = sexpr_node(node, "device/tap2/mode");
|
mode = sexpr_node(node, "device/tap2/mode");
|
||||||
+ bootable = sexpr_int(node, "device/tap2/bootable");
|
+ bootable = sexpr_int(node, "device/tap2/bootable");
|
||||||
|
} else {
|
||||||
|
src = sexpr_node(node, "device/tap/uname");
|
||||||
|
dst = sexpr_node(node, "device/tap/dev");
|
||||||
|
mode = sexpr_node(node, "device/tap/mode");
|
||||||
|
+ bootable = sexpr_int(node, "device/tap/bootable");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(disk) < 0)
|
if (VIR_ALLOC(disk) < 0)
|
||||||
@@ -1754,7 +1758,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
@@ -1531,7 +1535,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
||||||
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user