[Libvir] Proposal: More script hooks for interface type='ethernet'

2008-02-23 Thread Charles Duffy
I have a few issues with interface type='ethernet': - The requirement that either (1) the tap device already exists and has a constant name, or (2) the tap device can be created by the current user without privilege escalation doesn't work for places where the user wants to -

[Libvir] Re: Proposal: More script hooks for interface type='ethernet'

2008-02-24 Thread Charles Duffy
Daniel P. Berrange wrote: Being able to specify an qemu-ifdown script is reasonable, since we already support an qemu-ifup script, but I don't want to just add that without a clearer understanding of exactly what type of network config you are trying to achieve. So rather than describing a

[Libvir] Re: RFC: Supporting serial parallel ports for QEMU (and improving Xen)

2008-02-26 Thread Charles Duffy
Daniel P. Berrange wrote: Lots of difficult bits, but I'm starting to get onto coding it. Was this ever completed and merged? I don't see it documented at http://libvirt.org/format.html -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[Libvir] iptables masquerade rule overexpansive

2008-03-27 Thread Charles Duffy
On my system, libvirt-0.4.0-2ubuntu6 added the following rule to allow my virtual hosts NATted access to the outside world: Chain POSTROUTING (policy ACCEPT 33904 packets, 2146K bytes) pkts bytes target prot opt in out source destination 779 102K MASQUERADE all

[Libvir] [PATCH] Re: iptables masquerade rule overexpansive

2008-03-27 Thread Charles Duffy
Daniel P. Berrange wrote: Instead of having the separate ACCEPT rule I think it would be sufficient to replace the 0.0.0.0/0 target with ! 192.168.65.0/24, eg iptables -t nat -A POSTROUTING --source 192.168.65.0/24 --destination ! 192.168.65.0/24

[libvirt] Support for passing arbitrary qemu/kvm admin console commands?

2008-06-02 Thread Charles Duffy
I'm looking at building a framework which makes use of KVM's pseudo-migration support for snapshot management. To my knowledge, this functionality is not presently available through libvirt. Is it possible to send arbitrary qemu/kvm admin console commands to a VM started and controlled by

Re: [libvirt] Support for passing arbitrary qemu/kvm admin console commands?

2008-06-03 Thread Charles Duffy
Richard W.M. Jones wrote: On Mon, Jun 02, 2008 at 07:47:52PM -0500, Charles Duffy wrote: I'm looking at building a framework which makes use of KVM's pseudo-migration support for snapshot management. To my knowledge, this functionality is not presently available through libvirt

Re: [libvirt] [PATCH] qemudDomainCreate: also check uuid

2008-07-30 Thread Charles Duffy
Daniel Veillard wrote: Are you disagreeing with the message (which your patch doesn't fix) or with the semantic of the check (and then why allow to create a domain reusing the UUID of another defined but not running domain, I can only see confusion or security problems in doing so) The act

Re: [libvirt] [PATCH] qemudDomainCreate: also check uuid

2008-07-30 Thread Charles Duffy
Blerg; the more complex patch I provided was dangerously wrong. Just applying the one that corrects the message WORKSFORME. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] Minor doc tweaks

2008-07-31 Thread Charles Duffy
Per subject; clarifies the distinction between virDomainCreateLinux and virDomainDefineXML+virDomainCreate, and adds documentation for the autoport display attribute. diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 70b9c4a..7177965 100644 --- a/docs/formatdomain.html.in

Re: [libvirt] networking

2008-08-19 Thread Charles Duffy
James Bardin wrote: I'm not sure where to set this up, but I have a bridged device br0 that I would like to have available in virt-manager/virsh. Right now, I can edit the VM's xml interface element manually to use br0. AFAIK, you're doing the right thing (as long as you're doing a dump-xml

[libvirt] [PATCH] set cache=off on -disk line in qemu driver if shareable/ (but not readonly/) is set.

2008-11-01 Thread Charles Duffy
As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior. Comments? diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 03b14f8..47c407a 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -960,13 +960,15

[libvirt] libvirt 0.6.4: Confusing error message during virDomainRestore() if network not started

