Re: [libvirt] [PATCHv2 8/7] snapshot: implement snapshot roots listing in esx

2011-10-05 Thread Matthias Bolte
2011/10/3 Eric Blake ebl...@redhat.com: Commit 9f5e53e introduced the ability to filter snapshots to just roots, but it was never implemented for ESX until now. * src/esx/esx_vi.h (esxVI_GetNumberOfSnapshotTrees) (esxVI_GetSnapshotTreeNames): Add parameter. * src/esx/esx_vi.c

Re: [libvirt] [PATCHv2 9/7] snapshot: simplify esx snapshot name lookup

2011-10-05 Thread Matthias Bolte
2011/10/3 Eric Blake ebl...@redhat.com: No need to request the parent of a snapshot if we aren't going to use it. * src/esx/esx_vi.c (esxVI_GetSnapshotTreeByName): Make parent optional. * src/esx/esx_driver.c (esxDomainSnapshotCreateXML) (esxDomainSnapshotLookupByName,

Re: [libvirt] [PATCHv2 10/7] snapshot: implement snapshot children listing in esx

2011-10-05 Thread Matthias Bolte
2011/10/3 Eric Blake ebl...@redhat.com: It was fairly trivial to return snapshot listing based on a point in the hierarchy, rather than starting at all roots. * src/esx/esx_driver.c (esxDomainSnapshotNumChildren) (esxDomainSnapshotListChildrenNames): New functions. ---  src/esx/esx_driver.c

Re: [libvirt] [PATCH] qemu: Fix migration with dname

2011-10-05 Thread Jiri Denemark
On Tue, Oct 04, 2011 at 08:48:48 -0600, Eric Blake wrote: On 10/04/2011 07:48 AM, Jiri Denemark wrote: IIUC, you are trying to fix this, by making sure that the 'Finish' method encodes the original name in the cookie, not the new name ? Yes, although the complete picture is that

Re: [libvirt] [PATCHv2 11/7] snapshot: optimize vbox snapshot name lookup

2011-10-05 Thread Matthias Bolte
2011/10/4 Eric Blake ebl...@redhat.com: Older VBox required grabbing all snapshots, then looking through them until a name match was found.  But when VBox 3.1 introduced snapshot branching, it also added the ability to lookup a snapshot by name instead of UUID; exploit this for faster snapshot

Re: [libvirt] [PATCH] qemu: Fix migration with dname

