Re: [libvirt] Per user preference file

2010-11-10 Thread Osier Yang
于 2010年11月11日 08:14, Justin Clift 写道: Hi all, Had a thought the other night, about a possible approach to having a "per user" libvirt preferences file. How about, in the user's home directory, we have a single text file, say ".libvirt-prefs", structured something like this: [common] defa

[libvirt] Per user preference file

2010-11-10 Thread Justin Clift
Hi all, Had a thought the other night, about a possible approach to having a "per user" libvirt preferences file. How about, in the user's home directory, we have a single text file, say ".libvirt-prefs", structured something like this: [common] default_uri = qemu+ssh://somehost/system defa

Re: [libvirt] Is there an API for clone?

2010-11-10 Thread Richard W.M. Jones
On Wed, Nov 10, 2010 at 10:42:27AM +, Daniel P. Berrange wrote: > On Wed, Nov 10, 2010 at 09:30:28AM +0800, 黄亮 wrote: > > Hi, guys > > > > I know there is a command "virt-clone", but I couldn't find the > > equivalent API here : http://libvirt.org/html/libvirt-libvirt.html > > So, is there an

Re: [libvirt] [PATCH] virsh: supply long option for -V

2010-11-10 Thread Eric Blake
On 11/10/2010 03:43 PM, Matthias Bolte wrote: > 2010/11/9 Eric Blake : >> * tools/virsh.c (vshParseArgv): Use NULL instead of 0 for pointer, >> and symbolic names for has_arg. Give --version an optional arg. >> (vshUsage): Document this. >> * tools/virsh.pod: Likewise. >> --- >> > > ACK. Thanks;

[libvirt] auto-generating HACKING?

2010-11-10 Thread Eric Blake
Right now, docs/hacking.html.in contains more data than HACKING. Back in March(! - commit d1c754168) the plan was to add a Makefile rule to autogenerate HACKING via some xml filter; but this still hasn't happened. Can anyone with a better skill set than me at setting up xml filters step in and he

Re: [libvirt] [PATCH] esx: Support SMBIOS host mode

2010-11-10 Thread Eric Blake
On 11/10/2010 03:50 PM, Matthias Bolte wrote: > --- > src/esx/esx_vmx.c| 27 ++- > tests/vmx2xmldata/vmx2xml-smbios.vmx |3 +++ > tests/vmx2xmldata/vmx2xml-smbios.xml | 16 > tests/vmx2xmltest.c |2 ++ > test

[libvirt] [PATCH] esx: Support SMBIOS host mode

2010-11-10 Thread Matthias Bolte
--- src/esx/esx_vmx.c| 27 ++- tests/vmx2xmldata/vmx2xml-smbios.vmx |3 +++ tests/vmx2xmldata/vmx2xml-smbios.xml | 16 tests/vmx2xmltest.c |2 ++ tests/xml2vmxdata/xml2vmx-smbios.vmx | 11 +++ tests

Re: [libvirt] [PATCH] virsh: supply long option for -V

2010-11-10 Thread Matthias Bolte
2010/11/9 Eric Blake : > * tools/virsh.c (vshParseArgv): Use NULL instead of 0 for pointer, > and symbolic names for has_arg.  Give --version an optional arg. > (vshUsage): Document this. > * tools/virsh.pod: Likewise. > --- > ACK. Matthias -- libvir-list mailing list libvir-list@redhat.com http

[libvirt] [PATCHv2] maint: avoid remaining sprintf uses

2010-11-10 Thread Eric Blake
* cfg.mk (sc_prohibit_sprintf): New rule. (sc_prohibit_asprintf): Avoid false positives. * docs/hacking.html.in (Printf-style functions): Document the policy. * .x-sc_prohibit_sprintf: New exemptions. * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use virAsprintf instead. * src/uml/uml_d

[libvirt] [PATCH] maint: avoid remaining sprintf uses

2010-11-10 Thread Eric Blake
* cfg.mk (sc_prohibit_sprintf): New rule. (sc_prohibit_asprintf): Avoid false positives. * docs/hacking.html.in (Printf-style functions): Document the policy. * .x-sc_prohibit_sprintf: New exemptions. * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use virAsprintf instead. * src/uml/uml_d

Re: [libvirt] [PATCH] ignore SELinuxSetFilecon error in SELinuxSetSecurityFileLabel if on nfs

