[libvirt] [PATCH] virsh: Clarify escape sequence
by Michal Privoznik
Currently, we put no strains on escape sequence possibly leaving users
with console that cannot be terminated. However, not all ASCII
characters can be used as escape sequence. Only those falling in
@ - _ can be; implement and document this constraint.
---
tools/console.c | 3 ++-
tools/virsh.c | 13 ++++++++++++-
tools/virsh.pod | 3 ++-
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/tools/console.c b/tools/console.c
index ca226c3..0f30b95 100644
--- a/tools/console.c
+++ b/tools/console.c
@@ -34,6 +34,7 @@
# include <errno.h>
# include <unistd.h>
# include <signal.h>
+# include <c-ctype.h>
# include "internal.h"
# include "console.h"
@@ -292,7 +293,7 @@ static char
vshGetEscapeChar(const char *s)
{
if (*s == '^')
- return CONTROL(s[1]);
+ return CONTROL(c_islower(s[1]) ? c_toupper(s[1]) : s[1]);
return *s;
}
diff --git a/tools/virsh.c b/tools/virsh.c
index 1ed2dda..cfdd040 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -19879,6 +19879,16 @@ vshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
vshPrint(ctl, "\n");
}
+static bool
+vshAllowedEscapeChar(char c)
+{
+ /* Allowed escape characters:
+ * a-z A-Z @ [ \ ] ^ _
+ */
+ return ('a' <= c && c <= 'z') ||
+ ('@' <= c && c <= '_');
+}
+
/*
* argv[]: virsh [options] [command]
*
@@ -19942,7 +19952,8 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
case 'e':
len = strlen(optarg);
- if ((len == 2 && *optarg == '^') ||
+ if ((len == 2 && *optarg == '^' &&
+ vshAllowedEscapeChar(optarg[1])) ||
(len == 1 && *optarg != '^')) {
ctl->escapeChar = optarg;
} else {
diff --git a/tools/virsh.pod b/tools/virsh.pod
index d4971a3..a60e667 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -95,7 +95,8 @@ Output elapsed time information for each command.
=item B<-e>, B<--escape> I<string>
Set alternative escape sequence for I<console> command. By default,
-telnet's B<^]> is used.
+telnet's B<^]> is used. Allowed characters when using hat notation are:
+alphabetic character, @, [, ], \, ^, _.
=back
--
1.7.8.5
12 years, 7 months
[libvirt] [PATCH 00/10] Enable loadable modules for libvirtd
by Daniel P. Berrange
For a long timer we've had the ability to build each libvirt
driver as a loadable module. We have never used this by default
and as a result it constantly bit-rots.
This series fixes various bugs, and then enables it by default
in configure. It also makes the PRMs use the loadable modules,
adding new new sub-RPMs for each module. We can now finally
install minimal libvirt binaries for each hypervisor.
ie yum install libvirt-kvm
will not pull in Xen libraries!
12 years, 7 months
[libvirt] Need Help To Destroy Virtual Machines
by Ali Raza Memon
Hello...!
I am using libvirt-php for controlling my xen virtual machines. For this I have installed libvirt-php along with xampp server.
Now I need to create a web based controll panel application which shows me running vms, and some options like Shutdown, Pause, Create, Destroy. My aim is, when I click Destroy button the selected vm should be destroyed. For this I have used the following php-script:
<?php
$conn=libvirt_connect("xen:///");
$name=libvirt_domain_lookup_by_id($conn,4); // Here '4' is the id of my running vm
$dest=libvirt_domain_destroy($name);
echo $dest;
?>
When I execute this it shows me following warning:
Warning: libvirt_domain_destroy() [function.libvirt-domain-destroy]: operation virDomainDestroy forbidden for read only access in /opt/lampp/htdocs/xampp/xen/test.php on line 5
So, Could you please help me to solve this?
! Thank You !
12 years, 7 months
[libvirt] is it possible to set txqueuelen on vnetX devices automatically
by Tim Hughes
Hello,
We have been tuning our libvirt hosts and discovered that setting the
txqueuelen on vnetX devices to 2500 we can increase the network throughput
by a factor of almost 10. On an eth device it can be set by hand/rc.local
with the following instructions
http://www.cyberciti.biz/faq/gentoo-centos-rhel-debian-fedora-increasing-...
. Because vnetX devices are named on a 'first free' basis and they come
and go with the guests the rc.local method is not going to work. I think
this needs to be done via libvirt or possibly udev, maybe with some kind of
hook. Ideally I would like to be able to set this automatically for all
vnetX devices when they are created or even better, on a per guest basis.
Tim Hughes
mailto:thughes@thegoldfish.org
12 years, 7 months
[libvirt] [PATCH] Refactor the libvirt RPM daemon pieces
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
There are a number of flaws with our packaging of the libvirtd
daemon:
- Installing 'libvirt' does not install 'qemu-kvm' or 'xen'
etc which are required to actually run the hypervisor in
question
- Installing 'libvirt' pulls in the default configuration
files which may not be wanted & cause problems if installed
inside a guest
- It is not possible to explicitly required all the peices
required to manage a specific hypervisor
This change takes the 'libvirt' RPM and and changes it thus
- libvirt: just a virtual package with dep on libvirt-daemon,
libvirt-daemon-config-network & libvirt-daemon-config-nwfilter
- libvirt-daemon: the libvirt daemon and related pieces
- libvirt-daemon-config-network: the default network config
- libvirt-daemon-config-nwfilter: the network filter configs
- libvirt-docs: the website HTML
We then introduce some more virtual (empty) packages
- libvirt-daemon-qemu: Deps on libvirt-daemon & 'qemu'
- libvirt-daemon-kvm: Deps on libvirt-daemon & 'qemu-kvm'
- libvirt-daemon-lxc: Deps on libvirt-daemon
- libvirt-daemon-uml: Deps on libvirt-daemon
- libvirt-daemon-xen: Deps on libvirt-daemon & 'xen'
- libvirt-qemu: Deps on libvirt-daemon-qemu & libvirt-daemon-config-{network,nwfilter}
- libvirt-kvm: Deps on libvirt-daemon-kvm & libvirt-daemon-config-{network,nwfilter}
- libvirt-lxc: Deps on libvirt-daemon-lxc & libvirt-daemon-config-{network,nwfilter}
- libvirt-uml: Deps on libvirt-daemon-uml & libvirt-daemon-config-{network,nwfilter}
- libvirt-xen: Deps on libvirt-daemon-xen & libvirt-daemon-config-network
My intent in the future is to turn on the driver modules by
default, at which time 'libvirt-daemon' will cease to include
any specific drivers, instead we'll get libvirt-daemon-driver-XXXX
packages for each driver. The libvirt-daemon-XXX packages will
then pull in each driver that they require.
It is recommended that applications required a locally installed
libvirtd daemon, use either 'Requires: libvirt-daemon-XXXX' or
'Requires: libvirt-XXX' and *not* "Requires: libvirt-daemon"
or 'Requires: libvirt'
* libvirt.spec.in: Refactor RPMs
* docs/packaging.html.in, docs/sitemap.html.in: Document
new RPM split rationale
---
docs/packaging.html.in | 106 ++++++++++
docs/sitemap.html.in | 4 +
libvirt.spec.in | 512 +++++++++++++++++++++++++++++++++++++-----------
3 files changed, 505 insertions(+), 117 deletions(-)
create mode 100644 docs/packaging.html.in
In v2:
- Split libvirt-daemon-configs into libvirt-daemon-config-network
and libvirt-daemon-config-nwfilter
- Fix ordering of QEMU/KVM bits
- Don't install nwfilter configs if the driver is turned off
- Enable nwfilter for LXC/UML drivers explicitly, not just KVM
- Fix docs typos
- Make all %files sections conditional
Tested build on F17 and RHEL-6.3
diff --git a/docs/packaging.html.in b/docs/packaging.html.in
new file mode 100644
index 0000000..0adffd3
--- /dev/null
+++ b/docs/packaging.html.in
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<html>
+ <body>
+ <h1>Distribution packaging</h1>
+
+ <ul id="toc"></ul>
+
+ <p>
+ This page describes the rationale behind the libvirt distribution
+packaging in RPM format. The RPM specfile provided with libvirt targets
+all Fedora and RHEL releases. It is split up into a number of sub-RPMs
+in order to facilitate minimal installations, targetting specific
+feature sets.
+ </p>
+
+ <h2><a name="real">Real packages</a></h2>
+
+ <p>
+ The so called "real" packages provide the actual file payloads
+ related to libvirt. If very specific / targetted functionality
+ is required, then applications can depend on one or more of these
+ real packages.
+ </p>
+
+ <dl>
+ <dt>libvirt-client</dt>
+ <dd>This package provides the main libvirt.so library along with
+ the virsh command line tool. If a C based application only wants
+ to be able to manage remote hypervisors, this is all that they
+ need depend on</dd>
+ <dt>libvirt-devel</dt>
+ <dd>This package provides the header files and libraries required
+ to compile and link C applications using libvirt</dd>
+ <dt>libvirt-python</dt>
+ <dd>This package provides the Python binding to the C libraries.
+ It will pull in the libvirt-client RPM. If a Python application
+ only wants to be able to manage remote hypervisors, this is all
+ that they need depend on</dd>
+ <dt>libvirt-daemon</dt>
+ <dd>This package provides server side libvirtd daemon, which is
+ required in order to manage any stateful hypervisors (currently
+ QEMU, KVM, Xen, LXC and UML).</dd>
+ <dt>libvirt-daemon-config-network</dt>
+ <dd>This package provides the standard configuration files for
+ setting up a NAT based network</dd>
+ <dt>libvirt-daemon-config-nwfilter</dt>
+ <dd>This package provides the standard configuration files for
+ network filter rules for ensuring clean VM traffic.</dd>
+ </dl>
+
+ <h2><a name="virtual">Virtual packages</a></h2>
+
+ <p>
+ The virtual packages provide convenient targets for application dependencies to
+ pull in functionality related to specific hypervisors. Since the packaging of
+ the <code>libvirt-daemon</code> RPM is expected to change in the future to split
+ each hypervisor driver out into a separate RPM, applications are strongly
+ recommended to depend on one of the following virtual packages, instead of
+ depending directly on <code>libvirt-daemon</code>
+ </p>
+
+ <dl>
+ <dt>libvirt</dt>
+ <dd>This package, simply pulls in every single other server side RPM.
+ If an application wants to ensure all possible libvirt drivers are installed,
+ this is what they should depend on</dd>
+
+ <dt>libvirt-daemon-qemu</dt>
+ <dd>This package pulls in the server side daemon, drivers and the QEMU TCG binaries
+ required to provide emulation of non-native architectures</dd>
+ <dt>libvirt-daemon-kvm</dt>
+ <dd>This package pulls in the server side daemon, drivers and the KVM binaries
+ required to provide hardware accelerated virtualization of the native
+ architectures</dd>
+ <dt>libvirt-daemon-lxc</dt>
+ <dd>This package pulls in the server side daemon and drivers required to
+ run native Linux containers</dd>
+ <dt>libvirt-daemon-uml</dt>
+ <dd>This package pulls in the server side daemon and drivers required to
+ run User Mode Linux. The application must still provide the actual
+ UML binary kernels</dd>
+ <dt>libvirt-daemon-xen</dt>
+ <dd>This package pulls in the server side daemon and drivers required to
+ run guests on the Xen hypervisor.</dd>
+
+ <dt>libvirt-qemu</dt>
+ <dd>This package pulls in the server side daemon, drivers and the QEMU TCG binaries
+ required to provide emulation of non-native architectures</dd>
+ <dt>libvirt-kvm</dt>
+ <dd>This package pulls in the server side daemon, drivers and the KVM binaries
+ required to provide hardware accelerated virtualization of the native
+ architectures</dd>
+ <dt>libvirt-lxc</dt>
+ <dd>This package pulls in the server side daemon, drivers and default
+ configuration files required to run native Linux containers</dd>
+ <dt>libvirt-uml</dt>
+ <dd>This package pulls in the server side daemon, drivers and default
+ configuration files required to run User Mode Linux. The application
+ must still provide the actual UML binary kernels</dd>
+ <dt>libvirt-xen</dt>
+ <dd>This package pulls in the server side daemon, drivers and default
+ configuration files required to run guests on the Xen hypervisor.</dd>
+ </dl>
+
+ </body>
+</html>
diff --git a/docs/sitemap.html.in b/docs/sitemap.html.in
index 1de2b20..620c989 100644
--- a/docs/sitemap.html.in
+++ b/docs/sitemap.html.in
@@ -84,6 +84,10 @@
<a href="hooks.html">Hooks</a>
<span>Hooks for system specific management</span>
</li>
+ <li>
+ <a href="packaging.html">Distribution packaging</a>
+ <span>Rationale for distribution RPM packaging</span>
+ </li>
</ul>
</li>
<li>
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 67f1c33..8730881 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -52,6 +52,14 @@
%define with_libxl 0%{!?_without_libxl:%{server_drivers}}
%define with_vmware 0%{!?_without_vmware:%{server_drivers}}
+%define with_qemu_tcg %{with_qemu}
+# Change if we ever provide qemu-kvm binaries on non-x86 hosts
+%ifarch %{ix86} x86_64
+%define with_qemu_kvm %{with_qemu}
+%else
+%define with_qemu_kvm 0
+%endif
+
# Then the hypervisor drivers that talk via a native remote protocol
%define with_phyp 0%{!?_without_phyp:1}
%define with_esx 0%{!?_without_esx:1}
@@ -125,8 +133,10 @@
# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
%if 0%{?rhel} == 5
+%define with_qemu_tcg 0
%ifnarch x86_64
%define with_qemu 0
+%define with_qemu_kvm 0
%endif
%define with_lxc 0
%endif
@@ -134,8 +144,10 @@
# RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen
# on all archs. Other archs all have LXC available though
%if 0%{?rhel} >= 6
+%define with_qemu_tcg 0
%ifnarch x86_64
%define with_qemu 0
+%define with_qemu_kvm 0
%endif
%define with_xen 0
%endif
@@ -206,10 +218,13 @@
%define with_storage_disk 0
%endif
-%if %{with_qemu}
+%if %{with_qemu} || %{with_lxc} || %{with_uml}
%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
# Enable libpcap library
%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}}
+%endif
+
+%if %{with_qemu}
%define with_macvtap 0%{!?_without_macvtap:%{server_drivers}}
# numad is used to manage the CPU placement dynamically,
@@ -268,109 +283,22 @@ Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://libvirt.org/
-# All runtime requirements for the libvirt package (runtime requrements
-# for subpackages are listed later in those subpackages)
-
-# The client side, i.e. shared libs and virsh are in a subpackage
-Requires: %{name}-client = %{version}-%{release}
-
-# Used by many of the drivers, so turn it on whenever the
-# daemon is present
%if %{with_libvirtd}
-# for modprobe of pci devices
-Requires: module-init-tools
-# for /sbin/ip & /sbin/tc
-Requires: iproute
-%if %{with_avahi}
-Requires: avahi-libs
-%endif
-%endif
+Requires: libvirt-daemon = %{version}-%{release}
%if %{with_network}
-Requires: dnsmasq >= 2.41
-Requires: radvd
-%endif
-%if %{with_network} || %{with_nwfilter}
-Requires: iptables
-Requires: iptables-ipv6
+Requires: libvirt-daemon-config-network = %{version}-%{release}
%endif
%if %{with_nwfilter}
-Requires: ebtables
-%endif
-# needed for device enumeration
-%if %{with_hal}
-Requires: hal
-%endif
-%if %{with_udev}
-Requires: udev >= 145
-%endif
-%if %{with_polkit}
-%if 0%{?fedora} >= 12 || 0%{?rhel} >=6
-Requires: polkit >= 0.93
-%else
-Requires: PolicyKit >= 0.6
-%endif
-%endif
-%if %{with_storage_fs}
-Requires: nfs-utils
-# For mkfs
-Requires: util-linux-ng
-# For pool-build probing for existing pools
-BuildRequires: libblkid-devel >= 2.17
-# For glusterfs
-%if 0%{?fedora} >= 11
-Requires: glusterfs-client >= 2.0.1
-%endif
-%endif
-%if %{with_qemu}
-# From QEMU RPMs
-Requires: /usr/bin/qemu-img
-# For image compression
-Requires: gzip
-Requires: bzip2
-Requires: lzop
-Requires: xz
-%else
-%if %{with_xen}
-# From Xen RPMs
-Requires: /usr/sbin/qcow-create
-%endif
-%endif
-%if %{with_storage_lvm}
-# For LVM drivers
-Requires: lvm2
-%endif
-%if %{with_storage_iscsi}
-# For ISCSI driver
-Requires: iscsi-initiator-utils
-%endif
-%if %{with_storage_disk}
-# For disk driver
-Requires: parted
-Requires: device-mapper
-%endif
-%if %{with_storage_mpath}
-# For multipath support
-Requires: device-mapper
-%endif
-%if %{with_cgconfig}
-Requires: libcgroup
-%endif
-%ifarch %{ix86} x86_64 ia64
-# For virConnectGetSysinfo
-Requires: dmidecode
+Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
%endif
-# For service management
-%if %{with_systemd}
-Requires(post): systemd-units
-Requires(post): systemd-sysv
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-%endif
-%if %{with_numad}
-Requires: numad
+# XXX when we turn on driver modules, we need to add
+# deps on each driver (Requires: libvirt-daemon-drv-qemu)
%endif
+Requires: libvirt-docs = %{version}-%{release}
+Requires: libvirt-client = %{version}-%{release}
-# All build-time requirements
+# All build-time requirements. Run-time requirements are
+# listed against each sub-RPM
%if 0%{?enable_autotools}
BuildRequires: autoconf
BuildRequires: automake
@@ -537,6 +465,279 @@ Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The main package includes
the libvirtd server exporting the virtualization support.
+%package docs
+Summary: Documentation for libvirt library and daemon
+Group: Development/Libraries
+
+%description docs
+Copy of the libvirt website documentation
+
+%if %{with_libvirtd}
+%package daemon
+Summary: Server side daemon and supporting files for libvirt library
+Group: Development/Libraries
+
+# All runtime requirements for the libvirt package (runtime requrements
+# for subpackages are listed later in those subpackages)
+
+# The client side, i.e. shared libs and virsh are in a subpackage
+Requires: %{name}-client = %{version}-%{release}
+
+# Used by many of the drivers, so turn it on whenever the
+# daemon is present
+%if %{with_libvirtd}
+# for modprobe of pci devices
+Requires: module-init-tools
+# for /sbin/ip & /sbin/tc
+Requires: iproute
+%if %{with_avahi}
+Requires: avahi-libs
+%endif
+%endif
+%if %{with_network}
+Requires: dnsmasq >= 2.41
+Requires: radvd
+%endif
+%if %{with_network} || %{with_nwfilter}
+Requires: iptables
+Requires: iptables-ipv6
+%endif
+%if %{with_nwfilter}
+Requires: ebtables
+%endif
+# needed for device enumeration
+%if %{with_hal}
+Requires: hal
+%endif
+%if %{with_udev}
+Requires: udev >= 145
+%endif
+%if %{with_polkit}
+%if 0%{?fedora} >= 12 || 0%{?rhel} >=6
+Requires: polkit >= 0.93
+%else
+Requires: PolicyKit >= 0.6
+%endif
+%endif
+%if %{with_storage_fs}
+Requires: nfs-utils
+# For mkfs
+Requires: util-linux-ng
+# For pool-build probing for existing pools
+BuildRequires: libblkid-devel >= 2.17
+# For glusterfs
+%if 0%{?fedora} >= 11
+Requires: glusterfs-client >= 2.0.1
+%endif
+%endif
+%if %{with_qemu}
+# From QEMU RPMs
+Requires: /usr/bin/qemu-img
+# For image compression
+Requires: gzip
+Requires: bzip2
+Requires: lzop
+Requires: xz
+%else
+%if %{with_xen}
+# From Xen RPMs
+Requires: /usr/sbin/qcow-create
+%endif
+%endif
+%if %{with_storage_lvm}
+# For LVM drivers
+Requires: lvm2
+%endif
+%if %{with_storage_iscsi}
+# For ISCSI driver
+Requires: iscsi-initiator-utils
+%endif
+%if %{with_storage_disk}
+# For disk driver
+Requires: parted
+Requires: device-mapper
+%endif
+%if %{with_storage_mpath}
+# For multipath support
+Requires: device-mapper
+%endif
+%if %{with_cgconfig}
+Requires: libcgroup
+%endif
+%ifarch %{ix86} x86_64 ia64
+# For virConnectGetSysinfo
+Requires: dmidecode
+%endif
+# For service management
+%if %{with_systemd}
+Requires(post): systemd-units
+Requires(post): systemd-sysv
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%endif
+%if %{with_numad}
+Requires: numad
+%endif
+
+%description daemon
+Server side daemon required to manage the virtualization capabilities
+of recent versions of Linux. Requires a hypervisor specific sub-RPM
+for specific drivers.
+
+%if %{with_network}
+%package daemon-config-network
+Summary: Default configuration files for the libvirtd daemon
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-config-network
+Default configuration files for setting up NAT based networking
+%endif
+
+%if %{with_nwfilter}
+%package daemon-config-nwfilter
+Summary: Network filter configuration files for the libvirtd daemon
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-config-nwfilter
+Network filter configuration files for cleaning guest traffic
+%endif
+
+# XXX when we turn on driver modules, we will need to
+# create daemon-drv-XXX sub-RPMs and add them as deps
+# to all of the following daemon-XXX RPMs
+
+%if %{with_qemu_tcg}
+%package daemon-qemu
+Summary: Server side daemon & driver required to run QEMU guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+Requires: qemu
+
+%description daemon-qemu
+Server side daemon and driver required to manage the virtualization
+capabilities of the QEMU TCG emulators
+
+%package qemu
+Summary: Server side daemon, driver & default configs required to run QEMU guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon-qemu = %{version}-%{release}
+Requires: libvirt-daemon-config-network = %{version}-%{release}
+Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
+
+%description qemu
+Server side daemon, driver and default network & firewall configs
+required to manage the virtualization capabilities of QEMU.
+%endif
+
+
+%if %{with_qemu_kvm}
+%package daemon-kvm
+Summary: Server side daemon & driver required to run QEMU guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+Requires: qemu-kvm
+
+%description daemon-kvm
+Server side daemon and driver required to manage the virtualization
+capabilities of the QEMU KVM hypervisor
+
+%package kvm
+Summary: Server side daemon, driver & default configs required to run KVM guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon-kvm = %{version}-%{release}
+Requires: libvirt-daemon-config-network = %{version}-%{release}
+Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
+
+%description kvm
+Server side daemon, driver and default network & firewall configs
+required to manage the virtualization capabilities of KVM.
+%endif
+
+
+%if %{with_lxc}
+%package daemon-lxc
+Summary: Server side daemon & driver required to run LXC guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-lxc
+Server side daemon and driver required to manage the virtualization
+capabilities of LXC
+
+%package lxc
+Summary: Server side daemon, driver & default configs required to run LXC guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon-lxc = %{version}-%{release}
+Requires: libvirt-daemon-config-network = %{version}-%{release}
+Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
+
+%description lxc
+Server side daemon, driver and default network & firewall configs
+required to manage the virtualization capabilities of LXC.
+%endif
+
+
+%if %{with_uml}
+%package daemon-uml
+Summary: Server side daemon & driver required to run UML guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+# There are no UML kernel RPMs in Fedora/RHEL to depend on.
+
+%description daemon-uml
+Server side daemon and driver required to manage the virtualization
+capabilities of UML
+
+%package uml
+Summary: Server side daemon, driver & default configs required to run UML guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon-uml = %{version}-%{release}
+Requires: libvirt-daemon-config-network = %{version}-%{release}
+Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
+
+%description uml
+Server side daemon, driver and default network & firewall configs
+required to manage the virtualization capabilities of UML.
+%endif
+
+
+%if %{with_xen}
+%package daemon-xen
+Summary: Server side daemon & driver required to run XEN guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+Requires: xen
+
+%description daemon-xen
+Server side daemon and driver required to manage the virtualization
+capabilities of XEN
+
+%package xen
+Summary: Server side daemon, driver & default configs required to run XEN guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon-xen = %{version}-%{release}
+Requires: libvirt-daemon-config-network = %{version}-%{release}
+
+%description xen
+Server side daemon, driver and default network & firewall configs
+required to manage the virtualization capabilities of Xen.
+%endif
+%endif
+
%package client
Summary: Client side library and utilities of the libvirt library
Group: Development/Libraries
@@ -582,7 +783,7 @@ Group: Development/Libraries
Requires: sanlock >= 1.8
#for virt-sanlock-cleanup require augeas
Requires: augeas
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-daemon = %{version}-%{release}
%description lock-sanlock
Includes the Sanlock lock manager plugin for the QEMU
@@ -884,6 +1085,12 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
%endif
+mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-docs-%{version}
+
+%if ! %{with_nwfilter}
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
+%endif
+
%clean
rm -fr %{buildroot}
@@ -898,7 +1105,8 @@ do
done
make check
-%pre
+%if %{with_libvirtd}
+%pre daemon
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
# Normally 'setup' adds this in /etc/passwd, but this is
# here for case of upgrades from earlier Fedora/RHEL. This
@@ -910,22 +1118,9 @@ getent passwd qemu >/dev/null || \
-c "qemu user" qemu
%endif
-%post
+%post daemon
-%if %{with_libvirtd}
%if %{with_network}
-# We want to install the default network for initial RPM installs
-# or on the first upgrade from a non-network aware libvirt only.
-# We check this by looking to see if the daemon is already installed
-if ! /sbin/chkconfig libvirtd && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
-then
- UUID=`/usr/bin/uuidgen`
- sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
- < %{_datadir}/libvirt/networks/default.xml \
- > %{_sysconfdir}/libvirt/qemu/networks/default.xml
- ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
-fi
-
# All newly defined networks will have a mac address for the bridge
# auto-generated, but networks already existing at the time of upgrade
# will not. We need to go through all the network configs, look for
@@ -991,8 +1186,8 @@ fi
%endif
%endif
-%preun
%if %{with_libvirtd}
+%preun daemon
%if %{with_systemd}
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
@@ -1007,8 +1202,8 @@ fi
%endif
%endif
-%postun
%if %{with_libvirtd}
+%postun daemon
%if %{with_systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
@@ -1019,6 +1214,20 @@ fi
%endif
%if %{with_libvirtd}
+%if %{with_network}
+%post daemon-config-network
+if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
+ UUID=`/usr/bin/uuidgen`
+ sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
+ < %{_datadir}/libvirt/networks/default.xml \
+ > %{_sysconfdir}/libvirt/qemu/networks/default.xml
+ ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
+fi
+%endif
+%endif
+
+
+%if %{with_libvirtd}
%if %{with_systemd}
%triggerun -- libvirt < 0.9.4
%{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||:
@@ -1064,10 +1273,19 @@ fi
/bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || :
%endif
-%if %{with_libvirtd}
%files
%defattr(-, root, root)
+%files docs
+%defattr(-, root, root)
+%dir %{_datadir}/doc/libvirt-docs-%{version}
+%dir %{_datadir}/doc/libvirt-docs-%{version}/html
+%{_datadir}/doc/libvirt-docs-%{version}/html/*
+
+%if %{with_libvirtd}
+%files daemon
+%defattr(-, root, root)
+
%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
@@ -1078,7 +1296,6 @@ fi
%endif
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
-%{_sysconfdir}/libvirt/nwfilter/*.xml
%{_sysconfdir}/rc.d/init.d/libvirtd
%if %{with_systemd}
@@ -1190,6 +1407,67 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%{_mandir}/man8/libvirtd.8*
%doc docs/*.xml
+
+%if %{with_network}
+%files daemon-config-network
+%defattr(-, root, root)
+%endif
+
+%if %{with_nwfilter}
+%files daemon-config-nwfilter
+%defattr(-, root, root)
+%{_sysconfdir}/libvirt/nwfilter/*.xml
+%endif
+
+%if %{with_qemu_tcg}
+%files daemon-qemu
+%defattr(-, root, root)
+%endif
+
+%if %{with_qemu_kvm}
+%files daemon-kvm
+%defattr(-, root, root)
+%endif
+
+%if %{with_lxc}
+%files daemon-lxc
+%defattr(-, root, root)
+%endif
+
+%if %{with_uml}
+%files daemon-uml
+%defattr(-, root, root)
+%endif
+
+%if %{with_xen}
+%files daemon-xen
+%defattr(-, root, root)
+%endif
+
+%if %{with_qemu_tcg}
+%files qemu
+%defattr(-, root, root)
+%endif
+
+%if %{with_qemu_kvm}
+%files kvm
+%defattr(-, root, root)
+%endif
+
+%if %{with_lxc}
+%files lxc
+%defattr(-, root, root)
+%endif
+
+%if %{with_uml}
+%files uml
+%defattr(-, root, root)
+%endif
+
+%if %{with_xen}
+%files xen
+%defattr(-, root, root)
+%endif
%endif
%if %{with_sanlock}
--
1.7.7.6
12 years, 7 months
[libvirt] Openvswitch support - port tagging
by Daniele Milani
I was looking at the release candidate of libvirt (0.9.11-rc2) and I have not been able to understand if the openvswitch support includes the port tagging support.
So my question is: is it possible to create a tagged port? How?
Otherwise, would it be useful to add this functionality?
Thanks,
Daniele Milani
12 years, 7 months
[libvirt] [PATCHv5 0/3] Xen: Fix <clock> handling
by Philipp Hahn
Before version 3.1 xen only implemented clock/@offset='utc' and 'localtime'.
With the introduction of managed domains in 3.1 xend keeps track of the
rtc_timeoffset, even over reboots. This translates to libvirts
clock/@offset='variable' variant. Be advised that only HV domains have a RTC.
In addition xen also supports a variant where the offset is tracked to
'localtime', which is currently not supported by libvirt. To make matters
worse, this was somehow broken in some versions of xen and was finally fixed
with version xen-3.4.
The following patch set ...
* adds support for handling variable offsets relative to localtime,
* fixes libvirt to use clock/@offset='variable' for newer xen versions,
* adapts the test suit accordingly
I've tested this on CenOS5 (xend-3.0.3 + 3.1.2 hypervisor?), UCS-2.3
(xen-3.2.1), UCS-2.4 (xen-3.4.3) and UCS-3.0 (xen-4.1.2).
Since v1:
+ fix handling of direct-PV-domains
+ added handling of localtime=1 + rtc_timeoffset
+ fixed test suite
Since v2: (on feedback by Eric)
+ add the adjustment='reset' attribute to force the old behaviour
+ handle adjustment='$timeDelta' as a short-cut for the conversion to variable.
+ simplify error path handling
+ update version numbers to 0.9.11
Since v3:
+ Add missing offset=VARIALE for adjustment='$timeDelta' conversion.
Since v4:
+ Rebase against v0.9.11-rc2-6-ga465031 (unmodified)
Philipp Hahn (3):
Support clock=variable relative to localtime
Xen: Fix <clock> handling
Xen: Adapt <clock> tests
docs/formatdomain.html.in | 18 ++-
docs/schemas/domaincommon.rng | 30 +++-
src/conf/domain_conf.c | 61 +++++++-
src/conf/domain_conf.h | 17 ++-
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 8 +-
src/qemu/qemu_process.c | 2 +-
src/xenxs/xen_sxpr.c | 167 +++++++++++++++-----
src/xenxs/xen_xm.c | 123 ++++++++++++---
.../qemuxml2argv-clock-variable.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 2 +-
.../sexpr2xml-disk-block-shareable.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 2 +-
.../sexpr2xml-disk-drv-blktap-qcow.xml | 2 +-
.../sexpr2xml-disk-drv-blktap-raw.xml | 2 +-
.../sexpr2xml-disk-drv-blktap2-raw.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 2 +-
.../sexpr2xml-fv-serial-dev-2-ports.xml | 2 +-
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 2 +-
.../sexpr2xml-fv-serial-tcp-telnet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 2 +-
.../sexpr2xml-pv-bootloader-cmdline.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 2 +-
.../sexpr2xml-pv-vfb-new-vncdisplay.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 2 +-
.../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv.xml | 2 +-
tests/xmconfigdata/sexpr2xml-pv-bootloader.cfg | 1 +
tests/xmconfigdata/test-escape-paths.xml | 2 +-
tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +-
tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 2 +-
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +-
tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 2 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +-
.../test-fullvirt-serial-dev-2-ports.xml | 2 +-
.../test-fullvirt-serial-dev-2nd-port.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +-
.../test-fullvirt-serial-tcp-telnet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +-
tests/xmconfigdata/test-fullvirt-sound.xml | 2 +-
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +-
.../test-fullvirt-usbtablet-no-bus.xml | 2 +-
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-utc.xml | 2 +-
tests/xmconfigdata/test-no-source-cdrom.xml | 2 +-
tests/xmconfigdata/test-paravirt-net-e1000.cfg | 1 +
tests/xmconfigdata/test-paravirt-net-e1000.xml | 2 +-
tests/xmconfigdata/test-paravirt-net-vifname.cfg | 1 +
tests/xmconfigdata/test-paravirt-net-vifname.xml | 2 +-
.../test-paravirt-new-pvfb-vncdisplay.cfg | 1 +
.../test-paravirt-new-pvfb-vncdisplay.xml | 2 +-
tests/xmconfigdata/test-paravirt-new-pvfb.cfg | 1 +
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 2 +-
.../test-paravirt-old-pvfb-vncdisplay.cfg | 1 +
.../test-paravirt-old-pvfb-vncdisplay.xml | 2 +-
tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 1 +
tests/xmconfigdata/test-paravirt-old-pvfb.xml | 2 +-
tests/xmconfigdata/test-paravirt-vcpu.cfg | 1 +
tests/xmconfigdata/test-paravirt-vcpu.xml | 2 +-
tests/xmconfigdata/test-pci-devs.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 1 +
.../xml2sexpr-disk-block-shareable.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 4 +-
.../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 4 +-
.../xml2sexpr-disk-drv-blktap-qcow.sexpr | 4 +-
.../xml2sexpr-disk-drv-blktap-raw.sexpr | 4 +-
.../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 4 +-
.../xml2sexpr-disk-drv-blktap2-raw.sexpr | 4 +-
.../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-escape.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 1 +
.../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 5 +-
tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 3 +-
.../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 3 +-
.../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 1 +
.../xml2sexpr-fv-serial-dev-2-ports.sexpr | 3 +-
.../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 1 +
.../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 1 +
.../xml2sexpr-fv-serial-tcp-telnet.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +-
.../xml2sexpr-pv-bootloader-cmdline.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-pv.sexpr | 2 +-
157 files changed, 526 insertions(+), 200 deletions(-)
12 years, 7 months
[libvirt] [RFC: PATCH 00/13] live block migration via virDomainBlockCopy
by Eric Blake
This is in response to my discussion with Paolo here:
https://www.redhat.com/archives/libvir-list/2012-March/msg01171.html
It also picks up an old patch from Adam here (now split into two):
https://www.redhat.com/archives/libvir-list/2012-January/msg00562.html
Patches 1-12 are in pretty good shape, while patch 13 is still a work
in progress. I can test a lot of the pieces, but still have several
patches to go before I can fully test the new API. I'm posting this
now to at least start some review on the earlier pieces, and to get
consensus that the API and XML changes are correct.
None of these patches should be applied until after 0.9.11 is released,
and even then, we still want confirmation of whether upstream qemu 1.1
will include complete support for block mirroring.
For anyone trying to backport this feature to 0.9.10 .so API, I've
made sure that you can just omit patches 5 and 6, and that everything
else will backport cleanly to give you the new feature through just
the public virDomainBlockRebase() call.
Adam Litke (2):
blockjob: add API for async virDomainBlockJobAbort
blockjob: wire up qemu async virDomainBlockJobAbort
Eric Blake (11):
blockjob: add new API flags
blockjob: add 'blockcopy' to virsh
blockjob: add virDomainBlockCopy
blockjob: enhance virsh 'blockcopy'
blockjob: wire up RPC for block copy
blockjob: enhance xml to track mirrors across libvirtd restart
blockjob: react to active block copy
blockjob: expose qemu commands for mirrored storage migration
blockjob: query backing file of a disk
blockjob: return appropriate event and info
WIP: blockjob: implement block copy for qemu
docs/apibuild.py | 1 +
docs/formatdomain.html.in | 11 ++
docs/schemas/domaincommon.rng | 19 +++-
include/libvirt/libvirt.h.in | 50 +++++++++-
include/libvirt/virterror.h | 1 +
src/conf/domain_conf.c | 77 +++++++++++++++
src/conf/domain_conf.h | 14 +++
src/driver.h | 6 +
src/libvirt.c | 216 +++++++++++++++++++++++++++++++++++++++--
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 5 +
src/qemu/qemu_capabilities.c | 3 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_driver.c | 211 ++++++++++++++++++++++++++++++++++++++--
src/qemu/qemu_hotplug.c | 7 ++
src/qemu/qemu_monitor.c | 60 +++++++++++-
src/qemu/qemu_monitor.h | 23 +++++
src/qemu/qemu_monitor_json.c | 128 ++++++++++++++++++++++--
src/qemu/qemu_monitor_json.h | 21 ++++-
src/qemu/qemu_process.c | 19 ++++
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 13 +++-
src/remote_protocol-structs | 10 ++
src/rpc/gendispatch.pl | 1 +
src/util/virterror.c | 6 +
tools/virsh.c | 135 ++++++++++++++++++++-----
tools/virsh.pod | 33 ++++++-
28 files changed, 1007 insertions(+), 68 deletions(-)
--
1.7.7.6
12 years, 7 months
[libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device
by Wen Congyang
Currently, we use migrate to dump guest's memory. There is one
restriction in migrate command: the device's status should be
stored in qemu because the device's status should be passed to
target machine.
If we passthrough a host device to guest, the device's status
is stored in the real device. So migrate command will fail.
We usually use dump when guest is panicked. So there is no need
to store device's status in the vmcore.
qemu will have a new monitor command dump-guest-memory to dump
guest memory, but it doesn't support async now(it will support
later when the common async API is implemented).
So I use dump-guest-memory only when the guest uses host device
in this patchset.
Wen Congyang (2):
qemu: implement qemu's dump-guest-memory
qemu: try to use qemu's dump-guest-meory when vm uses host device
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 42 ++++++++++++++++++++-
src/qemu/qemu_monitor.c | 32 ++++++++++++++++
src/qemu/qemu_monitor.h | 13 +++++++
src/qemu/qemu_monitor_json.c | 42 +++++++++++++++++++++
src/qemu/qemu_monitor_json.h | 7 ++++
src/qemu/qemu_monitor_text.c | 83 ++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_monitor_text.h | 7 ++++
9 files changed, 226 insertions(+), 2 deletions(-)
12 years, 7 months