[libvirt] Problems live migrating a Windows VM - Inconsistent?
by Shawn Starr
Hello,
I noticed some issues migrating a VM
1) I had to have ssh key authentication exchanged or it would refuse to
connect tunneled to the remote libvirtd server
2) When it attempts to finish live migrating the VM it fails saying it can't
find the domain on the remote libvirtd server host
However, if I run the command again to migrate, it DOES migrate the VM over, however the Windows guest is not usable, cant type/use mouse, but i can see the VM display fine. I can gracefully shut the VM down from virt-manager and
I see the VM shut down gracefully from display attached via spice.
This seems like two bugs?
Versions:
host kernel: 3.6.0-0.rc7.git0.1.fc18.x86_64
libvirt-XXXXXXX-0.10.2-3.fc18.x86_64
qemu-kvm-1.2.0-8.fc18.x86_64 (will upgrade to latest on koji but unrelated I believe)
Command:
LIBVIRT_DEBUG=1 virsh --debug=4 migrate --verbose --live --tunnelled --p2p Windows_7 qemu+ssh://root@172.18.2.3/system
Output:
...
<snip>
2012-09-30 17:59:14.814+0000: 24710: debug : virKeepAliveCheckMessage:384 : ka=0x266a470, client=0x2669ee0, msg=0x2669f48
2012-09-30 17:59:14.814+0000: 24710: debug : virNetClientIOEventLoopRemoveDone:1380 : Waking up sleep 0x2669cb0
2012-09-30 17:59:14.814+0000: 24708: debug : virNetClientIO:1754 : Woken up from sleep head=0x7f4830400e60 call=0x2669cb0
2012-09-30 17:59:14.814+0000: 24708: debug : virNetClientIO:1807 : All done with our call head=0x7f4830400e60 call=0x2669cb0 rv=0
2012-09-30 17:59:14.814+0000: 24708: debug : virNetMessageFree:73 : msg=0x2669640 nfds=0 cb=(nil)
Migration: [ 95 %]2012-09-30 17:59:15.315+0000: 24708: debug : virDomainGetJobInfo:17129 : dom=0x2669e70, (VM: name=Windows, uuid=41562d70-d0a8-25bc-10ec-a3dc46b3d258), info=0x7fffb64d72d0
2012-09-30 17:59:15.315+0000: 24708: debug : virNetMessageNew:45 : msg=0x2669640 tracked=0
2012-09-30 17:59:15.315+0000: 24708: debug : virNetMessageEncodePayload:358 : Encode length as 64
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientSendInternal:1955 : RPC_CLIENT_MSG_TX_QUEUE: client=0x2669ee0 len=64 prog=536903814 vers=1 proc=163 type=0 status=0 serial=50
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientCallNew:1908 : New call 0x2669150: msg=0x2669640, expectReply=1, nonBlock=0
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientIO:1718 : Outgoing message prog=536903814 version=1 serial=50 proc=163 type=0 length=64 dispatch=0x7f4830400e60
2012-09-30 17:59:15.315+0000: 24708: debug : virNetClientIO:1744 : Going to sleep head=0x7f4830400e60 call=0x2669150
2012-09-30 17:59:15.315+0000: 24710: debug : virNetClientIOEventLoop:1558 : Woken up from poll by other thread
2012-09-30 17:59:15.317+0000: 24710: debug : virNetMessageDecodeLength:152 : Got length, now need 120 total (116 more)
2012-09-30 17:59:15.317+0000: 24710: debug : virNetClientCallDispatch:1127 : RPC_CLIENT_MSG_RX: client=0x2669ee0 len=120 prog=536903814 vers=1 proc=163 type=1 status=0 serial=50
2012-09-30 17:59:15.317+0000: 24710: debug : virKeepAliveCheckMessage:384 : ka=0x266a470, client=0x2669ee0, msg=0x2669f48
2012-09-30 17:59:15.317+0000: 24710: debug : virNetClientIOEventLoopRemoveDone:1380 : Waking up sleep 0x2669150
2012-09-30 17:59:15.317+0000: 24708: debug : virNetClientIO:1754 : Woken up from sleep head=0x7f4830400e60 call=0x2669150
2012-09-30 17:59:15.317+0000: 24708: debug : virNetClientIO:1807 : All done with our call head=0x7f4830400e60 call=0x2669150 rv=0
2012-09-30 17:59:15.317+0000: 24708: debug : virNetMessageFree:73 : msg=0x2669640 nfds=0 cb=(nil)
Migration: [ 95 %]2012-09-30 17:59:15.751+0000: 24710: debug : virNetMessageDecodeLength:152 : Got length, now need 204 total (200 more)
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientCallDispatch:1127 : RPC_CLIENT_MSG_RX: client=0x2669ee0 len=204 prog=536903814 vers=1 proc=216 type=1 status=1 serial=8
2012-09-30 17:59:15.751+0000: 24710: debug : virKeepAliveCheckMessage:384 : ka=0x266a470, client=0x2669ee0, msg=0x2669f48
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientIOEventLoopPassTheBuck:1424 : Giving up the buck 0x7f4830400e60
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientIOEventLoopPassTheBuck:1438 : No thread to pass the buck to
2012-09-30 17:59:15.751+0000: 24710: debug : virEventPollUpdateHandle:146 : EVENT_POLL_UPDATE_HANDLE: watch=2 events=1
2012-09-30 17:59:15.751+0000: 24710: debug : virEventPollInterruptLocked:701 : Interrupting
2012-09-30 17:59:15.751+0000: 24710: debug : virNetClientIO:1807 : All done with our call head=(nil) call=0x7f4830400e60 rv=0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollRunOnce:625 : Poll got 1 event(s)
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchTimeouts:410 : Dispatch 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchHandles:455 : Dispatch 1
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchHandles:469 : i=0 w=1
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollDispatchHandles:483 : EVENT_POLL_DISPATCH_HANDLE: watch=1 events=1
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:501 : Cleanup 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:537 : Found 0 out of 0 timeout slots used, releasing 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupHandles:549 : Cleanup 2
2012-09-30 17:59:15.751+0000: 24709: debug : virEventRunDefaultImpl:244 : running default event implementation
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:501 : Cleanup 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupTimeouts:537 : Found 0 out of 0 timeout slots used, releasing 0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCleanupHandles:549 : Cleanup 2
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollMakePollFDs:378 : Prepare n=0 w=1, f=4 e=1 d=0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollMakePollFDs:378 : Prepare n=1 w=2, f=6 e=1 d=0
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCalculateTimeout:320 : Calculate expiry of 0 timers
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollCalculateTimeout:346 : Timeout at 0 due in -1 ms
2012-09-30 17:59:15.751+0000: 24709: debug : virEventPollRunOnce:614 : EVENT_POLL_RUN: nhandles=2 timeout=-1
2012-09-30 17:59:15.751+0000: 24710: debug : virNetMessageFree:73 : msg=0x7f4830000de0 nfds=0 cb=(nil)
2012-09-30 17:59:15.751+0000: 24710: debug : virDomainFree:2281 : dom=0x7f4830000af0, (VM: name=Windows, uuid=41562d70-d0a8-25bc-10ec-a3dc46b3d258)
2012-09-30 17:59:15.751+0000: 24710: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x7f4830000af0
2012-09-30 17:59:15.751+0000: 24710: debug : virObjectUnref:137 : OBJECT_DISPOSE: obj=0x7f4830000af0
2012-09-30 17:59:15.751+0000: 24710: debug : virDomainDispose:225 : release domain 0x7f4830000af0 Windows 41562d70-d0a8-25bc-10ec-a3dc46b3d258
2012-09-30 17:59:15.751+0000: 24710: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x26693b0
2012-09-30 17:59:15.751+0000: 24708: debug : virDomainFree:2281 : dom=0x2669e70, (VM: name=Windows, uuid=41562d70-d0a8-25bc-10ec-a3dc46b3d258)
2012-09-30 17:59:15.751+0000: 24708: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x2669e70
2012-09-30 17:59:15.751+0000: 24708: debug : virObjectUnref:137 : OBJECT_DISPOSE: obj=0x2669e70
2012-09-30 17:59:15.751+0000: 24708: debug : virDomainDispose:225 : release domain 0x2669e70 Windows 41562d70-d0a8-25bc-10ec-a3dc46b3d258
2012-09-30 17:59:15.752+0000: 24708: debug : virObjectUnref:135 : OBJECT_UNREF: obj=0x26693b0
2012-09-30 17:59:15.752+0000: 24708: debug : virFileClose:72 : Closed fd 9
2012-09-30 17:59:15.752+0000: 24708: debug : virFileClose:72 : Closed fd 10
error: Domain not found: no domain with matching name 'Windows'
12 years, 6 months
[libvirt] [libvirt-glib PATCH] Add wrappers for virDomainPMWakeup
by Alexander Larsson
---
libvirt-gobject/libvirt-gobject-domain.c | 87 ++++++++++++++++++++++++++++++++
libvirt-gobject/libvirt-gobject-domain.h | 11 ++++
libvirt-gobject/libvirt-gobject.sym | 4 ++
3 files changed, 102 insertions(+)
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index f8ad493..8ade3ea 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -514,6 +514,93 @@ gboolean gvir_domain_resume_finish(GVirDomain *dom,
}
/**
+ * gvir_domain_wakeup:
+ * @dom: the domain
+ * @flags: placeholder for flags, pass 0
+ * @err: Place-holder for possible errors
+ *
+ * Returns: TRUE on success
+ */
+gboolean gvir_domain_wakeup(GVirDomain *dom,
+ guint flags,
+ GError **err)
+{
+ GVirDomainPrivate *priv;
+
+ g_return_val_if_fail(GVIR_IS_DOMAIN(dom), FALSE);
+ g_return_val_if_fail(err == NULL || *err == NULL, FALSE);
+
+ priv = dom->priv;
+ if (virDomainPMWakeup(priv->handle, flags) < 0) {
+ gvir_set_error_literal(err, GVIR_DOMAIN_ERROR,
+ 0,
+ "Unable to wakeup domain");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+gvir_domain_wakeup_helper(GSimpleAsyncResult *res,
+ GObject *object,
+ GCancellable *cancellable G_GNUC_UNUSED)
+{
+ GVirDomain *dom = GVIR_DOMAIN(object);
+ GError *err = NULL;
+
+ if (!gvir_domain_wakeup(dom, (guint)g_simple_async_result_get_op_res_gssize(res), &err))
+ g_simple_async_result_take_error(res, err);
+}
+
+/**
+ * gvir_domain_wakeup_async:
+ * @dom: the domain to wakeup
+ * @flags: placeholder for flags, pass 0
+ * @cancellable: (allow-none)(transfer none): cancellation object
+ * @callback: (scope async): completion callback
+ * @user_data: (closure): opaque data for callback
+ *
+ * Asynchronous variant of #gvir_domain_wakeup.
+ */
+void gvir_domain_wakeup_async(GVirDomain *dom,
+ guint flags,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *res;
+
+ g_return_if_fail(GVIR_IS_DOMAIN(dom));
+ g_return_if_fail((cancellable == NULL) || G_IS_CANCELLABLE(cancellable));
+
+ res = g_simple_async_result_new(G_OBJECT(dom),
+ callback,
+ user_data,
+ gvir_domain_wakeup_async);
+ g_simple_async_result_set_op_res_gssize (res, (gssize)flags);
+ g_simple_async_result_run_in_thread(res,
+ gvir_domain_wakeup_helper,
+ G_PRIORITY_DEFAULT,
+ cancellable);
+ g_object_unref(res);
+}
+
+gboolean gvir_domain_wakeup_finish(GVirDomain *dom,
+ GAsyncResult *result,
+ GError **err)
+{
+ g_return_val_if_fail(GVIR_IS_DOMAIN(dom), FALSE);
+ g_return_val_if_fail(g_simple_async_result_is_valid(result, G_OBJECT(dom), gvir_domain_wakeup_async), FALSE);
+ g_return_val_if_fail(err == NULL || *err == NULL, FALSE);
+
+ if (g_simple_async_result_propagate_error(G_SIMPLE_ASYNC_RESULT(result), err))
+ return FALSE;
+
+ return TRUE;
+}
+
+/**
* gvir_domain_stop:
* @dom: the domain
* @flags: the flags
diff --git a/libvirt-gobject/libvirt-gobject-domain.h b/libvirt-gobject/libvirt-gobject-domain.h
index fc2db7c..6e7b10d 100644
--- a/libvirt-gobject/libvirt-gobject-domain.h
+++ b/libvirt-gobject/libvirt-gobject-domain.h
@@ -198,6 +198,17 @@ void gvir_domain_resume_async(GVirDomain *dom,
gboolean gvir_domain_resume_finish(GVirDomain *dom,
GAsyncResult *result,
GError **err);
+gboolean gvir_domain_wakeup(GVirDomain *dom,
+ guint flags,
+ GError **err);
+void gvir_domain_wakeup_async(GVirDomain *dom,
+ guint flags,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean gvir_domain_wakeup_finish(GVirDomain *dom,
+ GAsyncResult *result,
+ GError **err);
gboolean gvir_domain_stop(GVirDomain *dom,
guint flags,
GError **err);
diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
index c496540..3a40a8a 100644
--- a/libvirt-gobject/libvirt-gobject.sym
+++ b/libvirt-gobject/libvirt-gobject.sym
@@ -198,6 +198,10 @@ LIBVIRT_GOBJECT_0.1.3 {
global:
gvir_connection_get_hypervisor_name;
gvir_connection_get_version;
+
+ gvir_domain_wakeup;
+ gvir_domain_wakeup_async;
+ gvir_domain_wakeup_finish;
} LIBVIRT_GOBJECT_0.1.2;
# .... define new API here using predicted next version number ....
--
1.7.12.1
12 years, 6 months
[libvirt] [PATCH] Correct checking of virStrcpyStatic() return value
by Kyle Mestery
Correct the check for the return value of virStrcpyStatic()
when copying port-profile names. Fixes Open vSwitch ports
which utilize port-profiles from network definitions.
Signed-off-by: Kyle Mestery <kmestery(a)cisco.com>
---
src/util/virnetdevvportprofile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
index d774fb1..ac7aa5f 100644
--- a/src/util/virnetdevvportprofile.c
+++ b/src/util/virnetdevvportprofile.c
@@ -374,7 +374,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig,
orig->profileID, mods->profileID);
return -1;
}
- if (virStrcpyStatic(orig->profileID, mods->profileID)) {
+ if (virStrcpyStatic(orig->profileID, mods->profileID) == NULL) {
/* this should never happen - it indicates mods->profileID
* isn't properly null terminated. */
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
--
1.7.11.4
12 years, 6 months
[libvirt] Libvirt arpdstipaddr doesn't work with a subnet
by Brian Haley
Hi,
This is mostly a cut/paste from a bugzilla I just filed,
https://bugzilla.redhat.com/show_bug.cgi?id=862887 - Dave Allan mentioned I
should post it on the mailing list for comments.
I was trying to program up a libvirt nwfilter rule to restrict the ARP
destination IP address (in the request) to be a subnet. I can specify one using
ebtables directly, but not via a filter. Looking on libvirt.org seems to show
it must be an IP address, don't know if anyone's thought about changing that to
support a subnet?
$ libvirtd --version
libvirtd (libvirt) 0.9.8
I created a file that looks something like this:
<filter name='only-arp-dstip-net' chain='arp'>
<rule action='drop' direction='out' priority='550'>
<arp match='no' arpdstipaddr='10.1.2.0/24' />
</rule>
</filter>
But when it's defined, it loses the arpdstipaddr part:
<filter name='only-arp-dstip-net' chain='arp' priority='-500'>
<uuid>a4f2f8a4-a590-b406-e4cd-97580a153545</uuid>
<rule action='drop' direction='out' priority='550'>
<arp/>
</rule>
</filter>
And the corresponding ebtables rule is:
Bridge chain: I-vnet0-arp, entries: 7, policy: ACCEPT
<snip>
-p ARP -j DROP , pcnt = 0 -- bcnt = 0
Using ebtables works:
$ sudo ebtables -t nat -A I-vnet0-arp -p ARP --arp-ip-dst 10.1.2.0/24 -j DROP
Bridge chain: I-vnet0-arp, entries: 7, policy: ACCEPT
<snip>
-p ARP --arp-ip-dst 10.1.2.0/24 -j DROP , pcnt = 0 -- bcnt = 0
The use case I have is that I have a bridge with proxy_arp=1, but I don't want
to respond for all IP addresses, just a certain range. Right now a VM can use
'ping -r -I eth0 $any_ip' and the stack will respond.
Thanks,
-Brian
12 years, 6 months
[libvirt] [PATCH 0/6] track disk formats by storage enum
by Eric Blake
My ongoing work with disk snapshots is having to deal with the
fact that determining the backing chain uses API from
src/util/storage_file.c that expects an enum for storage format,
but the domain XML is tracking the storage type as a string.
Universally tracking things as an enum will make for easier
handling as I make more use of storage_file.c.
Eric Blake (6):
storage: list more file types
storage: treat 'aio' like 'raw' at parse time
storage: match RNG to supported driver types
storage: use enum for default driver type
storage: use enum for disk driver type
storage: use enum for snapshot driver type
docs/schemas/domaincommon.rng | 27 +++++-
docs/schemas/domainsnapshot.rng | 2 +-
src/conf/capabilities.h | 4 +-
src/conf/domain_conf.c | 62 +++++++------
src/conf/domain_conf.h | 4 +-
src/conf/snapshot_conf.c | 23 +++--
src/conf/snapshot_conf.h | 2 +-
src/conf/storage_conf.c | 15 ++-
src/libxl/libxl_conf.c | 42 +++++----
src/libxl/libxl_driver.c | 6 +-
src/qemu/qemu_command.c | 18 ++--
src/qemu/qemu_domain.c | 7 +-
src/qemu/qemu_driver.c | 103 +++++++--------------
src/qemu/qemu_hotplug.c | 9 +-
src/util/storage_file.c | 69 ++++++++++----
src/util/storage_file.h | 8 +-
src/vbox/vbox_tmpl.c | 6 +-
src/xenxs/xen_sxpr.c | 26 ++++--
src/xenxs/xen_xm.c | 28 ++++--
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 2 +-
.../sexpr2xml-disk-block-shareable.xml | 2 +-
.../sexpr2xml-disk-drv-blktap-raw.xml | 2 +-
.../sexpr2xml-disk-drv-blktap2-raw.xml | 2 +-
23 files changed, 269 insertions(+), 200 deletions(-)
--
1.7.11.4
12 years, 6 months
[libvirt] [PATCH] docs: rudimentary phyp documentation
by Eric Blake
Based on a report that phyp is undocumented:
https://www.redhat.com/archives/libvirt-users/2012-July/msg00013.html
* docs/drvphyp.html.in (phyp): New file.
* docs/drivers.html.in: List it.
---
Following up on an old thread. This is probably incomplete or
possibly even inaccurate, but I'd rather have something than nothing.
If I don't get any feedback within a week, I'm pushing this as-is.
docs/drivers.html.in | 1 +
docs/drvphyp.html.in | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
create mode 100644 docs/drvphyp.html.in
diff --git a/docs/drivers.html.in b/docs/drivers.html.in
index 24387d0..307d286 100644
--- a/docs/drivers.html.in
+++ b/docs/drivers.html.in
@@ -29,6 +29,7 @@
<li><strong><a href="drvvmware.html">VMware Workstation/Player</a></strong></li>
<li><strong><a href="drvxen.html">Xen</a></strong></li>
<li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
+ <li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
</ul>
<h2><a name="storage">Storage drivers</a></h2>
diff --git a/docs/drvphyp.html.in b/docs/drvphyp.html.in
new file mode 100644
index 0000000..7d97fa4
--- /dev/null
+++ b/docs/drvphyp.html.in
@@ -0,0 +1,46 @@
+<html><body>
+ <h1>IBM PowerVM hypervisor driver (phyp)</h1>
+ <ul id="toc"></ul>
+ <p>
+ The IBM PowerVM driver can manage both HMC and IVM PowerVM
+ guests. VIOS connections are tunneled through HMC.
+ </p>
+
+
+ <h2><a name="project">Project Links</a></h2>
+ <ul>
+ <li>
+ The <a href="http://www-03.ibm.com/systems/power/software/virtualization/index.html">IBM
+ PowerVM</a> hypervisor
+ </li>
+ </ul>
+
+
+ <h2><a name="uri">Connections to the PowerVM driver</a></h2>
+ <p>
+ Some example remote connection URIs for the driver are:
+ </p>
+<pre>
+phyp://user@hmc/system (HMC connection)
+phyp://user@ivm/system (IVM connection)
+</pre>
+ <p>
+ <strong>Note</strong>: In contrast to other drivers, the
+ PowerVM (or phyp) driver is a client-side-only driver. Therefore, the
+ <a href="remote.html">remote transport mechanism</a> provided by the
+ remote driver and libvirtd will not work, and you cannot use URIs like
+ <code>phyp+ssh://example.com</code>.
+ </p>
+
+
+ <h3><a name="uriformat">URI Format</a></h3>
+ <p>
+ URIs have this general form (<code>[...]</code> marks an
+ optional part, <code>{...|...}</code> marks a mandatory choice).
+ </p>
+<pre>
+phyp://[username@]{hmc|ivm}/managed_system
+</pre>
+ </p>
+
+</body></html>
--
1.7.11.4
12 years, 6 months
[libvirt] [libvirt-glib 1/2] spec: Get min libvirt version from configure.ac
by Christophe Fergeau
The minimum libvirt version we need is duplicated in configure.ac
and libvirt.spec.in. Since libvirt.spec.in already gets some variables
substituted, we can also substitute LIBVIRT_REQUIRED to avoid the
duplication.
---
configure.ac | 1 +
libvirt-glib.spec.in | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 7262322..369b368 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,7 @@ AC_CANONICAL_HOST
AM_SILENT_RULES([yes])
LIBVIRT_REQUIRED=0.9.10
+AC_SUBST([LIBVIRT_REQUIRED]) dnl used in the .spec file
GLIB2_REQUIRED=2.22.0
GOBJECT2_REQUIRED=2.10.0
GIO_REQUIRED=2.10.0
diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in
index e312926..f10c38a 100644
--- a/libvirt-glib.spec.in
+++ b/libvirt-glib.spec.in
@@ -18,7 +18,7 @@
%endif
%define with_vala %{with_introspection}
-%define libvirt_version 0.9.10
+%define libvirt_version @LIBVIRT_REQUIRED@
Name: @PACKAGE@
Version: @VERSION@
--
1.7.12.1
12 years, 6 months
[libvirt] [libvirt-glib 1/2] gobject: Handle PMSUSPENDED state from libvirt
by Christophe Fergeau
Emit a signal when switching to the PMSUSPENDED state, and add
an enum entry to describe this state. This avoids runtime warnings
with newer libvirt.
---
libvirt-gobject/libvirt-gobject-connection.c | 7 +++++++
libvirt-gobject/libvirt-gobject-domain.c | 11 +++++++++++
libvirt-gobject/libvirt-gobject-domain.h | 19 +++++++++++--------
3 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index 428ae38..ad7aa07 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -389,6 +389,13 @@ static int domain_event_cb(virConnectPtr conn G_GNUC_UNUSED,
case VIR_DOMAIN_EVENT_SHUTDOWN:
break;
+ case VIR_DOMAIN_EVENT_PMSUSPENDED:
+ if (detail == VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY)
+ g_signal_emit_by_name(gdom, "pmsuspended::memory");
+ else
+ g_warn_if_reached();
+ break;
+
default:
g_warn_if_reached();
}
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index bcfad2a..f8ad493 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -55,6 +55,7 @@ enum {
VIR_RESUMED,
VIR_STOPPED,
VIR_UPDATED,
+ VIR_PMSUSPENDED,
LAST_SIGNAL
};
@@ -225,6 +226,16 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
G_TYPE_NONE,
0);
+ signals[VIR_PMSUSPENDED] = g_signal_new("pmsuspended",
+ G_OBJECT_CLASS_TYPE(object_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
+ G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
+ G_STRUCT_OFFSET(GVirDomainClass, pmsuspended),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
g_type_class_add_private(klass, sizeof(GVirDomainPrivate));
}
diff --git a/libvirt-gobject/libvirt-gobject-domain.h b/libvirt-gobject/libvirt-gobject-domain.h
index 7810d1b..fc2db7c 100644
--- a/libvirt-gobject/libvirt-gobject-domain.h
+++ b/libvirt-gobject/libvirt-gobject-domain.h
@@ -66,19 +66,22 @@ struct _GVirDomainClass
void (*resumed)(GVirDomain *dom);
void (*updated)(GVirDomain *dom);
void (*suspended)(GVirDomain *dom);
+ void (*pmsuspended)(GVirDomain *dom);
- gpointer padding[20];
+ gpointer padding[19];
};
typedef enum {
- GVIR_DOMAIN_STATE_NONE = 0, /* no state */
- GVIR_DOMAIN_STATE_RUNNING = 1, /* the domain is running */
- GVIR_DOMAIN_STATE_BLOCKED = 2, /* the domain is blocked on resource */
- GVIR_DOMAIN_STATE_PAUSED = 3, /* the domain is paused by user */
- GVIR_DOMAIN_STATE_SHUTDOWN= 4, /* the domain is being shut down */
- GVIR_DOMAIN_STATE_SHUTOFF = 5, /* the domain is shut off */
- GVIR_DOMAIN_STATE_CRASHED = 6 /* the domain is crashed */
+ GVIR_DOMAIN_STATE_NONE = 0, /* no state */
+ GVIR_DOMAIN_STATE_RUNNING = 1, /* the domain is running */
+ GVIR_DOMAIN_STATE_BLOCKED = 2, /* the domain is blocked on resource */
+ GVIR_DOMAIN_STATE_PAUSED = 3, /* the domain is paused by user */
+ GVIR_DOMAIN_STATE_SHUTDOWN= 4, /* the domain is being shut down */
+ GVIR_DOMAIN_STATE_SHUTOFF = 5, /* the domain is shut off */
+ GVIR_DOMAIN_STATE_CRASHED = 6, /* the domain is crashed */
+ GVIR_DOMAIN_STATE_PMSUSPENDED = 7 /* the domain is suspended by guest
+ power management */
} GVirDomainState;
--
1.7.11.4
12 years, 6 months
[libvirt] [PATCH] build: update gnulib for FreeBSD build
by Eric Blake
* .gnulib: Update to latest, for gcc 4.2 support and fixed FreeBSD tests.
---
Pushing under the build-breaker rule; this fixes the problems I found
on FreeBSD 8.2 during 'make check' with CFLAGS=-g.
* .gnulib b493832...bc8b4e9 (6):
> pselect: reject invalid file descriptors
> select: reject invalid file descriptors
> ptsname: reject invalid file descriptors
> hash-pjw-bare: new module
> manywarnings: cater to more gcc infelicities
> select, poll tests: Make setsockopt invocation effective.
.gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gnulib b/.gnulib
index b493832..bc8b4e9 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit b4938324b7113c9d73f8390d21f3ecbd842e74b9
+Subproject commit bc8b4e9f9d325e01d83e3ddff360a8b7d1f36cb3
--
1.7.11.4
12 years, 6 months
[libvirt] ipv6 related filtering through libvirt interfaces
by R P Herrold
Looking mid page at:
http://libvirt.org/formatnwfilter.html#nwfelemsReservedVars
I see that there are some un-implemented filtering variables
for IPv6. Conspicuously absent is a variable set for the
content handed out by radvd. The changes back at 0.8.0 [Apr
12 2010] seem to be the last time this area was touched
[ The interaction of the dhcpd, a dhcp6d, and the radvd as to
DNS server assignment is also on the horizon with the roll in
of the systemd ]
I used the search tool to look for a current 'ROADMAP' without
getting meaningful results; The 'TODO' page is empty [1]; the
patch queue page seems unmaintained [2]. I cannot find a
'roadmap' posting in my archive this year ;(
With the exhaustion of 'easy' ipv4 space allocations, we are
turning to deploying ipv6 only VM's, but finding that we are
manually maintaining filtering rule sets, rather than handing
them out in the XML configs
Is there movement in this space 'behind the scenes'?
Thank you
-- Russ herrold
[1] http://libvirt.org/todo.html
[2] http://libvirt.org/pending.html
12 years, 6 months