2011-10-05 Thread Eric Blake
On 10/05/2011 02:29 AM, Jiri Denemark wrote: Quick questions (from a latecomer to the thread): what happens if I use both the @dname and @dxml arguments? Are we properly requiring that the new name in both arguments match, and rejecting the migration as impossible otherwise (since you can't

Re: [libvirt] [PATCH] qemu: Don't fail virDomainGetInfo if we can't update balloon info

2011-10-05 Thread Eric Blake
On 10/05/2011 08:17 AM, Jiri Denemark wrote: Qemu driver tries to update balloon data in virDomainGetInfo and if it can't do so because there is another monitor job running, it just reports what's known in domain def. However, if there was no job running but getting the data from qemu fails, we

Re: [libvirt] [RFC] security_dac: don't chown iso file

2011-10-05 Thread Laine Stump
On 10/05/2011 06:33 AM, Daniel P. Berrange wrote: On Tue, Oct 04, 2011 at 12:49:03PM -0500, Serge E. Hallyn wrote: Quoting Serge E. Hallyn (serge.hal...@canonical.com): isos are read-only, so libvirt doesn't need to chown them. In one of our testing setups, libvirt uses mirrorred isos. Since

Re: [libvirt] [PATCH 1.5/2] snapshot: use qemu-img on disks in use at time of snapshot

2011-10-05 Thread Laine Stump
On 10/04/2011 07:39 PM, Eric Blake wrote: Once we know which set of disks belong to a snapshot, reverting or deleting that snapshot should visit just those disks, rather than also visiting disks that were hot-plugged in the meantime or skipping disks that were hot-unplugged in the meantime. *

Re: [libvirt] [PATCHv2 8/7] snapshot: implement snapshot roots listing in esx

2011-10-05 Thread Eric Blake
On 10/05/2011 01:52 AM, Matthias Bolte wrote: 2011/10/3 Eric Blakeebl...@redhat.com: Commit 9f5e53e introduced the ability to filter snapshots to just roots, but it was never implemented for ESX until now. * src/esx/esx_vi.h (esxVI_GetNumberOfSnapshotTrees) (esxVI_GetSnapshotTreeNames): Add

Re: [libvirt] [RFC] security_dac: don't chown iso file

2011-10-05 Thread Serge Hallyn
Quoting Laine Stump (la...@laine.org): On 10/05/2011 06:33 AM, Daniel P. Berrange wrote: On Tue, Oct 04, 2011 at 12:49:03PM -0500, Serge E. Hallyn wrote: Quoting Serge E. Hallyn (serge.hal...@canonical.com): isos are read-only, so libvirt doesn't need to chown them. In one of our testing

Re: [libvirt] [PATCH] qemu: Don't fail virDomainGetInfo if we can't update balloon info

2011-10-05 Thread Jiri Denemark
On Wed, Oct 05, 2011 at 08:22:51 -0600, Eric Blake wrote: On 10/05/2011 08:17 AM, Jiri Denemark wrote: Qemu driver tries to update balloon data in virDomainGetInfo and if it can't do so because there is another monitor job running, it just reports what's known in domain def. However, if

Re: [libvirt] [PATCHv2 12/7] snapshot: implement snapshot roots listing in esx

2011-10-05 Thread Eric Blake
On 10/05/2011 02:46 AM, Matthias Bolte wrote: You probably meant vbox and not esx in the subject, didn't you? Yep, noticed that just after I sent the mail. 2011/10/4 Eric Blakeebl...@redhat.com: Commit 9f5e53e introduced the ability to filter snapshots to just roots, but it was never

[libvirt] [RFC PATCHv2 0/9] DHCP snooping support for libvirt.

2011-10-05 Thread David L Stevens
This series of patches adds DHCP snooping support to libvirt. This version saves leases on disk for restoration after a libvirtd restart and allows selection of different ip_learning methods by setting filter parameter ip_learning to one of any (existing IP learning code) none (static only

[libvirt] [RFC PATCHv2 3/9] reverse sense of address matching

2011-10-05 Thread David L Stevens
This patch changes rules of the form: if ! addr drop accept to: if addr return ... drop The patch adds a mac chain to do a mac address list and separates the arp chain into separate arpmac and arpip chains that can check multiple MAC or IP addresses in any

[libvirt] [RFC PATCHv2 4/9] make default chain policy DROP

2011-10-05 Thread David L Stevens
This patch simplifies the table rules by setting the protocol chains policy to be DROP and removes the explicit -j DROP entries that the protocol rules had previously. It also makes no-other-rarp-traffic.xml obsolete. Signed-off-by: David L Stevens dlstev...@us.ibm.com ---

[libvirt] [RFC PATCHv2 2/9] allow required ARP packets

2011-10-05 Thread David L Stevens
The ARP protocol requires processing of packets that may not be explicitly addressed to a host and only defines request and reply. This patch removes the filtering of ARP requests not explicitly addressed to a VM to allow for proper ARP cache updates for entries based on any traffic and

[libvirt] [PATCHv2 11/7] snapshot: optimize vbox snapshot name lookup

2011-10-05 Thread Eric Blake
Older VBox provided snapshotGet, which looks up by UUID (and where NULL looked up the root) and snapshotFind, which looks up by name. VBox 4.0 consolidated into snapshotFind that looks up by UUID or name (and NULL still looks up the root). But since name lookup has always been present, we don't

[libvirt] [RFC PATCHv2 7/9] support variable value changing

2011-10-05 Thread David L Stevens
This patch adds a function that applies or deletes filter rules to existing chains. Rules referencing the given variable are instantiated with the given value, or optionally deleted. For example, passing variable IP with different values will install rules using the IP variable with each of the

[libvirt] [RFC PATCHv2 1/9] support continue/return

2011-10-05 Thread David L Stevens
This patch adds support for continue and return actions in filter rules. Signed-off-by: David L Stevens dlstev...@us.ibm.com --- src/conf/nwfilter_conf.c |8 ++-- src/conf/nwfilter_conf.h |2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[libvirt] [RFC PATCHv2 5/9] allow chain modification

2011-10-05 Thread David L Stevens
This patch adds the internal capability to add rules to existing chains instead of using temporary chains and to generate placeholders for chains that are referenced without generating a rule for them immediately. Finally, it includes variable matching for filter instantiation (i.e.,

Re: [libvirt] [RFC PATCHv2 4/9] make default chain policy DROP

2011-10-05 Thread Daniel P. Berrange
On Wed, Oct 05, 2011 at 08:08:49AM -0700, David L Stevens wrote: This patch simplifies the table rules by setting the protocol chains policy to be DROP and removes the explicit -j DROP entries that the protocol rules had previously. It also makes no-other-rarp-traffic.xml obsolete. This

[libvirt] [RFC PATCHv2 6/9] support addRules

2011-10-05 Thread David L Stevens
This patch adds the capability of adding individual rules to existing chains. Signed-off-by: David L Stevens dlstev...@us.ibm.com --- src/conf/nwfilter_conf.h |6 ++ src/nwfilter/nwfilter_ebiptables_driver.c | 73 + 2 files changed, 79

Re: [libvirt] [RFC PATCHv2 4/9] make default chain policy DROP

2011-10-05 Thread Daniel P. Berrange
On Wed, Oct 05, 2011 at 09:04:11AM -0700, David Stevens wrote: Daniel P. Berrange berra...@redhat.com wrote on 10/05/2011 08:43:45 AM: This sounds like it is introducing a backwards compatibility problem wrt older libvirt deployments using NW Filters. I don't think so. Again, only if

Re: [libvirt] [RFC PATCHv2 3/9] reverse sense of address matching

2011-10-05 Thread David Stevens
Daniel P. Berrange berra...@redhat.com wrote on 10/05/2011 08:41:56 AM: This looks like it is breaking compatibility of NWFilter XML with previously deployed libvirt releases. I think only if someone has modified the standard filters. Then they would have to apply those modifications

Re: [libvirt] [PATCH 2/2] snapshot: enforce REVERT_FORCE on qemu

2011-10-05 Thread Eric Blake
On 10/04/2011 04:02 PM, Eric Blake wrote: * src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Check for risky situations, and allow force to get past them. ACK. Before pushing this, I'm running some sanity tests. So far, this test sequence (adjusted to the fixed code) shows where force

Re: [libvirt] [PATCH 2/2] snapshot: enforce REVERT_FORCE on qemu

2011-10-05 Thread Eric Blake
On 10/04/2011 04:02 PM, Eric Blake wrote: * src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Check for risky situations, and allow force to get past them. ACK. Before pushing this, I'm running some sanity tests. So far, this test sequence (adjusted to the fixed code) shows where force

[libvirt] [PATCH 0/4] Add support for QEMU guest agent control

2011-10-05 Thread Daniel P. Berrange
The QEMU guest agent /usr/bin/qemu-ga has some handy functions for controlling the guest, not least, shutdown/reboot and filesystem freeze/thaw. In Fedora 15/16 the semantics of the ACPI power button have been changed to suspend-to-RAM which breaks our current shutdown implementation. By

[libvirt] [PATCH 1/4] QEMU guest agent support

2011-10-05 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com There is now a standard QEMU guest agent that can be installed and given a virtio serial channel channel type='unix' source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/ target type='virtio' name='org.qemu.guest_agent.0'/

[libvirt] [PATCH 3/4] Wire up QEMU agent to reboot/shutdown APIs

2011-10-05 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This makes use of the QEMU guest agent to implement the virDomainShutdownFlags and virDomainReboot APIs. With no flags specified, it will prefer to use the agent, but fallback to ACPI. Explicit choice can be made by using a suitable flag *

[libvirt] [PATCH 4/4] Allow choice of shutdown method via virsh

2011-10-05 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Extend the 'shutdown' and 'reboot' methods so that they both accept a new argument --mode acpi|agent * tools/virsh.c: New args for shutdown/reboot * tools/virsh.pod: Document new args --- tools/virsh.c | 42

[libvirt] [PATCH 2/4] Add new virDomainShutdownFlags API

2011-10-05 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add a new API virDomainShutdownFlags and define: VIR_DOMAIN_SHUTDOWN_DEFAULT= 0, VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 0), VIR_DOMAIN_SHUTDOWN_GUEST_AGENT= (1 1), Also define some flags for the reboot API

[libvirt] [PATCH] maint: fix minor issues in virterror public header

2011-10-05 Thread Eric Blake
Consistent use of tabs, fewer long lines, and a typo fix. * include/libvirt/virterror.h: Fix typos, layout. --- Pushing under the trivial rule. include/libvirt/virterror.h | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/libvirt/virterror.h

Re: [libvirt] virsh bash completion file

2011-10-05 Thread Eric Blake
On 10/05/2011 02:17 PM, Serge E. Hallyn wrote: Hi, I've been trying out a bash autocompletion file by Geoff Low (slight hack by me, don't blame him for my hack), and it's working pretty nicely. I'm not sure where to put it in the git tree, but it seems like it'd be nice to have upstream? What

Re: [libvirt] [PATCH] init: raise default system aio limits

2011-10-05 Thread Eric Blake
On 10/04/2011 12:41 PM, Laine Stump wrote: On 10/04/2011 12:59 PM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=740899 documents that if qemu uses aio=native for its disks, then it consumes 128 aio requests per disk. On a host with multiple guests, this can quickly run out of

Re: [libvirt] virsh bash completion file

2011-10-05 Thread Serge E. Hallyn
Quoting Eric Blake (ebl...@redhat.com): While I'd love to see better bash completion support, I think that we should be going about it by fixing virsh to make it easier to query what completions make sense, so I'm not going to spend much time further reviewing this. Of course, others are free

[libvirt] [PATCH] qemu: enable multifunction for older qemu

2011-10-05 Thread Eric Blake
Now that RHEL 6.2 Beta is out, it would be nice to test multifunction devices on that platform. This changes things so that the multifunction cap bit can be set in two different ways: by version comparison (needed for qemu 0.13 which lacked a -device query), and by -device query (provided by

Re: [libvirt] [PATCH 1/4] QEMU guest agent support

2011-10-05 Thread Eric Blake
On 10/05/2011 11:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com There is now a standard QEMU guest agent that can be installed and given a virtio serial channel channel type='unix' source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/

Re: [libvirt] [PATCH 3/4] Wire up QEMU agent to reboot/shutdown APIs

2011-10-05 Thread Eric Blake
On 10/05/2011 11:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com This makes use of the QEMU guest agent to implement the virDomainShutdownFlags and virDomainReboot APIs. With no flags specified, it will prefer to use the agent, but fallback to ACPI. Explicit choice

Re: [libvirt] [PATCH 4/4] Allow choice of shutdown method via virsh

2011-10-05 Thread Eric Blake
On 10/05/2011 11:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Extend the 'shutdown' and 'reboot' methods so that they both accept a new argument --mode acpi|agent * tools/virsh.c: New args for shutdown/reboot * tools/virsh.pod: Document new args ---

Re: [libvirt] [PATCH] qemu: enable multifunction for older qemu

2011-10-05 Thread Laine Stump
On 10/05/2011 05:52 PM, Eric Blake wrote: Now that RHEL 6.2 Beta is out, it would be nice to test multifunction devices on that platform. This changes things so that the multifunction cap bit can be set in two different ways: by version comparison (needed for qemu 0.13 which lacked a -device

[libvirt] [PATCH 1.5/2] qemu: leave rerror policy at default when enospace is requested

2011-10-05 Thread Laine Stump
commit 12062ab set rerror=ignore when error_policy=enospace was selected (since the rerror option in qemu doesn't accept enospc, as the werror option does). After that patch was already pushed, Paolo Bonzini noticed it and commented that leaving rerror at the default (report) would be a better

[libvirt] [PATCHv2 2/2] qemu: add separate rerror_policy for disk errors

2011-10-05 Thread Laine Stump
Previously libvirt's disk device XML only had a single attribute, error_policy, to control both read and write error policy, but qemu has separate options for controlling read and write. In one case (enospc) a policy is allowed for write errors but not read errors. This patch adds a separate

Re: [libvirt] [PATCH] qemu: enable multifunction for older qemu

2011-10-05 Thread Wen Congyang
At 10/06/2011 05:52 AM, Eric Blake Write: Now that RHEL 6.2 Beta is out, it would be nice to test multifunction devices on that platform. This changes things so that the multifunction cap bit can be set in two different ways: by version comparison (needed for qemu 0.13 which lacked a -device