Update to libvirt 0.8.0
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=46
This commit is contained in:
parent
0aa1caddc0
commit
d4d5a5f4e3
@ -1,26 +0,0 @@
|
|||||||
commit b7a7b3365145f6e9e434a3265a58666cd2e6d8dd
|
|
||||||
Author: Guido Günther <agx@sigxcpu.org>
|
|
||||||
Date: Wed Mar 17 21:04:11 2010 +0100
|
|
||||||
|
|
||||||
Don't crash without a security driver
|
|
||||||
|
|
||||||
"virsh dominfo <vm>" crashes if there's no primary security driver set
|
|
||||||
since we only intialize the secmodel.model and secmodel.doi if we have
|
|
||||||
one. Attached patch checks for securityPrimaryDriver instead of
|
|
||||||
securityDriver since the later is always set in qemudSecurityInit().
|
|
||||||
|
|
||||||
Closes: http://bugs.debian.org/574359
|
|
||||||
|
|
||||||
Index: libvirt-0.7.7/src/qemu/qemu_driver.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-0.7.7.orig/src/qemu/qemu_driver.c
|
|
||||||
+++ libvirt-0.7.7/src/qemu/qemu_driver.c
|
|
||||||
@@ -4901,7 +4901,7 @@ static int qemudNodeGetSecurityModel(vir
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
qemuDriverLock(driver);
|
|
||||||
- if (!driver->securityDriver) {
|
|
||||||
+ if (!driver->securityPrimaryDriver) {
|
|
||||||
memset(secmodel, 0, sizeof (*secmodel));
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:2f91e7437893aa66fa7f2bace9ec57967ee66ac80be5cb6bbfba0acce78eb708
|
|
||||||
size 6512919
|
|
3
libvirt-0.8.0.tar.bz2
Normal file
3
libvirt-0.8.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:98ff762add810e318d2d586ea419219e71fe29f25f32eab20bae1cd9edbbc703
|
||||||
|
size 7478088
|
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 12 18:15:38 MDT 2010 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Update to libvirt 0.8.0
|
||||||
|
- Snapshot API framework
|
||||||
|
- Add managed save API entry points
|
||||||
|
- Timer subselection for domain clock
|
||||||
|
- Add hook utilities
|
||||||
|
- Network filtering API
|
||||||
|
- Introduce a new virDomainUpdateDeviceFlags public API
|
||||||
|
- Introduce a new public API for domain events
|
||||||
|
- Public virDomainMigrateSetMaxDowntime API
|
||||||
|
- Add public API for volume wiping
|
||||||
|
- xenapi: Initial commit of the new driver
|
||||||
|
- lots of improvements and bug fixes
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 26 17:20:11 MDT 2010 - jfehlig@novell.com
|
Fri Mar 26 17:20:11 MDT 2010 - jfehlig@novell.com
|
||||||
|
|
||||||
|
54
libvirt.spec
54
libvirt.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libvirt (Version 0.7.7)
|
# spec file for package libvirt (Version 0.8.0)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -113,7 +113,7 @@ 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.7.7
|
Version: 0.8.0
|
||||||
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
|
||||||
@ -138,20 +138,16 @@ 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: xen-name-for-devid.patch
|
|
||||||
Patch1: lxc-cgroup.patch
|
|
||||||
Patch2: fix-no-secdriver.patch
|
|
||||||
# Need to go upstream
|
# Need to go upstream
|
||||||
Patch100: socat.patch
|
Patch100: xen-name-for-devid.patch
|
||||||
Patch101: clone.patch
|
Patch101: socat.patch
|
||||||
Patch102: xen-pv-cdrom.patch
|
Patch102: clone.patch
|
||||||
Patch103: xen-domctl-ver7.patch
|
Patch103: xen-pv-cdrom.patch
|
||||||
Patch104: xen-tap2-support.patch
|
Patch104: xen-domctl-ver7.patch
|
||||||
Patch105: xend-disk-order.patch
|
Patch105: xen-tap2-support.patch
|
||||||
|
Patch106: xend-disk-order.patch
|
||||||
# Our patches
|
# Our patches
|
||||||
Patch200: libvirtd-defaults.patch
|
Patch200: libvirtd-defaults.patch
|
||||||
Patch201: suse-network.patch
|
|
||||||
Patch202: snapshots.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -255,18 +251,14 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101
|
%patch101 -p1
|
||||||
%patch102 -p1
|
%patch102
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
%patch104 -p1
|
%patch104 -p1
|
||||||
%patch105 -p1
|
%patch105 -p1
|
||||||
|
%patch106 -p1
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201 -p1
|
|
||||||
%patch202 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! %{with_xen}
|
%if ! %{with_xen}
|
||||||
@ -366,10 +358,15 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a
|
|||||||
%if ! %{with_lxc}
|
%if ! %{with_lxc}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
|
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
|
||||||
%endif
|
%endif
|
||||||
%if ! %{with_qemu}
|
%if ! %{with_qemu}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
|
||||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
|
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||||
|
%endif
|
||||||
|
%if ! %{with_uml}
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||||
%endif
|
%endif
|
||||||
ln_dupes()
|
ln_dupes()
|
||||||
{
|
{
|
||||||
@ -422,10 +419,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
|
||||||
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
|
||||||
|
%{_sysconfdir}/libvirt/nwfilter/*.xml
|
||||||
%config /etc/init.d/libvirtd
|
%config /etc/init.d/libvirtd
|
||||||
%{_sbindir}/rclibvirtd
|
%{_sbindir}/rclibvirtd
|
||||||
%config %{_sysconfdir}/libvirt/libvirtd.conf
|
%config %{_sysconfdir}/libvirt/libvirtd.conf
|
||||||
%config %{_sysconfdir}/logrotate.d/libvirtd
|
|
||||||
%config %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
%config %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
|
||||||
%dir %{_localstatedir}/run/libvirt/
|
%dir %{_localstatedir}/run/libvirt/
|
||||||
@ -441,24 +439,27 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
%{_datadir}/augeas
|
%{_datadir}/augeas
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
%config %{_sysconfdir}/libvirt/qemu.conf
|
%config (noreplace)%{_sysconfdir}/libvirt/qemu.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/qemu/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/qemu/
|
||||||
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||||
%endif
|
%endif
|
||||||
%if %{with_lxc}
|
%if %{with_lxc}
|
||||||
%config %{_sysconfdir}/libvirt/lxc.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/lxc/
|
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/lxc/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
|
||||||
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
||||||
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc
|
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc
|
||||||
%endif
|
%endif
|
||||||
%if %{with_uml}
|
%if %{with_uml}
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/uml/
|
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/uml/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
|
||||||
%endif
|
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
||||||
|
%endif
|
||||||
%if 0%{with_storage_disk}
|
%if 0%{with_storage_disk}
|
||||||
%{_libdir}/%{name}/libvirt_parthelper
|
%{_libdir}/%{name}/libvirt_parthelper
|
||||||
%endif
|
%endif
|
||||||
@ -489,6 +490,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/libvirt/schemas/secret.rng
|
%{_datadir}/libvirt/schemas/secret.rng
|
||||||
%{_datadir}/libvirt/schemas/storageencryption.rng
|
%{_datadir}/libvirt/schemas/storageencryption.rng
|
||||||
%{_datadir}/libvirt/cpu_map.xml
|
%{_datadir}/libvirt/cpu_map.xml
|
||||||
|
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||||
%config %{_sysconfdir}/sasl2/libvirt.conf
|
%config %{_sysconfdir}/sasl2/libvirt.conf
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-0.7.5/daemon/libvirtd.conf
|
Index: libvirt-0.8.0/daemon/libvirtd.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.5.orig/daemon/libvirtd.conf
|
--- libvirt-0.8.0.orig/daemon/libvirtd.conf
|
||||||
+++ libvirt-0.7.5/daemon/libvirtd.conf
|
+++ libvirt-0.8.0/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.7.5/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.7.5/daemon/libvirtd.c
|
Index: libvirt-0.8.0/daemon/libvirtd.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.5.orig/daemon/libvirtd.c
|
--- libvirt-0.8.0.orig/daemon/libvirtd.c
|
||||||
+++ libvirt-0.7.5/daemon/libvirtd.c
|
+++ libvirt-0.8.0/daemon/libvirtd.c
|
||||||
@@ -137,7 +137,7 @@ static int sigwrite = -1; /* Signa
|
@@ -141,7 +141,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.7.5/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;
|
||||||
@@ -159,7 +159,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
@@ -163,7 +163,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
|
||||||
#endif
|
#endif
|
||||||
static int auth_tls = REMOTE_AUTH_NONE;
|
static int auth_tls = REMOTE_AUTH_NONE;
|
||||||
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
commit f034c0bfd7089ba3400b7a44b97540c4a8785e35
|
|
||||||
Author: Jim Fehlig <jfehlig@novell.com>
|
|
||||||
Date: Sun Mar 21 19:59:13 2010 -0600
|
|
||||||
|
|
||||||
Avoid libvirtd crash when cgroups is not configured on host
|
|
||||||
|
|
||||||
Invoking virDomainSetMemory() on lxc driver results in libvirtd
|
|
||||||
segfault when cgroups has not been configured on the host.
|
|
||||||
|
|
||||||
Ensure driver->cgroup is non-null before invoking
|
|
||||||
virCgroupForDomain(). To prevent similar segfaults in the future,
|
|
||||||
ensure driver parameter to virCgroupForDomain() is non-null before
|
|
||||||
dereferencing.
|
|
||||||
|
|
||||||
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
|
|
||||||
index aeec593..ba13065 100644
|
|
||||||
--- a/src/lxc/lxc_driver.c
|
|
||||||
+++ b/src/lxc/lxc_driver.c
|
|
||||||
@@ -625,6 +625,12 @@ static int lxcDomainSetMemory(virDomainPtr dom, unsigned long newmem) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (virDomainObjIsActive(vm)) {
|
|
||||||
+ if (driver->cgroup == NULL) {
|
|
||||||
+ lxcError(VIR_ERR_NO_SUPPORT,
|
|
||||||
+ "%s", _("cgroups must be configured on the host"));
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (virCgroupForDomain(driver->cgroup, vm->def->name, &cgroup, 0) != 0) {
|
|
||||||
lxcError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("Unable to get cgroup for %s\n"), vm->def->name);
|
|
||||||
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
|
|
||||||
index 8777781..496d9d3 100644
|
|
||||||
--- a/src/util/cgroup.c
|
|
||||||
+++ b/src/util/cgroup.c
|
|
||||||
@@ -692,6 +692,9 @@ int virCgroupForDomain(virCgroupPtr driver,
|
|
||||||
int rc;
|
|
||||||
char *path;
|
|
||||||
|
|
||||||
+ if (driver == NULL)
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
if (virAsprintf(&path, "%s/%s", driver->path, name) < 0)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-0.7.7/src/remote/remote_driver.c
|
Index: libvirt-0.8.0/src/remote/remote_driver.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.7.orig/src/remote/remote_driver.c
|
--- libvirt-0.8.0.orig/src/remote/remote_driver.c
|
||||||
+++ libvirt-0.7.7/src/remote/remote_driver.c
|
+++ libvirt-0.8.0/src/remote/remote_driver.c
|
||||||
@@ -766,12 +766,29 @@ doRemoteOpen (virConnectPtr conn,
|
@@ -768,12 +768,29 @@ doRemoteOpen (virConnectPtr conn,
|
||||||
cmd_argv[j++] = strdup ("none");
|
cmd_argv[j++] = strdup ("none");
|
||||||
}
|
}
|
||||||
cmd_argv[j++] = strdup (priv->hostname);
|
cmd_argv[j++] = strdup (priv->hostname);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-0.7.6/src/xen/xen_hypervisor.c
|
Index: libvirt-0.8.0/src/xen/xen_hypervisor.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.6.orig/src/xen/xen_hypervisor.c
|
--- libvirt-0.8.0.orig/src/xen/xen_hypervisor.c
|
||||||
+++ libvirt-0.7.6/src/xen/xen_hypervisor.c
|
+++ libvirt-0.8.0/src/xen/xen_hypervisor.c
|
||||||
@@ -230,11 +230,28 @@ struct xen_v2d6_getdomaininfo {
|
@@ -230,11 +230,28 @@ struct xen_v2d6_getdomaininfo {
|
||||||
};
|
};
|
||||||
typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo;
|
typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo;
|
||||||
@ -251,11 +251,11 @@ Index: libvirt-0.7.6/src/xen/xen_hypervisor.c
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -2106,8 +2156,16 @@ xenHypervisorInit(void)
|
@@ -2105,8 +2155,16 @@ xenHypervisorInit(void)
|
||||||
sys_interface_version = 7; /* XEN_SYSCTL_INTERFACE_VERSION */
|
sys_interface_version = 7; /* XEN_SYSCTL_INTERFACE_VERSION */
|
||||||
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
|
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
|
||||||
dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */
|
dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */
|
||||||
- DEBUG0("Using hypervisor call v2, sys ver7 dom ver6\n");
|
- DEBUG0("Using hypervisor call v2, sys ver7 dom ver6");
|
||||||
- goto done;
|
- goto done;
|
||||||
+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
|
||||||
+ DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n");
|
+ DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n");
|
||||||
|
@ -13,11 +13,11 @@ 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.7.7/src/xen/xend_internal.c
|
Index: libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.7.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.0.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.7.7/src/xen/xend_internal.c
|
+++ libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
@@ -93,6 +93,7 @@ xenDaemonFormatSxprOnePCI(virConnectPtr
|
@@ -91,6 +91,7 @@ xenDaemonFormatSxprOnePCI(virDomainHostd
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainXMLDevID(virDomainPtr domain,
|
virDomainXMLDevID(virDomainPtr domain,
|
||||||
@ -25,7 +25,7 @@ Index: libvirt-0.7.7/src/xen/xend_internal.c
|
|||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
char *class,
|
char *class,
|
||||||
char *ref,
|
char *ref,
|
||||||
@@ -4212,7 +4213,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
@@ -4161,7 +4162,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
|
||||||
|
|
||||||
sexpr = virBufferContentAndReset(&buf);
|
sexpr = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
@ -34,7 +34,16 @@ Index: libvirt-0.7.7/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);
|
||||||
@@ -4306,7 +4307,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
@@ -4274,7 +4275,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
|
||||||
|
|
||||||
|
sexpr = virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
|
- if (virDomainXMLDevID(domain, dev, class, ref, sizeof(ref))) {
|
||||||
|
+ if (virDomainXMLDevID(domain, def, dev, class, ref, sizeof(ref))) {
|
||||||
|
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
|
_("requested device does not exist"));
|
||||||
|
goto cleanup;
|
||||||
|
@@ -4366,7 +4367,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
|
||||||
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
def, xml, VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -43,7 +52,7 @@ Index: libvirt-0.7.7/src/xen/xend_internal.c
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
||||||
@@ -6060,6 +6061,7 @@ error:
|
@@ -6114,6 +6115,7 @@ error:
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
virDomainXMLDevID(virDomainPtr domain,
|
virDomainXMLDevID(virDomainPtr domain,
|
||||||
@ -51,7 +60,7 @@ Index: libvirt-0.7.7/src/xen/xend_internal.c
|
|||||||
virDomainDeviceDefPtr dev,
|
virDomainDeviceDefPtr dev,
|
||||||
char *class,
|
char *class,
|
||||||
char *ref,
|
char *ref,
|
||||||
@@ -6068,27 +6070,33 @@ virDomainXMLDevID(virDomainPtr domain,
|
@@ -6122,27 +6124,33 @@ virDomainXMLDevID(virDomainPtr domain,
|
||||||
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
xenUnifiedPrivatePtr priv = domain->conn->privateData;
|
||||||
char *xref;
|
char *xref;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-0.7.7/src/xen/xend_internal.c
|
Index: libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.7.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.0.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.7.7/src/xen/xend_internal.c
|
+++ libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
@@ -5475,7 +5475,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
|
@@ -5524,7 +5524,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
|
||||||
} else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
|
} else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
|
||||||
virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
|
virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-0.7.6/src/xen/xend_internal.c
|
Index: libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.6.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.0.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.7.6/src/xen/xend_internal.c
|
+++ libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
@@ -1606,7 +1606,8 @@ xenDaemonParseSxprDisks(virConnectPtr co
|
@@ -1593,7 +1593,8 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
||||||
but blktap disks ended up in a differently named
|
but blktap disks ended up in a differently named
|
||||||
(device (tap ....)) block.... */
|
(device (tap ....)) block.... */
|
||||||
if (sexpr_lookup(node, "device/vbd") ||
|
if (sexpr_lookup(node, "device/vbd") ||
|
||||||
@ -12,7 +12,7 @@ Index: libvirt-0.7.6/src/xen/xend_internal.c
|
|||||||
char *offset;
|
char *offset;
|
||||||
const char *src = NULL;
|
const char *src = NULL;
|
||||||
const char *dst = NULL;
|
const char *dst = NULL;
|
||||||
@@ -1617,10 +1618,14 @@ xenDaemonParseSxprDisks(virConnectPtr co
|
@@ -1604,10 +1605,14 @@ xenDaemonParseSxprDisks(virDomainDefPtr
|
||||||
src = sexpr_node(node, "device/vbd/uname");
|
src = sexpr_node(node, "device/vbd/uname");
|
||||||
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");
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-0.7.6/src/xen/xend_internal.c
|
Index: libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-0.7.6.orig/src/xen/xend_internal.c
|
--- libvirt-0.8.0.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-0.7.6/src/xen/xend_internal.c
|
+++ libvirt-0.8.0/src/xen/xend_internal.c
|
||||||
@@ -1612,20 +1612,24 @@ xenDaemonParseSxprDisks(virConnectPtr co
|
@@ -1599,20 +1599,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;
|
||||||
@ -27,13 +27,11 @@ Index: libvirt-0.7.6/src/xen/xend_internal.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(disk) < 0)
|
if (VIR_ALLOC(disk) < 0)
|
||||||
@@ -1749,8 +1753,13 @@ xenDaemonParseSxprDisks(virConnectPtr co
|
@@ -1737,7 +1741,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;
|
||||||
-
|
|
||||||
- def->disks[def->ndisks++] = disk;
|
- def->disks[def->ndisks++] = disk;
|
||||||
+
|
|
||||||
+ if (bootable == 1 && def->ndisks > 0) {
|
+ if (bootable == 1 && def->ndisks > 0) {
|
||||||
+ memmove(def->disks + 1, def->disks, sizeof(def->disks) * def->ndisks);
|
+ memmove(def->disks + 1, def->disks, sizeof(def->disks) * def->ndisks);
|
||||||
+ def->disks[0] = disk;
|
+ def->disks[0] = disk;
|
||||||
|
Loading…
Reference in New Issue
Block a user