2009-07-01 Thread Charles Duffy
Howdy, 'yall -- I found myself scratching my head for a few minutes trying to start a VM image via virDomainRestore(). Looking through the header definition in the XML, it read as follows: interface type=network mac address=00:15:3d:49:ec:0e/ source network=fvte-MIXED-DEFAULT/

Re: [libvirt] Save and restore with KVM!

2009-07-06 Thread Charles Duffy
It would be very helpful if you included your domain description -- not all hardware supported by KVM is save/restore compatible. If you're using SCSI disk drives, for instance, that would explain the breakage; virtio has similar problems for many versions of kvm (not sure about the one you're

Re: [libvirt] turn off dnsmasq

2009-07-08 Thread Charles Duffy
I happen to have an outstanding ticket complaining that leaving out the dhcp/ tag disables dnsmasq _entirely_ (DNS as well as DHCP), rather than merely disabling its DHCP support, and looking at the libvirt source appears to confirm that dnsmasq should not get started if no DHCP ranges are

Re: [libvirt] virsh migrate with libvirt-0.5.1: failed to start listening VM

2009-07-14 Thread Charles Duffy
Scott Baker wrote: You're supposed to have /var/lib/libvirt/images mounted via shared storage (nfs/cifs/etc) on both machines. I've heard of folks having trouble doing live migration over NFS -- something with stronger concurrency guarantees (GFS, a shared iSCSI or FC mount [possibly with

Re: [libvirt] [PATCH 0/8] Various KVM PCI device assignment improvements

2009-08-14 Thread Charles Duffy
Mirko Raasch wrote: How can i use valgrind or some other debugging options with /etc/init.d/libvirt-bin? This won't work for valgrind, but the gdb attach command will let you connect to (and thus get a stack trace from) a running process. If your libvirtd has PID 12054, for instance: $ gdb

Re: [libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-28 Thread Charles Duffy
If CPU time is one of the major disincentives towards use of compression -- any reason lzop wasn't included? $ time lzop ramsave ramsave.lzo real0m13.515s user0m7.500s sys 0m1.340s $ time gzip -c ramsave ramsave.gz real0m46.327s user0m37.690s sys 0m1.360s $ ls -lh

[libvirt] race between qemu monitor startup and blocking migrate -incoming

2009-08-28 Thread Charles Duffy
Howdy, 'yall. I'm having issues with virDomainRestore failing, particularly under load -- even in 0.7.0, when there's no need to parse through qemu's output to find the monitor PTY. Digging through strace output of libvirtd and the qemu processes it spawns, this is happening when qemu

Re: [libvirt] Re: [PATCH] also allow use of XZ for Qemu image compression

2009-09-09 Thread Charles Duffy
Jim Meyering wrote: Good point about it being one of the fastest. I shouldn't have mentioned the subjective popular. Usefulness trumps that. I suppose Daniel, Cc'd, will decide. Per off-list discussion with DV, I'm providing some numbers. Sort order is space used on disk, lowest to highest,

Re: [libvirt] Re: [PATCH] also allow use of XZ for Qemu image compression

2009-09-09 Thread Charles Duffy
[Pardon the repost -- fixed the table formatting in this version] Jim Meyering wrote: Good point about it being one of the fastest. I shouldn't have mentioned the subjective popular. Usefulness trumps that. I suppose Daniel, Cc'd, will decide. Per off-list discussion with DV, I'm providing

[libvirt] [PATCH] Reintroduce lzop compression

2009-09-09 Thread Charles Duffy
From 3c4f6568623ed420a9e71da33b9ce74abda289a8 Mon Sep 17 00:00:00 2001 From: Charles Duffy charles_du...@dell.com Date: Wed, 9 Sep 2009 15:53:25 -0500 Subject: [PATCH] Reintroduce support for lzop compression lzop was removed due to some confusion over whether it provided functional advantages

Re: [libvirt] Re: [PATCH] also allow use of XZ for Qemu image compression

2009-09-10 Thread Charles Duffy
Jim Meyering wrote: Daniel Veillard wrote: Hum, I realize that support of LZOP was added after 0.7.0, so we never made a release with it (well except for git snapshot which may have been pushed). I wonder if the best is not to just drop the lzop option altogether and stick xz as a package

Re: [libvirt] Some problem with the save function

2009-09-17 Thread Charles Duffy
Daniel Berteaud wrote: - the second problem is present since libvirt 0.7.1. Now that the saved file can be compressed, it seems we cannot save in a raw format any more. Yeeowch. How's this for a fix? From b0673955435ca0c441a536b05216497f68f41be0 Mon Sep 17 00:00:00 2001 From: Charles Duffy

Re: [libvirt] Some problem with the save function

2009-09-17 Thread Charles Duffy
Daniel P. Berrange wrote: Hmm, bad error message :-( We might also need todo a chown() in the restore path to allow QEMU to read it. NB there is no compatability between QEMU version, so if you have upgraded your install of QEMU between the time you saved restored it is very likely to crash

Re: [libvirt] Some problem with the save function

2009-09-18 Thread Charles Duffy
On Fri, Sep 18, 2009 at 1:53 AM, Chris Lalancette clala...@redhat.comwrote: diff --git a/src/qemu_driver.c b/src/qemu_driver.c index a65334f..ff30421 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -3912,10 +3912,15 @@ static int qemudDomainSave(virDomainPtr dom,

Re: [libvirt] Some problem with the save function

2009-09-18 Thread Charles Duffy
be able to generate should a codepath allow a variable be used uninitialized. Does the below (creating a new code block and declaring both variables there) work for everyone? From c106334d8b41926ce5b6ef0917277091f3e1378e Mon Sep 17 00:00:00 2001 From: Charles Duffy charles_du...@dell.com Date: Thu, 17

[libvirt] Miscellaneous fixes to build with -Werror

2009-09-23 Thread Charles Duffy
HACKING suggests compiling with --enable-compile-warnings=error before submitting any patches; however, current master fails for me on this account (CentOS 5.3; gcc 4.1.2). Please see attached. I suspect most of these should be uncontroversial -- but wonder if perhaps virStrcpy uses would be

[libvirt] Unable to read QEMU help output: Interrupted system call doing virDomainRestore() on current master

2009-09-23 Thread Charles Duffy
Howdy. I've had this issue since yesterday, but avoided reporting it until determining today that it occurs on an unmodified upstream tree as well as my own local branch: $ virsh restore ramsave error: Failed to restore domain from ramsave error: Unable to read QEMU help output: Interrupted

Re: [libvirt] Unable to read QEMU help output: Interrupted system call doing virDomainRestore() on current master

2009-09-23 Thread Charles Duffy
Charles Duffy wrote: $ virsh restore ramsave error: Failed to restore domain from ramsave error: Unable to read QEMU help output: Interrupted system call This happens immediately (no delay) and only on restore; virsh start behaves as usual. To be explicit (as I wasn't earlier

[libvirt] Race between monitor startup and incoming migration impacting libvirt

2009-09-25 Thread Charles Duffy
There appears to be a race condition wherein a 'cont' command sent immediately on qemu startup can prevent a inbound migration specified via -incoming from occurring. libvirt's process for starting up qemu domains with an incoming migration includes with a 'cont' command at the end of

Re: [libvirt] Silently ignored virDomainRestore failures

2009-09-28 Thread Charles Duffy
On Mon, Sep 28, 2009 at 6:43 AM, Daniel P. Berrange berra...@redhat.comwrote: The flaw in QEMU is depressingly obvious static int stdio_pclose(void *opaque) { QEMUFileStdio *s = opaque; pclose(s-stdio_file); qemu_free(s); return 0; } Notice how it completely

Re: [libvirt] Silently ignored virDomainRestore failures

2009-09-28 Thread Charles Duffy
Charles Duffy wrote: What I'm tempted to do is add a command which sends a sigil to stderr to the end of the exec: migration lines specified by libvirt, and wait for either that sigil or an error to show up in the log for that domain before issuing the cont; if my memory is at all correct

Re: [libvirt] Silently ignored virDomainRestore failures

2009-09-29 Thread Charles Duffy
On Tue, Sep 29, 2009 at 4:16 AM, Daniel P. Berrange berra...@redhat.comwrote: Yeah, I've been thinking much the same this morning. I think we should consider what the optimal setup is for our needs long term and try and do whatever we can for that in QEMU now. I think it'd definitely be

[PATCH] Re: [libvirt] Silently ignored virDomainRestore failures

2009-10-01 Thread Charles Duffy
Charles Duffy wrote: For existing QEMU, it might be sufficient to just put an arbitrary 'sleep(5)' before issuing 'cont', which would at least give it a reasonable chance of avoiding the race condition. Well -- I wasn't going to submit the patch I'm now using internally (using

Re: [libvirt] Using libvirt to obtain mac address of virtual domain

2009-10-20 Thread Charles Duffy
Daniel Berteaud wrote: If you need to get the mac address from bash, you can use this: virsh dumpxml myguest | grep 'mac address' | cut -d\' -f2 You'll get one mac address per line (one line per NIC on the guest) An alternate approach which doesn't depend on the specific manner in which the

[RFC] [PATCH] Re: [libvirt] race between qemu monitor startup and blocking migrate -incoming

2009-11-18 Thread Charles Duffy
[ This is also filed in Red Hat's bugzilla at https://bugzilla.redhat.com/show_bug.cgi?id=537938 ] In cases where compression is in use, putting the waitpid() for the decompression tool before the qemudWaitForMonitor() call appears to eliminate the race in question. As much of a cheap hack

Re: [libvirt] define tap-only networking

2009-12-29 Thread Charles Duffy
richard lucassen wrote: Hello list, I'm pretty new to libvirt and I'd like to try to set up simple networking as described here: http://www.xaq.nl/kvm-tap-howto.txt Is it possible to set up networking through simple tap devices using the xml format? And if yes, can someone give me a hint how

[libvirt] [PATCH] document static host IP assignment

2009-02-12 Thread Charles Duffy
Back in August 2008, DV added support for providing static IP/hostname assignments to dnsmasq via host elements in the network definition. Since this functionality isn't covered in the documentation, I wrote up a quick patch, attached. diff --git a/docs/formatnetwork.html.in

[libvirt] libvirt 0.6.1 not playing well with RHEL5.2 lokkit

2009-03-06 Thread Charles Duffy
Howdy. I'm running RHEL5.2, and libvirt 0.6.1. I don't use the distro-provided firewall (system-config-securitylevel-tui-1.6.29.1-2.1.el5) and have it completely disabled, but libvirt appears to be having some trouble ascertaining as much: libvirtd: 14:05:42.807: warning : Failed to read

[libvirt] invalid connection pointer in virConnectClose from Python bindings

2009-03-29 Thread Charles Duffy
Howdy. I'm calling libvirt from a program which occasionally has cause to fork() without an immediate exec(). For the sake of simplicity, I presently call close() on all my virConnect objects [which I then delete] before forking and create new ones later. (I'm not forcing an explicit

Re: [libvirt] Re: [Qemu-devel] [PATCH 1/6] Allow multiple monitor devices (v2)

2009-04-09 Thread Charles Duffy
Avi Kivity wrote: Oh. If the command generates no output (like most), you can't tell when it completes. I suppose we could have qemu print OK after completing a command. FWIW, OpenVPN's monitor interface resolves this by prefixing all notification lines with ''. -- Libvir-list mailing

Re: [libvirt] qemu-kvm-0.10.5, kvm-kmod-2.6.30, libvirt-0.6.4 - save/restore still unreliable

2009-06-12 Thread Charles Duffy
Nikola Ciprich wrote: I wanted to try it using just kvm, but for some reason, I can't figure the proper way to execute it, is the -incoming exec:cat somewhere properly documented? I tried doing cat .../img.vm | qemu-kvm ... -incoming exec:cat but this doesn't seem to be the proper way. That

Re: [libvirt] virDomainDefineXML forbidden for read only access

2009-06-15 Thread Charles Duffy
Kenneth Nagin wrote: I am running an application that invokes the java method virDomainDefineXML. But virDomainDefineXML is throwing the exception forbidden for read only access. I'm running as root. I can successfully define domain xml and create VMs with virsh. Any suggestion of what I

Re: [libvirt] attach-disk (cdrom) requirements

2009-06-15 Thread Charles Duffy
Francesco Latino wrote: Is it a requirement to have the guest running to attach a CDROM ? Is there a way to attache a CDROM to a guest powered off with VIRSH If a machine is powered off, you can attach a CD-ROM by redefining the XML. -- Libvir-list mailing list Libvir-list@redhat.com

[libvirt] qemu-kvm spending time in do_info_migrate () during virDomainSave(); 50ms polling too fa st?

2010-05-03 Thread Charles Duffy
...or more particularly, in ram_bytes_remaining() called by do_info_migrate(); oddly, this is much more pronounced when running with emulator pointing at a shim prepending -no-kvm-irqchip to the invoked command line. This VM was intended to be paused for the save event (if my software was doing

Re: [libvirt] qemu-kvm spending time in do_info_migrate() during virDomainSave(); 50ms polling too fast?

2010-05-03 Thread Charles Duffy
On Mon, May 3, 2010 at 1:48 PM, Matthias Bolte matthias.bo...@googlemail.com wrote: 2010/5/3 Charles Duffy char...@dyfis.net: The question then -- is the 50ms poll in qemuDomainWaitForMigrationComplete (called from qemudDomainSave) perhaps too frequent? What's the libvirt version

[libvirt] [PATCH] dots should be valid characters in interface names

2010-05-19 Thread Charles Duffy
Howdy! I spent some time scratching my head this evening, as libvirt was stripping the target/@dev entry from my interfa...@type='ethernet']. Turns out that this was caused by the interface name containing a period, which is rejected by isValidIfname(). As the kernel allows the creation of

Re: [libvirt] [PATCH v2] dots should be valid characters in interface names

2010-05-19 Thread Charles Duffy
On 05/19/2010 10:05 PM, Laine Stump wrote: On 05/19/2010 10:41 PM, Charles Duffy wrote: The attached one-liner (built against RHEL6b1's libvirt but still applicable against current master as of 10c681622) fixes this issue. I think we need to add : there as well (at least - maybe

Re: [libvirt] [PATCH v3] dots should be valid characters in interface names

2010-05-19 Thread Charles Duffy
On 05/19/2010 11:54 PM, Charles Duffy wrote: A revised patch is attached. This lifts its logic from its kernel counterpart, and is updated only to permit forward slashes (which, while disallowed for interface names with the kernel, are required for *device* names -- for which the ESX driver

Re: [libvirt] [PATCH v4] dots should be valid characters in interface names

2010-05-20 Thread Charles Duffy
On 05/20/2010 09:12 AM, Chris Lalancette wrote: On 05/20/2010 01:06 AM, Charles Duffy wrote: On 05/19/2010 11:54 PM, Charles Duffy wrote: A revised patch is attached. This lifts its logic from its kernel counterpart, and is updated only to permit forward slashes (which, while disallowed

Re: [libvirt] [PATCH v5] dots should be valid characters in interface names

2010-05-20 Thread Charles Duffy
On 05/20/2010 04:45 PM, Eric Blake wrote: On 05/20/2010 03:06 PM, Charles Duffy wrote: Charles, Laine, what do you think about just removing this check completely? WORKSFORME as well. I'm presuming that it's still appropriate to check against an empty string. Does the attached look right

Re: [libvirt] [PATCH v4 0/8]: Add arbitrary qemu command-line and monitor commands

2010-07-09 Thread Charles Duffy
On 07/07/2010 04:33 PM, Chris Lalancette wrote: There is one bug left that I have not yet been able to fix. Because of the complicated way that virsh parses command-line arguments, it is not possible to pass through spaces and quotes when using the qemu-monitor-command. Unfortunately, the qemu