2010-11-10 Thread Eric Blake
On 11/10/2010 12:52 PM, Laine Stump wrote: > If virDomainAttachDevice() was called with an image that was located > on a root-squashed NFS server, and in a directory that was unreadable > by root on the machine running libvirtd, the attach would fail due to > an attempt to change the selinux label

[libvirt] [PATCH] ignore SELinuxSetFilecon error in SELinuxSetSecurityFileLabel if on nfs

2010-11-10 Thread Laine Stump
If virDomainAttachDevice() was called with an image that was located on a root-squashed NFS server, and in a directory that was unreadable by root on the machine running libvirtd, the attach would fail due to an attempt to change the selinux label of the image with EACCES (which isn't covered as an

Re: [libvirt] [RFC] Proposed API to support block device streaming

2010-11-10 Thread Adam Litke
On Wed, 2010-11-10 at 13:25 +, Stefan Hajnoczi wrote: > Adam Litke wrote on 09/11/2010 21:17:23: > > +#define VIR_STREAM_PATH_BUFLEN 100 > > PATH_MAX? libvirt seems to use it and 100 will be too short on some > systems. Good point. I will switch to PATH_MAX. > Two additional questions ab

Re: [libvirt] lock manager and libguestfs use (was: Re: RFC [2/3]: The lock manager plugin driver API)

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 05:29:28PM +, Richard W.M. Jones wrote: > On Wed, Nov 10, 2010 at 04:42:01PM +, Daniel P. Berrange wrote: > > On Wed, Nov 10, 2010 at 04:17:13PM +, Richard W.M. Jones wrote: > > > On Wed, Nov 10, 2010 at 03:52:49PM +, Daniel P. Berrange wrote: > > > > The loa

Re: [libvirt] [PATCH v2] qemu: Add flag to force a CDROM eject

2010-11-10 Thread Cole Robinson
On 11/08/2010 02:34 PM, Daniel P. Berrange wrote: > On Mon, Nov 08, 2010 at 02:10:18PM -0500, Cole Robinson wrote: >> QEMU allows forcing a CDROM eject even if the guest has locked the device. >> Expose this via a new UpdateDevice flag, VIR_DOMAIN_DEVICE_MODIFY_FORCE. >> >> This has been requested

Re: [libvirt] lock manager and libguestfs use (was: Re: RFC [2/3]: The lock manager plugin driver API)

2010-11-10 Thread Richard W.M. Jones
On Wed, Nov 10, 2010 at 04:42:01PM +, Daniel P. Berrange wrote: > On Wed, Nov 10, 2010 at 04:17:13PM +, Richard W.M. Jones wrote: > > On Wed, Nov 10, 2010 at 03:52:49PM +, Daniel P. Berrange wrote: > > > The load_drv() method there is to allow the plugin implementation > > > to block it

Re: [libvirt] lock manager and libguestfs use (was: Re: RFC [2/3]: The lock manager plugin driver API)

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 04:17:13PM +, Richard W.M. Jones wrote: > On Wed, Nov 10, 2010 at 03:52:49PM +, Daniel P. Berrange wrote: > > The load_drv() method there is to allow the plugin implementation > > to block its use with a libvirtd that is too old. eg, say we add > > a new API 'foo', a

Re: [libvirt] lock manager and libguestfs use (was: Re: RFC [2/3]: The lock manager plugin driver API)

2010-11-10 Thread Richard W.M. Jones
On Wed, Nov 10, 2010 at 03:52:49PM +, Daniel P. Berrange wrote: > The load_drv() method there is to allow the plugin implementation > to block its use with a libvirtd that is too old. eg, say we add > a new API 'foo', and the plugin implements that API. It wants to > block its use in any libvir

Re: [libvirt] [PATCHv2] rpm: fix /var/lib/libvirt permissions

2010-11-10 Thread Eric Blake
On 11/10/2010 03:04 AM, Daniel Veillard wrote: > On Tue, Nov 09, 2010 at 04:16:47PM -0700, Eric Blake wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=649511 >> >> Regression of forcing 0700 permissions (which breaks guest startup >> because the qemu user can't see /var/lib/libvirt/*.monitor)

Re: [libvirt] [PATCH] Augment bug reporting documentation

2010-11-10 Thread Eric Blake
On 11/10/2010 05:18 AM, Daniel Veillard wrote: > On Wed, Nov 10, 2010 at 11:34:23AM +, Daniel P. Berrange wrote: >> On Wed, Nov 10, 2010 at 11:01:15AM +0100, Daniel Veillard wrote: >>> With some instruction on how to attach useful gdb backtraces > [...] >>> + # ps -o etime,pid `pgrep lib

Re: [libvirt] lock manager and libguestfs use (was: Re: RFC [2/3]: The lock manager plugin driver API)

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 03:01:01PM +, Richard W.M. Jones wrote: > [Resurrecting this old thread which has just been brought to my attention] > > On Fri, Sep 10, 2010 at 05:00:52PM +0100, Daniel P. Berrange wrote: > > > > typedef struct _virLockManagerDriver virLockManagerDriver; > > typedef v

[libvirt] Qemu implementation of block device streaming

2010-11-10 Thread Adam Litke
commit 4357b2699104b3058c08af6e94b113e69701d3c2 Author: Adam Litke Date: Wed Nov 3 13:40:53 2010 -0500 stream-qemu-support diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index dbde9e7..f712917 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13143,6 +13143

Re: [libvirt] Startup/Shutdown scripts for KVM Machines in Debian (libvirt)

2010-11-10 Thread Guido Günther
On Wed, Nov 10, 2010 at 10:35:40AM +0200, Avi Kivity wrote: > On 11/10/2010 10:01 AM, Hermann Himmelbauer wrote: > >Hi, > >I manage my KVM machines via libvirt and wonder if there are any init.d > >scripts for automatically starting up and shutting down virtual machines > >during boot/shutdown of t

Re: [libvirt] First Virsh command Reference Pages online

2010-11-10 Thread Justin Clift
On 11/11/2010, at 1:06 AM, Osier wrote: > update Makefile to help you do it? :-) That would be nice. :) Daniel Veillard has created a new git repository for the DocBook version: http://libvirt.org/git/?p=libvirt-virshcmdref.git;a=summary It's empty right at the moment, but I'll commit the fir

