Re: [libvirt] [Libguestfs] compile libguestfs 1.19.35
by Richard W.M. Jones
[The context for libvirt users is how to let people do
'make install' without having conflicts with installed copies
of packages.]
On Wed, Sep 05, 2012 at 07:39:37AM -0400, Whit Blauvelt wrote:
> On Wed, Sep 05, 2012 at 08:07:09AM +0100, Richard W.M. Jones wrote:
>
> > It is possible to run 'make install', but we normally do not recommend
> > you do that. To avoid conflicts between other packages, you should
> > build a libguestfs package for your Linux distro, which is not so
> > easy.
>
> Is there a goal at least that if a the group of programs including libvirt
> and qemu-kvm is built and installed from tar, that it should install with
> internal consistency regardless of underlying distro?
>
> All the distros necessarily lag development here. Sometimes new features are
> key to a particular deployment. Isn't it a useful goal to produce components
> such that, if "make install" is used with each of them, the result should be
> good? Is that the goal of these related projects?
>
> Now days, for instance, every distro does a good LAMP stack. But earlier in
> the development of that stack it was often best to compile it from source,
> due to versions lagging and distro maintainers making assumptions that
> weren't well honed. In the first few years of any new stack, shouldn't we
> expect that many sysadmins will be in the same position?
>
> It's best if there's some defined subset of programs whose "make install"
> options, by default, will produce a coherent stack.
I'm not sure how special libvirt & qemu are. You could try installing
to a local prefix (I sometimes use "./configure --prefix=$HOME/gnu").
Then you have to sort out the environment variables that need setting.
I don't think libvirt or libguestfs or qemu document what environment
variables should be set to run an internally consistent local copy
of the entire libvirt/KVM stack from your home directory.
libguestfs has the "./run" script which can be modified.
Anyone got any thoughts? I think it is a genuine concern.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
12 years, 2 months
[libvirt] [PATCH 1/2] parallels: remove unused member 'os' from parallelsDomObj
by Dmitry Guryanov
Signed-off-by: Dmitry Guryanov <dguryanov(a)parallels.com>
---
src/parallels/parallels_utils.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/parallels/parallels_utils.h b/src/parallels/parallels_utils.h
index 082ee75..6a27003 100644
--- a/src/parallels/parallels_utils.h
+++ b/src/parallels/parallels_utils.h
@@ -44,7 +44,6 @@ typedef struct _parallelsConn *parallelsConnPtr;
struct parallelsDomObj {
int id;
char *uuid;
- char *os;
};
typedef struct parallelsDomObj *parallelsDomObjPtr;
--
1.7.1
12 years, 2 months
[libvirt] S4 event, states and caveats
by Martin Kletzander
Hi everybody,
I'm going to add support for S4 event for libvirt and I'm thinking for a
while now how to do that, so I'd like to discuss this here on the list
before doing something wrong and mainly to eliminate bothering you guys
with reviews of PATCH v5 etc.
QEMU emits SUSPEND_DISK event before SHUTDOWN and then shuts down as
usual when the guest is powering off. At first I wanted to add it the
same way the support for SUSPEND was added, but when I come to think of
it, this needs a little bit more.
My main questions are:
- What state should the machine have after it stops?
a) pmsuspended (optionally with new reason)
b) shutoff (ditto)
c) new state (pmsuspended-disk for example)
- How should we behave when dompmwakeup is called for such domain?
- How should we behave when destroy is called for such domain?
- How do we store the domain state persistently between restarts?
- Should there be new lifecycle event to distinguish suspend to disk
from poweroff?
Plus you might have some additional things what to care about. In that
case please let me know so it's been dealt with at the start.
I'm inclining to new state for the domain (just because suspend to disk
doesn't seem like a new "reason" to me) which can be woken up by the
pmwakeup call (that would be basically the same as starting it).
It's hard for me to say if destroy should reset the state. Even when it
is prohibited, the machine can be recreated with the same disk and thus
achieving the same result with a workaround.
We can probably allow removing and changing devices connected as well as
other settings of the domain. It is then problem of QEMU, it's BIOS and
mainly the guest OS to deal with it, so basically it can be blamed on
the user who did that :) If we don't allow that, the same rule with the
workaround applies here anyway.
I know Michal was thinking about how to store the data for the domain
state because of transient devices etc. His idea was to save the files
somewhere else than /var/run. I'd do that, but just for those suspended
to disk.
I'd add a lifecycle event with lifecycle control in the domain XML (now
supported for poweroff, reboot and crash).
Thanks for any remarks, additions, hints and replies.
Have a nice day,
Martin
12 years, 2 months
[libvirt] [PATCH] Remove explicit dependency on ceph RPM
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The libvirt storage driver uses librbd.so for its functionality.
RPM will automatically add a dependency on the library, so there
is no need to have an explicit dependency on the ceph RPM itself.
This allows newer Fedora distros to avoid pulling in the huge
ceph RPM, in favour of just having the libraries installed
---
libvirt.spec.in | 4 ----
1 file changed, 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 9a1feed..523ac0a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -649,10 +649,6 @@ Requires: device-mapper
# For multipath support
Requires: device-mapper
%endif
-%if %{with_storage_rbd}
-# For RBD support
-Requires: ceph
-%endif
%if %{with_storage_sheepdog}
# For Sheepdog support
Requires: sheepdog
--
1.7.11.2
12 years, 2 months
[libvirt] [PATCH] conf: describe security_driver behavior
by Martin Kletzander
As a request was raised for this, I added few lines in the "Notes"
part of the "security_driver" comments about allowed values.
---
The related bug for this patch is here:
https://bugzilla.redhat.com/show_bug.cgi?id=853925
src/qemu/qemu.conf | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index d3175fa..f0ba163 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -164,7 +164,10 @@
#
# security_driver = [ "selinux", "apparmor" ]
#
-# Note: The DAC security driver is always enabled.
+# Notes: The DAC security driver is always enabled, setting the
+# security_driver to that value is not allowed as well as adding "dac"
+# into the list of security drivers. Value "none" is special value and
+# cannot be used in the list of security drivers.
#
#security_driver = "selinux"
--
1.7.12
12 years, 2 months
[libvirt] [PATCH] docs: correct dompmwakeup description
by Martin Kletzander
The command 'dompmwakeup' can wakeup any pmsuspended domain, not only
domains suspended previously by dompmsuspend and this patch fixed the
man page and help string for that.
---
tools/virsh-domain.c | 6 +++---
tools/virsh.pod | 7 ++++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index f0ec742..45c5c48 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -2242,9 +2242,9 @@ cleanup:
*/
static const vshCmdInfo info_dom_pm_wakeup[] = {
- {"help", N_("wakeup a domain suspended by dompmsuspend command")},
- {"desc", N_("Wakeup a domain previously suspended "
- "by dompmsuspend command.")},
+ {"help", N_("wakeup a domain from pmsuspended state")},
+ {"desc", N_("Wakeup a domain that was previously suspended "
+ "by power management.")},
{NULL, NULL}
};
diff --git a/tools/virsh.pod b/tools/virsh.pod
index a26c420..dca5288 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1523,9 +1523,10 @@ domain's guest OS.
=item B<dompmwakeup> I<domain>
-Wakeup a domain suspended by dompmsuspend command. Injects a wakeup
-into the guest that previously used dompmsuspend, rather than waiting
-for the previously requested duration (if any) to elapse.
+Wakeup a domain from pmsuspended state (either suspended by dompmsuspend or
+from the guest itself). Injects a wakeup into the guest that is in pmsuspended
+state, rather than waiting for the previously requested duration (if any) to
+elapse. This operation doesn't not necessarily fail if the domain is running.
=item B<ttyconsole> I<domain>
--
1.7.12
12 years, 2 months
[libvirt] [PATCH 0/2] interface driver build cleanup and udev backend addition
by Doug Goldstein
Refactored the cross use of netcf and interface for the interface driver into
only interface driver references. Made netcf the primary backend provider for
the interface driver. Added a udev based read-only interface driver backend to
be used when netcf support is not built in.
Untested:
* udev: Does it display devices that are part of a bond.
* netcf: developed all this on distros without netcf support.
Unknown:
* Should virInterfaceGetXMLDesc() be implemented for the udev backend?
It will as a result contain a lot less info than the netcf based backend
would for the same device (e.g. does the device start on boot).
Doug Goldstein (2):
build: define WITH_INTERFACE for the driver
interface: add udev based backend for virInterface
configure.ac | 37 ++-
daemon/Makefile.am | 2 +-
daemon/libvirtd.c | 8 +-
src/Makefile.am | 34 ++-
.../{netcf_driver.c => interface_backend_netcf.c} | 2 +-
src/interface/interface_backend_udev.c | 377 ++++++++++++++++++++
.../{netcf_driver.h => interface_driver.h} | 0
tests/virdrivermoduletest.c | 2 +-
tools/virsh.c | 4 +-
9 files changed, 449 insertions(+), 17 deletions(-)
rename src/interface/{netcf_driver.c => interface_backend_netcf.c} (99%)
create mode 100644 src/interface/interface_backend_udev.c
rename src/interface/{netcf_driver.h => interface_driver.h} (100%)
--
1.7.8.6
12 years, 2 months
[libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).
by Jasper Lievisse Adriaanse
>From b53dc971cc50b5ac397e4568449d25041477c8d6 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper(a)humppa.nl>
Date: Tue, 4 Sep 2012 16:47:26 +0200
Subject: [PATCH] Pass a correct pointer type to localtime_r(3).
Fixes a warning:
warning: passing argument 1 of 'localtime_r' from incompatible pointer type
---
tools/virsh-domain.c | 3 ++-
tools/virsh.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index f0ec742..535779c 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -3711,6 +3711,7 @@ vshGenFileName(vshControl *ctl, virDomainPtr dom, const char *mime)
struct tm time_info;
const char *ext = NULL;
char *ret = NULL;
+ time_t sec = (time_t) cur_time.tv_sec;
if (!dom) {
vshError(ctl, "%s", _("Invalid domain supplied"));
@@ -3724,7 +3725,7 @@ vshGenFileName(vshControl *ctl, virDomainPtr dom, const char *mime)
/* add mime type here */
gettimeofday(&cur_time, NULL);
- localtime_r(&cur_time.tv_sec, &time_info);
+ localtime_r(&sec, &time_info);
strftime(timestr, sizeof(timestr), "%Y-%m-%d-%H:%M:%S", &time_info);
if (virAsprintf(&ret, "%s-%s%s", virDomainGetName(dom),
diff --git a/tools/virsh.c b/tools/virsh.c
index 5cf3237..5be2a3c 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2189,6 +2189,7 @@ vshOutputLogFile(vshControl *ctl, int log_level, const char *msg_format,
const char *lvl = "";
struct timeval stTimeval;
struct tm *stTm;
+ time_t sec = stTimeval.tv_sec;
if (ctl->log_fd == -1)
return;
@@ -2199,7 +2200,7 @@ vshOutputLogFile(vshControl *ctl, int log_level, const char *msg_format,
* [YYYY.MM.DD HH:MM:SS SIGNATURE PID] LOG_LEVEL message
*/
gettimeofday(&stTimeval, NULL);
- stTm = localtime(&stTimeval.tv_sec);
+ stTm = localtime(&sec);
virBufferAsprintf(&buf, "[%d.%02d.%02d %02d:%02d:%02d %s %d] ",
(1900 + stTm->tm_year),
(1 + stTm->tm_mon),
--
1.7.6
--
Cheers,
Jasper
"Stay Hungry. Stay Foolish"
12 years, 2 months
[libvirt] patch for dnsmasq parameters is not complete
by Gene Czarcinski
Although the patch with "--domain xxx --local=/xxx/" for dnsmasq command
line parameters is good as far as it goes, it is not complete. As it
is, dnsmasq will no longer forward names in its name-domain, but it will
forward reverse lookup (IP address) queries.
I am going to need to look at the code more.
Instead of "--domain virt --local=/virt/" or just "--local=//"
they need to look something like:
"--domain virt --local=/virt/ --local=/122.168.192.in-addr.arpa/"
or
"--local=// --local=/122.168.192.in-addr.arpa/".
I have dome some virtual testing and manually configured dnsmasq in a
virtual machine and adding the second "--local" works rather well.
Coming up with a new patch that works, that will take a lot more effort.
Gene
12 years, 2 months
[libvirt] [PATCH] Don't link with -lrt on OpenBSD
by Jasper Lievisse Adriaanse
>From bdf3bce37531ec346474bc5c4f37a5d2985d1d35 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper(a)humppa.nl>
Date: Tue, 4 Sep 2012 17:03:43 +0200
Subject: [PATCH] Don't link with -lrt on OpenBSD
---
configure.ac | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index e0d00d5..54d049d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,7 +188,13 @@ RT_LIBS=
LIBS="$LIBS $LIB_PTHREAD -lrt"
AC_CHECK_FUNC([clock_gettime],[
AC_DEFINE([HAVE_CLOCK_GETTIME],[],[Defined if clock_gettime() exists in librt.so])
- RT_LIBS=-lrt
+ case "$host" in
+ *-*-openbsd*)
+ ;;
+ *)
+ RT_LIBS=-lrt
+ ;;
+ esac
])
LIBS=$old_libs
AC_SUBST(RT_LIBS)
--
1.7.6
--
Cheers,
Jasper
"Stay Hungry. Stay Foolish"
12 years, 2 months