[libvirt] [PATCH] qemu: Fix error message mentioning VNC instead of SPICE
by Peter Krempa
---
Simpe cut&paste error. Pushed under trivial rule.
Peter
src/qemu/qemu_hotplug.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 3adec48..4c1705d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1397,7 +1397,7 @@ qemuDomainChangeGraphics(struct qemud_driver *driver,
}
if (STRNEQ_NULLABLE(oldListenNetwork,newListenNetwork)) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("cannot change listen network setting on vnc graphics"));
+ _("cannot change listen network setting on spice graphics"));
return -1;
}
if (STRNEQ_NULLABLE(olddev->data.spice.keymap,
--
1.7.3.4
13 years, 1 month
[libvirt] libguestfs integration: rich disk access for libvirt applications
by Stefan Hajnoczi
Libguestfs provides very nice functionality for applications that need
to work with disk images. The includes provisioning applications that
set up or customize disk images. It also includes backup applications
that want to look inside disk image snapshots - both at the block and
file level.
What's missing for libguestfs to fill this role is integration that
allows libvirt and libguestfs to work together with the same
network-transparent remote API approach.
In the past we have discussed remoting libguestfs and Richard
presented possible approaches:
https://www.redhat.com/archives/libguestfs/2011-May/msg00093.html
Could libvirt could provide a secure channel over which the libguestfs
client that an application is linked against talks to the remote
guestfsd?
Would libguestfs need some new parameters to connect to a remote
libvirtd and create its appliance VM?
In terms of application use cases, I'm thinking along the lines of
using libvirt to enumerate storage volumes and then switching to
libguestfs to actually access the storage volume remotely. Is there
enough information exposed by libvirt today to switch over to
libguestfs and point it at the storage volume/image file?
Stefan
13 years, 1 month
[libvirt] [PATCH 0/2] Improve timestamps in log messages
by Jiri Denemark
Jiri Denemark (2):
logging: Do not log timestamp through syslog
logging: Add date to log timestamp
src/util/logging.c | 123 +++++++++++++++++++++++++++++++--------------------
src/util/logging.h | 9 ++--
2 files changed, 80 insertions(+), 52 deletions(-)
--
1.7.6.1
13 years, 1 month
Re: [libvirt] [libvirt-glib 8/9] Connect a bunch of domain event to signals
by Daniel P. Berrange
On Thu, Sep 29, 2011 at 02:25:43PM +0300, Zeeshan Ali (Khattak) wrote:
> On Thu, Sep 29, 2011 at 11:45 AM, Daniel P. Berrange
> <berrange(a)redhat.com> wrote:
> > On Wed, Sep 28, 2011 at 09:30:57PM +0200, Marc-André Lureau wrote:
> >> ---
> >> libvirt-gobject/libvirt-gobject-connection.c | 126 ++++++++++++++++++++++++++
> >> 1 files changed, 126 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
> >> index e99a08d..34781e6 100644
> >> --- a/libvirt-gobject/libvirt-gobject-connection.c
> >> +++ b/libvirt-gobject/libvirt-gobject-connection.c
> >
> >> @@ -277,6 +398,10 @@ gboolean gvir_connection_open(GVirConnection *conn,
> >> return FALSE;
> >> }
> >>
> >> + if (virConnectDomainEventRegister(priv->conn, domain_event_cb, conn, NULL) == -1) {
> >> + g_warning("Failed to register domain events, ignoring");
> >> + }
> >> +
> >
> > You might have noticed that we jump through some horrific hoops in
> > gvir_connection_fetch_domains(). The reason for this is so that we
> > can issue fake event notifications for start/stopped/added/removed
> > when virConnectDomainEventRegister() is not available. Not all hypervisors
> > support the virConnectDomainEventRegister() API, so we need that fallback
> > code. When you succesfully call virConnectDomainEventRegister(), we should
> > disable the event emitting part at the end of gvir_connection_fetch_domains()
> > to avoid duplicate events.
>
> In that case, create_domain() method should emit the signal too when
> event didn't register?
If 'create_domain' updates the hash table directly with the new guest
object, then, yes it should emit a signal.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
13 years, 1 month
[libvirt] [libvirt-glib 8/9] Connect a bunch of domain event to signals
by Zeeshan Ali (Khattak)
Forgot to hit 'reply-all' :(
---------- Forwarded message ----------
From: Zeeshan Ali (Khattak) <zeeshanak(a)gnome.org>
Date: Thu, Sep 29, 2011 at 2:25 PM
Subject: Re: [libvirt] [libvirt-glib 8/9] Connect a bunch of domain
event to signals
To: "Daniel P. Berrange" <berrange(a)redhat.com>
On Thu, Sep 29, 2011 at 11:45 AM, Daniel P. Berrange
<berrange(a)redhat.com> wrote:
> On Wed, Sep 28, 2011 at 09:30:57PM +0200, Marc-André Lureau wrote:
>> ---
>> libvirt-gobject/libvirt-gobject-connection.c | 126 ++++++++++++++++++++++++++
>> 1 files changed, 126 insertions(+), 0 deletions(-)
>>
>> diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
>> index e99a08d..34781e6 100644
>> --- a/libvirt-gobject/libvirt-gobject-connection.c
>> +++ b/libvirt-gobject/libvirt-gobject-connection.c
>
>> @@ -277,6 +398,10 @@ gboolean gvir_connection_open(GVirConnection *conn,
>> return FALSE;
>> }
>>
>> + if (virConnectDomainEventRegister(priv->conn, domain_event_cb, conn, NULL) == -1) {
>> + g_warning("Failed to register domain events, ignoring");
>> + }
>> +
>
> You might have noticed that we jump through some horrific hoops in
> gvir_connection_fetch_domains(). The reason for this is so that we
> can issue fake event notifications for start/stopped/added/removed
> when virConnectDomainEventRegister() is not available. Not all hypervisors
> support the virConnectDomainEventRegister() API, so we need that fallback
> code. When you succesfully call virConnectDomainEventRegister(), we should
> disable the event emitting part at the end of gvir_connection_fetch_domains()
> to avoid duplicate events.
In that case, create_domain() method should emit the signal too when
event didn't register?
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
13 years, 1 month
[libvirt] [libvirt-glib 1/9] doc: add some missing return value documentation
by Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau(a)gmail.com>
---
libvirt-gobject/libvirt-gobject-stream.c | 1 +
libvirt-gobject/libvirt-gobject-stream.h | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libvirt-gobject/libvirt-gobject-stream.c b/libvirt-gobject/libvirt-gobject-stream.c
index 255ad73..519d733 100644
--- a/libvirt-gobject/libvirt-gobject-stream.c
+++ b/libvirt-gobject/libvirt-gobject-stream.c
@@ -191,6 +191,7 @@ stream_sink(virStreamPtr st G_GNUC_UNUSED,
* @stream: the stream
* @func: (scope notified): the callback for writing data to application
* @user_data: (closure): data to be passed to @callback
+ * Returns: the number of bytes consumed or -1 upon error
*
* Receive the entire data stream, sending the data to the
* requested data sink. This is simply a convenient alternative
diff --git a/libvirt-gobject/libvirt-gobject-stream.h b/libvirt-gobject/libvirt-gobject-stream.h
index 27fa8b7..fd9c9bb 100644
--- a/libvirt-gobject/libvirt-gobject-stream.h
+++ b/libvirt-gobject/libvirt-gobject-stream.h
@@ -65,6 +65,8 @@ struct _GVirStreamClass
* @buf: data pointer
* @nbytes: data size
* @user_data: user data passed to the function
+ * Returns: the number of bytes filled, 0 upon end
+ * of file, or -1 upon error
*/
typedef gint (* GVirStreamSinkFunc) (GVirStream *stream,
const gchar *buf,
--
1.7.6.2
13 years, 1 month
[libvirt] [PATCH] hyperv: Report an error for acceptable URI schemes with a transport
by Matthias Bolte
Before, URIs such as hyperv+ssh:// have been declined by the Hyper-V
driver resulting in the remote driver trying to connect to an
non-existing libvirtd.
Now such URIs trigger an error in the Hyper-V driver suggesting to
try again without the transport part in the scheme.
---
src/hyperv/hyperv_driver.c | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index b022fee..c26d29f 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -69,6 +69,7 @@ static virDrvOpenStatus
hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
{
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
+ char *plus;
hypervPrivate *priv = NULL;
char *username = NULL;
char *password = NULL;
@@ -77,12 +78,30 @@ hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
- /* Decline if the URI is NULL or the scheme is not hyperv */
- if (conn->uri == NULL || conn->uri->scheme == NULL ||
- STRCASENEQ(conn->uri->scheme, "hyperv")) {
+ /* Decline if the URI is NULL or the scheme is NULL */
+ if (conn->uri == NULL || conn->uri->scheme == NULL) {
return VIR_DRV_OPEN_DECLINED;
}
+ /* Decline if the scheme is not hyperv */
+ plus = strchr(conn->uri->scheme, '+');
+
+ if (plus == NULL) {
+ if (STRCASENEQ(conn->uri->scheme, "hyperv")) {
+ return VIR_DRV_OPEN_DECLINED;
+ }
+ } else {
+ if (plus - conn->uri->scheme != 6 ||
+ STRCASENEQLEN(conn->uri->scheme, "hyperv", 6)) {
+ return VIR_DRV_OPEN_DECLINED;
+ }
+
+ HYPERV_ERROR(VIR_ERR_INVALID_ARG, "%s",
+ _("Transport in URI scheme is not supported, try again "
+ "without the transport part"));
+ return VIR_DRV_OPEN_ERROR;
+ }
+
/* Require server part */
if (conn->uri->server == NULL) {
HYPERV_ERROR(VIR_ERR_INVALID_ARG, "%s",
--
1.7.4.1
13 years, 1 month
[libvirt] [PATCH] esx: Report an error for acceptable URI schemes with a transport
by Matthias Bolte
Before, URIs such as esx+ssh:// have been declined by the ESX driver
resulting in the remote driver trying to connect to an non-existing
libvirtd.
Now such URIs trigger and error in the ESX driver suggesting to try
again without the transport part in the scheme.
---
src/esx/esx_driver.c | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index f1102ea..c81eca8 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -938,20 +938,41 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
{
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
+ char *plus;
esxPrivate *priv = NULL;
char *potentialVCenterIpAddress = NULL;
char vCenterIpAddress[NI_MAXHOST] = "";
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
- /* Decline if the URI is NULL or the scheme is not one of {vpx|esx|gsx} */
- if (conn->uri == NULL || conn->uri->scheme == NULL ||
- (STRCASENEQ(conn->uri->scheme, "vpx") &&
- STRCASENEQ(conn->uri->scheme, "esx") &&
- STRCASENEQ(conn->uri->scheme, "gsx"))) {
+ /* Decline if the URI is NULL or the scheme is NULL */
+ if (conn->uri == NULL || conn->uri->scheme == NULL) {
return VIR_DRV_OPEN_DECLINED;
}
+ /* Decline if the scheme is not one of {vpx|esx|gsx} */
+ plus = strchr(conn->uri->scheme, '+');
+
+ if (plus == NULL) {
+ if (STRCASENEQ(conn->uri->scheme, "vpx") &&
+ STRCASENEQ(conn->uri->scheme, "esx") &&
+ STRCASENEQ(conn->uri->scheme, "gsx")) {
+ return VIR_DRV_OPEN_DECLINED;
+ }
+ } else {
+ if (plus - conn->uri->scheme != 3 ||
+ (STRCASENEQLEN(conn->uri->scheme, "vpx", 3) &&
+ STRCASENEQLEN(conn->uri->scheme, "esx", 3) &&
+ STRCASENEQLEN(conn->uri->scheme, "gsx", 3))) {
+ return VIR_DRV_OPEN_DECLINED;
+ }
+
+ ESX_ERROR(VIR_ERR_INVALID_ARG, "%s",
+ _("Transport in URI scheme is not supported, try again "
+ "without the transport part"));
+ return VIR_DRV_OPEN_ERROR;
+ }
+
/* Require server part */
if (conn->uri->server == NULL) {
ESX_ERROR(VIR_ERR_INVALID_ARG, "%s",
--
1.7.4.1
13 years, 1 month
[libvirt] [libvirt-glib 1/2] Actually provide gvir_storage_vol_get_path()
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
This was only declared in header previously but not implemented.
---
libvirt-gobject/libvirt-gobject-storage-vol.c | 11 +++++++++++
libvirt-gobject/libvirt-gobject.sym | 1 +
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c b/libvirt-gobject/libvirt-gobject-storage-vol.c
index b94f6cf..6cbae84 100644
--- a/libvirt-gobject/libvirt-gobject-storage-vol.c
+++ b/libvirt-gobject/libvirt-gobject-storage-vol.c
@@ -182,6 +182,17 @@ const gchar *gvir_storage_vol_get_name(GVirStorageVol *vol)
return name;
}
+const gchar *gvir_storage_vol_get_path(GVirStorageVol *vol)
+{
+ GVirStorageVolPrivate *priv = vol->priv;
+ const char *path;
+
+ if (!(path = virStorageVolGetPath(priv->handle))) {
+ g_error("Failed to get storage_vol path on %p", priv->handle);
+ }
+
+ return path;
+}
/**
* gvir_storage_vol_get_config:
diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
index ff2f4cf..ea4ec38 100644
--- a/libvirt-gobject/libvirt-gobject.sym
+++ b/libvirt-gobject/libvirt-gobject.sym
@@ -83,6 +83,7 @@ LIBVIRT_GOBJECT_0.0.1 {
gvir_storage_vol_get_type;
gvir_storage_vol_handle_get_type;
gvir_storage_vol_get_name;
+ gvir_storage_vol_get_path;
gvir_storage_vol_get_config;
gvir_connection_handle_get_type;
--
1.7.6.2
13 years, 1 month
Re: [libvirt] [fedora-virt] Guest can no longer be bootet with libvirt 0.9.6 from virt-preview repo
by Eric Blake
[adding libvirt list]
On 09/28/2011 09:24 AM, Dennis Jacobfeuerborn wrote:
>>>>> I just noticed that once I upgrade to libvirt-0.9.6-1 from the
>>>>> virt-preview
>>>>> repo on my Fedora 15 machine I can no longer boot guests that use virtio
>>>>> disks. I only get "Boot failed: could not read the boot disk".
>>>>> Removing the disk and re-adding it as IDE drive allows KVM to boot from
>>>>> the
>>>>> disk (although the full boot obviously fails due to the hda/vda naming
>>>>> difference but that's expected).
>>>>>
>>>>> After downgrading to libvirt-0.8.8-7 again the problem goes away and the
>>>>> guest boot fine from virtio disks.
>>>>>
>>
>> Somewhere around 0.9.4 libvirt switched to use a different method to
>> indicate from which device to boot.
>> See http://libvirt.org/git/?p=libvirt.git;a=commit;h=c3068d4d2381146ed46051ad...
>>
>> I think this causes Seabios to skip using extboot.bin for booting and
>> to try to directly boot from a disk.
>> If your Seabios version is too old, it won't support booting from
>> virtio disks directly.
>>
>
> The libvirt package should probably be updated to require seabios-bin>= 0.6.2.
Yes, that probably needs to happen to libvirt.spec when built for F16
(and thus imported into F15 via virt-preview). I'll tackle that, since
I've been making a couple other spec file patches lately.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
13 years, 1 month