[libvirt] lock manager and libguestfs use (was: Re: RFC [2/3]: The lock manager plugin driver API)

2010-11-10 Thread Richard W.M. Jones
[Resurrecting this old thread which has just been brought to my attention] On Fri, Sep 10, 2010 at 05:00:52PM +0100, Daniel P. Berrange wrote: > > typedef struct _virLockManagerDriver virLockManagerDriver; > typedef virLockManagerDriver *virLockManagerDriverPtr; > > /* Which callbacks are suppor

Re: [libvirt] [RFC] Proposed API to support block device streaming

2010-11-10 Thread Adam Litke
On Wed, 2010-11-10 at 11:33 +, Daniel P. Berrange wrote: > On Tue, Nov 09, 2010 at 03:17:23PM -0600, Adam Litke wrote: > > I've been working with Anthony Liguori and Stefan Hajnoczi to enable data > > streaming to copy-on-read disk images in qemu. This work is working its way > > through peer

Re: [libvirt] "transient" vs "temporary"

2010-11-10 Thread Justin Clift
On 10/11/2010, at 9:59 PM, Daniel P. Berrange wrote: > I prefer the existing terminology of transient+persistent & don't > think changing it has any real benefit and the downside that since > you can't change all existing content/files out in the wild, we'll > get a mix of temporary vs transient f

Re: [libvirt] [PATCH] Fix LXC container console device setup

2010-11-10 Thread Daniel Veillard
On Wed, Nov 10, 2010 at 01:30:07PM +, Daniel P. Berrange wrote: > From: Daniel P. Berrange > > The /dev/console device inside the container must NOT map > to the real /dev/console device node, since this allows the > container control over the current host console. A fun side > effect of this

Re: [libvirt] First Virsh command Reference Pages online

2010-11-10 Thread Osier
- "Justin Clift" wrote: > On 10/11/2010, at 10:03 PM, Daniel P. Berrange wrote: > > Where are you thinking of putting them ? A cut down version of the > content > > would work in the man page, but for the full content, it seems like > a good > > basis for starting a second docbook guide 'L

Re: [libvirt] [RFC] Proposed API to support block device streaming

2010-11-10 Thread Stefan Hajnoczi
Adam Litke wrote on 09/11/2010 21:17:23: > +#define VIR_STREAM_PATH_BUFLEN 100 PATH_MAX? libvirt seems to use it and 100 will be too short on some systems. Two additional questions about how things hang together: Who will be driving migration via the stream API, libvirtd or an external tool

[libvirt] [PATCH] Fix LXC container console device setup

2010-11-10 Thread Daniel P. Berrange
From: Daniel P. Berrange The /dev/console device inside the container must NOT map to the real /dev/console device node, since this allows the container control over the current host console. A fun side effect of this is that starting a container containing a real Fedora OS will kill off your X s

Re: [libvirt] [PATCH] Augment bug reporting documentation

2010-11-10 Thread Daniel Veillard
On Wed, Nov 10, 2010 at 11:34:23AM +, Daniel P. Berrange wrote: > On Wed, Nov 10, 2010 at 11:01:15AM +0100, Daniel Veillard wrote: > > With some instruction on how to attach useful gdb backtraces [...] > > + # ps -o etime,pid `pgrep libvirt` > > +... note the process id from the output >

Re: [libvirt] [PATCH] Augment bug reporting documentation

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 11:01:15AM +0100, Daniel Veillard wrote: > With some instruction on how to attach useful gdb backtraces > > Daniel > > diff --git a/docs/bugs.html.in b/docs/bugs.html.in > index 201705b..560dfa4 100644 > --- a/docs/bugs.html.in > +++ b/docs/bugs.html.in > @@ -78,6 +78,35 @

Re: [libvirt] [PATCH] replace last instances of close()

2010-11-10 Thread Daniel P. Berrange
On Tue, Nov 09, 2010 at 07:43:23PM -0500, Stefan Berger wrote: > I am replacing the last instances of close() I found with VIR_CLOSE() / > VIR_FORCE_CLOSE respectively. > > The first patch of virsh I missed out on previously. > > The 2nd patch I had left out intentionally to look at it more care

Re: [libvirt] "transient" vs "temporary"

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 10:59:32AM +, Daniel P. Berrange wrote: > On Wed, Nov 10, 2010 at 07:29:45PM +1100, Justin Clift wrote: > > Hi all, > > > > While writing up the descriptions for persistent vs transient > > objects (domains, virtual networks, etc), I'm personally finding > > the word "

Re: [libvirt] [PATCH] replace last instances of close()

2010-11-10 Thread Stefan Berger
On 11/10/2010 05:41 AM, Daniel P. Berrange wrote: On Tue, Nov 09, 2010 at 07:43:23PM -0500, Stefan Berger wrote: I am replacing the last instances of close() I found with VIR_CLOSE() / VIR_FORCE_CLOSE respectively. The first patch of virsh I missed out on previously. The 2nd patch I had left o

Re: [libvirt] First Virsh command Reference Pages online

2010-11-10 Thread Justin Clift
On 10/11/2010, at 10:03 PM, Daniel P. Berrange wrote: > Where are you thinking of putting them ? A cut down version of the content > would work in the man page, but for the full content, it seems like a good > basis for starting a second docbook guide 'Libvirt Administrators Guide', > as a counte

Re: [libvirt] "transient" vs "temporary"

2010-11-10 Thread Justin Clift
On 10/11/2010, at 10:17 PM, Daniel P. Berrange wrote: > Rather than change the terminology, I think it is more helpful > to expand the glossary describing what terminology actually > means, because neither transient or temporary on their own are > sufficient to explain what's happening. > > Expan

Re: [libvirt] [PATCHv2] rpm: fix /var/lib/libvirt permissions

2010-11-10 Thread Daniel Veillard
On Tue, Nov 09, 2010 at 04:16:47PM -0700, Eric Blake wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=649511 > > Regression of forcing 0700 permissions (which breaks guest startup > because the qemu user can't see /var/lib/libvirt/*.monitor) was > introduced in commit 66823690e, as part of lib

Re: [libvirt] RH EL5 test failure on interfaceshematest and xencapstest

2010-11-10 Thread Andy Howell
On 11/08/2010 03:31 PM, Matthias Bolte wrote: > 2010/11/8 Eric Blake : >> On 11/06/2010 01:30 PM, Andy Howell wrote: >>> >>> I'm trying to build a new RPM for libvirt-0.8.5. Two tests are failing: >>> >>> interfaceschematest >>> xencapstest >>> >>> Are these known errors? Any work-arounds? >> >

Re: [libvirt] race condtion in getting VNC port for libvirt

2010-11-10 Thread Guangya Liu
Thanks Daniel for the info. But I still have a question, since we already make the call qemudDomainCreate synced, why do we need to introduce a bitmap to resolve the problem of getting VNC port conflict error? If qemudDomainCreate is synced, then there should not any problem with VNC port.

[libvirt] [PATCH] Augment bug reporting documentation

2010-11-10 Thread Daniel Veillard
With some instruction on how to attach useful gdb backtraces Daniel diff --git a/docs/bugs.html.in b/docs/bugs.html.in index 201705b..560dfa4 100644 --- a/docs/bugs.html.in +++ b/docs/bugs.html.in @@ -78,6 +78,35 @@ + If the bug leads to a tool linked to libvirt crash, then the

Re: [libvirt] "transient" vs "temporary"

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 07:29:45PM +1100, Justin Clift wrote: > Hi all, > > While writing up the descriptions for persistent vs transient > objects (domains, virtual networks, etc), I'm personally finding > the word "temporary" seems a better fit than "transient". > > Is there anything particula

Re: [libvirt] process= support for 'qemu-kvm -name' [Bug 576950]

2010-11-10 Thread Daniel P. Berrange
On Tue, Nov 09, 2010 at 01:41:43PM -0500, John Morrissey wrote: > On Wed, Oct 20, 2010 at 10:34:00AM +0200, Daniel Veillard wrote: > > Looks just fine, applied and pushed ! > > Was just working on some changes for qemu; looking at this fresh made me > notice I'd overlooked the unnecessary quotin

Re: [libvirt] [RFC] Proposed API to support block device streaming

2010-11-10 Thread Daniel P. Berrange
On Tue, Nov 09, 2010 at 03:17:23PM -0600, Adam Litke wrote: > I've been working with Anthony Liguori and Stefan Hajnoczi to enable data > streaming to copy-on-read disk images in qemu. This work is working its way > through peer review and I expect it to be upstream soon as part of the support > f

Re: [libvirt] Is there an API for clone?

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 09:30:28AM +0800, 黄亮 wrote: > Hi, guys > > I know there is a command "virt-clone", but I couldn't find the > equivalent API here : http://libvirt.org/html/libvirt-libvirt.html > So, is there an API to clone an existing VM or not? The virt-clone tool is implemented by runn

Re: [libvirt] [PATCH] qemu: Fix non-literal format string

2010-11-10 Thread Daniel Veillard
On Tue, Nov 09, 2010 at 11:10:57AM +0100, Jiri Denemark wrote: > --- > src/qemu/qemu_conf.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > Pushed as a trivial build breaker. Argh, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/

Re: [libvirt] First Virsh command Reference Pages online

2010-11-10 Thread Daniel P. Berrange
On Wed, Nov 10, 2010 at 04:03:16AM +1100, Justin Clift wrote: > Hi all, > > Started work on a Virsh "Command Reference" a few days ago, > as a way to "Officially Document" (!) the many virsh commands. > > My plan is to add to the commands here as I work on related > sections. So, as I'm working

Re: [libvirt] Startup/Shutdown scripts for KVM Machines in Debian (libvirt)

2010-11-10 Thread Osier Yang
于 2010年11月10日 16:35, Avi Kivity 写道: On 11/10/2010 10:01 AM, Hermann Himmelbauer wrote: Hi, I manage my KVM machines via libvirt and wonder if there are any init.d scripts for automatically starting up and shutting down virtual machines during boot/shutdown of the host? Writing this for myself s

Re: [libvirt] "transient" vs "temporary"

2010-11-10 Thread Daniel Veillard
On Wed, Nov 10, 2010 at 11:07:51PM +1100, Justin Clift wrote: > On 10/11/2010, at 9:59 PM, Daniel P. Berrange wrote: > > > I prefer the existing terminology of transient+persistent & don't > > think changing it has any real benefit and the downside that since > > you can't change all existing cont

Re: [libvirt] Startup/Shutdown scripts for KVM Machines in Debian (libvirt)

2010-11-10 Thread Avi Kivity
On 11/10/2010 10:01 AM, Hermann Himmelbauer wrote: Hi, I manage my KVM machines via libvirt and wonder if there are any init.d scripts for automatically starting up and shutting down virtual machines during boot/shutdown of the host? Writing this for myself seems to be not that simple, as when s

[libvirt] "transient" vs "temporary"

2010-11-10 Thread Justin Clift
Hi all, While writing up the descriptions for persistent vs transient objects (domains, virtual networks, etc), I'm personally finding the word "temporary" seems a better fit than "transient". Is there anything particularly wrong with using "temporary" in this context instead? Thinking that i