Re: [libvirt] GlusterFS with libvirt

2013-11-29 Thread Daniel Berteaud

Le 28/11/2013 13:55, Umar Draz a écrit :

Hi All,

Is any body help me how I can integrate libvirt with glusterfs on 
Ubuntu 13.10 Server.


I tried the following, but its not working.

qemu-img: Unknown protocol 'gluster://localhost/gv1/test.img'


Looks like native GlusterFS storage pool will be available shortly 
(looks all the recent patches about this). Waiting for this, you can 
always use the fuse client.


Just mount your GlusterFS anywhere on your host (with the fuse client), 
and define a simple dir pool on top of that. This is what I use on 
CentOS 6


Regards, Daniel


--
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Users] Migration issues with ovirt 3.3

2013-10-09 Thread Daniel Berteaud
Le mercredi 09 octobre 2013 à 16:18 +0100, Dan Kenigsberg a écrit :

 
 Since libvirt has been using this port range first, would you open a
 bug on gluster to avoid it?

Already done: https://bugzilla.redhat.com/show_bug.cgi?id=987555

(not using ovirt, but the problem is easy to trigger as soon as you use
GlusterFS and libvirt on the same boxes)

Regards, Daniel

 
 Dan. (prays that Vdsm is not expected to edit libvirt's migration port
 range on installation)
 

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] make docs fails on EL5

2011-11-17 Thread Daniel Berteaud
Le mercredi 16 novembre 2011 à 09:12 +0100, Daniel Berteaud a écrit :
 Le mercredi 16 novembre 2011 à 11:57 +0800, Osier Yang a écrit :
  于 2011年11月16日 11:12, shu ming 写道:
   It seems tit is he same issue as the thread below, the docs can not be 
   generated in some Linux distros.
   It may be caused by the incompatibility of document tools in these 
   distros.
  
   http://www.mail-archive.com/libvir-list@redhat.com/msg47624.html
  
  They are not the same problem if I'm correct, as it seems xhtml1-dtd is
  installed on Daniel's host, (the process broke during generating the
  html files).
  
  And it looks like the error is caused by there is some tags in the html
  is not campatible with W3C, though not sure why it comes.
 
 Not sure if it's relevant, I'm using xhtml1-dtds 1.0-7.1.1 (from the
 base CentOS 5.7 repo)

Nobody else has this error when building on EL5 ? (or maybe nobody
builds latest release of libvirt on EL5). Could this be a problem in my
mock setup ?

Regards, Daniel

 
  
  Regards,
  Osier
 

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] make docs fails on EL5

2011-11-16 Thread Daniel Berteaud
Le mercredi 16 novembre 2011 à 11:57 +0800, Osier Yang a écrit :
 于 2011年11月16日 11:12, shu ming 写道:
  It seems tit is he same issue as the thread below, the docs can not be 
  generated in some Linux distros.
  It may be caused by the incompatibility of document tools in these 
  distros.
 
  http://www.mail-archive.com/libvir-list@redhat.com/msg47624.html
 
 They are not the same problem if I'm correct, as it seems xhtml1-dtd is
 installed on Daniel's host, (the process broke during generating the
 html files).
 
 And it looks like the error is caused by there is some tags in the html
 is not campatible with W3C, though not sure why it comes.

Not sure if it's relevant, I'm using xhtml1-dtds 1.0-7.1.1 (from the
base CentOS 5.7 repo)

 
 Regards,
 Osier

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] make docs fails on EL5

2011-11-15 Thread Daniel Berteaud
Hi.

I usually build all the latest libvirt version on EL5 (CentOS x86_64),
and, up to libvirt 0.9.3, I could get it to build without major issue,
but starting with libvirt 0.9.4, I cannot get the rpm to build (I'm
using a quite simple plague/mock setup), I always have this error:

make[2]: Entering directory `/builddir/build/BUILD/libvirt-0.9.7/docs'
  GENlibvirt-api.xml
  GENhtml/index.html
  GENdevhelp/index.html
./html/libvirt-virterror.html:613: element a: validity error : ID types
already defined
/h3pre#define _virSchedParameter/prep/ph3a name=types
id=types

^
./html/libvirt-virterror.html:843: element a: validity error : ID
functions already defined
/pre/divh3a name=functions
id=functionsFunctions/a/h3h3a name
  ^
make[2]: *** [html/index.html] Error 4
make[2]: Leaving directory `/builddir/build/BUILD/libvirt-0.9.7/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/libvirt-0.9.7'
make: *** [all] Error 2

Can anybody help me with this ?

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: Do not unlink managedsave image if restoring fails.

2011-04-06 Thread Daniel Berteaud
Le mercredi 06 avril 2011 à 16:50 +0800, Daniel Veillard a écrit :
  
  That is, I think:
  
  virsh save dom file
  virsh restore file
  
  should leave file intact if and only if the restore failed, and:
 
   The problem there is that you are changing the command behaviour.
 The user may snapshot the disk separately and use this to implement
 a simplified domain snapshot. Doing the remove may avoid troubles
 for those not knowing what they are doing, but also break something
 for those who know what they are doing.

I completely agree, virsh restore shouldn't remove the saved state. I
often use this and restore several time the same dump, because I
independently save (and restore) the VM disk. I use this as domain
snapshots function because of the current limitations of the snapshot
API (only working for qcow2 image, and I only use LVM for performance
reason, I'm pretty sure a lot of user also use LVM, and would like to
keep the possibility to restore a saved state multiple time).

Regards, Daniel

   In general I would tend to not change the established operation
 behaviour, especially on suddenly removing files owned by the user
 without asking. For managed save that's completely different due to the
 fact the file is owned by libvir, and removing is fine.
 
 Daniel
 

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Hi everyone.

I'm trying to auto-suspend my guests when the host shutdown using the
managedsave function introduced in libvirt 0.8.0.

If I manually managedsave all my guest, then manually start all of the
guest with virsh start guest, everything works as expected, the saved
state is restored.

But there's a problem with the autoboot option:

- I configure a guest to automatically start on host boot (virsh
autostart guest)

- I save this guest (virsh managedsave guest)

- I restart libvirt to simulate a host reboot

The guest is started normally, instead of loading the saved state (and
the saved state is still present
in /var/lib/libvirt/qemu/save/guest.save, which means next manual boot
will probably fails)

So, it looks like there's a difference in the way libvirt starts guests
between autoboot and a manual virsh start.

Anybody else have this issue ?
Is this a known issue ?

I'm running libvirt 0.8.1 on a CentOS 5.5 x86_64 box

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Le mardi 18 mai 2010 à 15:36 +0200, Jiri Denemark a écrit :
 Hi,
 
  I'm trying to auto-suspend my guests when the host shutdown using the
  managedsave function introduced in libvirt 0.8.0.
 
 FYI, I just posted a second version of libvirt-guests init script which seems
 to be doing exactly the same thing...

Yep, I saw that, I've actually written something like this on my own
server (but not very clean for now, that's why I haven't shared it yet)

 
  So, it looks like there's a difference in the way libvirt starts guests
  between autoboot and a manual virsh start.
 
 Ah, yes, the code path is different for both cases :-( This needs to be fixed,
 thanks for spotting it.

If this is fixed, then, the save/restore script could be much more
simple. All it have to do is a managedsave on every running or paused
guest. Then, when libvirt start on host boot, all the guest configured
to autoboot would be started, and restored from the saved state if
available, or normally started.

Guests which have been saved on shutdown, but not configured for
autoboot can stay stpped, until the admin start them manually (and then,
they will be restored from the saved state).

Regards

 
 Jirka

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Le mardi 18 mai 2010 à 14:40 +0100, Daniel P. Berrange a écrit :
 On Tue, May 18, 2010 at 03:15:48PM +0200, Daniel Berteaud wrote:
  
  So, it looks like there's a difference in the way libvirt starts guests
  between autoboot and a manual virsh start.
 
 Yep, there's a design bug in the way this is implemented in the QEMU driver.
 The code that restores the snapshot is in the qemudDomainStart() method,
 rather than qemudStartVMDaemon(). This means that when the guest is 
 autostarted, the snapshot restore is missed. 


Ok, thanks for the clarification. I'll try to look at this, but I don't
think I'll be able to fixe anything ;) so I'll wait a little more.

Regards, Daniel


-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Le mardi 18 mai 2010 à 14:40 +0100, Daniel P. Berrange a écrit :
 On Tue, May 18, 2010 at 03:15:48PM +0200, Daniel Berteaud wrote:
  So, it looks like there's a difference in the way libvirt starts guests
  between autoboot and a manual virsh start.
 
 Yep, there's a design bug in the way this is implemented in the QEMU driver.
 The code that restores the snapshot is in the qemudDomainStart() method,
 rather than qemudStartVMDaemon(). This means that when the guest is 
 autostarted, the snapshot restore is missed. 

btw, there's another bug in the managedsave function I think: it doesn't
honor the save_image_format directive in qemu.conf


Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] snapshots and LVM

2010-05-12 Thread Daniel Berteaud
Le mardi 11 mai 2010 à 19:06 -0400, edison a écrit :


 This new feature sounds cool. I just had a try, found a problem, when
 merging a LVM snapshot:
 lvconvert says:
 Can't merge over open origin volume
 Merging of snapshot snap0 will start next activation.
 
 The origin volume is open by QEMU, although the VM is already
 stoped(by Issuing 'stop' command in QEMU monitor)

Of course, you cannot do this while a VM is running (even stopped). To
revert to a snapshot, you need to destroy the domain, start the snapshot
merge with lvconvert (there's also the possibility to tag several
snapshot, and to revert all of them with a simple lvconvert --merge
@tag). Now, you need to de-activate/re-activate the LV, so the merge can
start (with lvchange -an vg/lv, lvchange -ay vg/lv). Then, libvirt could
restore the state of the domain, associated with the snapshot if the
domain was active at the time it was taken.

Regards

 LVM merging feature doesn't support merge when the origin volume is
 opened? 
 What's the mean of next activation? From the patch
 (http://people.redhat.com/msnitzer/patches/snapshot-merge/lvm2/LVM2-2.02.55/lvm-merge-onactivate.patch),
  looks like lvchange --refresh orig_lvm will active it? I did it, but no 
 way...
 

 
 

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] make check fails on CentOS 5

2010-05-11 Thread Daniel Berteaud
Hi.

I'm using libvirt on a CentOS 5.4 x86_64 host without issue, until
libvirt 0.8.1.

I usually just rebuild the available src rpm with the following args:

--without xen --without xen-proxy \
--without lxc --without vbox --without esx \
--without phyp --without one --without avahi \
--without openvz --without uml

(I only use KVM)

But, with libvirt 0.8.1, the buiild process now include make check, and one of 
the check fails: interfaceschematest

Attached is the full build log, you can see the failure line 1841.

I really don't know how to debug this.

For now, I've just added interfaceschematest to the list of check to skip in 
the spec file
(for i in nodeinfotest daemon-conf seclabeltest interfaceschematest).
With this modification, everything works, and I'm actually using it this way.

Anybody knows why this test fails ?

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com


logbuild.gz
Description: GNU Zip compressed data
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] snapshots and LVM

2010-05-11 Thread Daniel Berteaud
Hi.

I've just tested the snapshot function, which seems to work, but for
now, is limited to qcow2 images.

Are there any plans to add LVM based snapshots ?

I know LVM would have some limitations, but, with recent distribs (F13,
RHEL6 at least), as snapshots can be merged back into the original LV, I
think we could have at least some snapshots function.

Basically, the domain could be paused, then, the memory can be dumped in
a separated file (as a virsh save do), then, all LVM based disks (and
qcow2 based) could be snapshoted, then, the domain could be reloaded
from the saved state. (or even just resumed, if the save function don't
destroy it like a virsh save does)

LVM gives some (a lot of ?) performance improvements over qcow2, and I
think snapshots would be a lot faster (on my tests, it takes 4 or 5
minutes to snapshot a simple ubuntu guest on qcow2, and even longer to
revert).

There would still be some limitations, like:
- check if lvconvert support merging before we create the snapshots
- size of snapshots are fixed, should libvirt monitor the % used, and
auto-grow when needed ?
- there would be no support for snapshot of snapshot

Any thoughts ?

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] snapshots and LVM

2010-05-11 Thread Daniel Berteaud
Le mardi 11 mai 2010 à 13:39 -0400, Chris Lalancette a écrit :
 
 It's certainly something that would be nice to see.  I even have FIXME
 comments in the code about supporting LVM snapshots; I just haven't had
 time to take any look at it.  If you have time/interest, I'd be happy to
 review patches doing it!

I saw your comments in the snapshot code, I was just waiting for
snapshot merging to be available to start talking about LVM snapshot
support (because, without merging, snapshots are not very useful ;))

I'm really interested in this support, because until now, on only use
LVM backends for my guests (mainly for performances, but also because I
find it easier to take live backups).

Unfortunately, my C skills are near 0, so I may help with design and
tests, but not coding.

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] snapshots and LVM

2010-05-11 Thread Daniel Berteaud
Le mardi 11 mai 2010 à 14:14 -0400, Chris Lalancette a écrit :

 Well, it does support merging, to a degree, 

Merging a LVM snapshot back into the original LV is only available since
kernel 2.6.32 (or .33, don't remember), and with some recent version of
device-mapper and lvm2


 though it's an implicit
 feature in the way the other snapshot mechanisms work.  That is, if you
 do something like:
 Base Image - snap1 - snap2 - snap3

That's not possible, LVM doesn't support snpshot of snapshot, but you
can have

Base image - snap1
   - snap2
   - snap3

each snapshot can only be based on the original LV. The idea with LVM
would be to always run the guest on the original LV for this reason (so
we can take a snapshot when we want).

If we want to revert a guest to a snapshot, we have to merge it back
into the original LV. Merging a LVM snapshot back into the original LV
should be almost instantaneous, and preserve all the other snapshots. 

 
 And now delete snap2, the changes from snap2 are automatically merged
 into snap3 to keep snap3 a viable snapshot.
 
 I think we'll have to explicitly do this for LVM (though I'm not sure;
 my experience with LVM snapshotting is 0).
 
 Besides this implicit merging action, do you want/need the ability to
 manually merge snapshots?  What's your use-case, so I can understand
 it better?
 

When I talk about merging a snapshot in LVM (or rollback), it's
equivalent to revert in libvirt snapshot terminology.

Regards


-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] make check fails on CentOS 5

2010-05-11 Thread Daniel Berteaud
Le mardi 11 mai 2010 à 08:24 -0600, Eric Blake a écrit :

 Per HACKING, have you tried 'VIR_TEST_DEBUG=2 ./interfaceschematest'
 from within the tests dir?  Posting that output may give us more hints
 of what to look at next.

Thanks for your reply, attached is the result.

Looks like bridge42.xml, bridge-bond.xml, bridge-vlan.xml,
bridge-no-address.xml and bridge.xml cannot be validated.

Could this be an issue with my xmllint version ?

CentOS 5.4 comes with libxml2-2.6.26-2.1.2.8

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com
  1) interfaceschemadata/ipv6-static-multi.xml... OK
  2) interfaceschemadata/ipv6-autoconf.xml... OK
  3) interfaceschemadata/vlan.xml ... OK
  4) interfaceschemadata/bridge42.xml ... FAILED
xmllint --relaxng 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/../docs/schemas/interface.rng 
--noout 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge42.xml
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge42.xml:5:
 element interface: Relax-NG validity error : Element interface failed to 
validate attributes
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge42.xml:5:
 element interface: Relax-NG validity error : Expecting an element , got nothing
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge42.xml:1:
 element interface: Relax-NG validity error : Element interface failed to 
validate content
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge42.xml:1:
 element interface: Relax-NG validity error : Element interface failed to 
validate attributes
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge42.xml
 fails to validate
  5) interfaceschemadata/bond-arp.xml ... OK
  6) interfaceschemadata/ipv6-local.xml   ... OK
  7) interfaceschemadata/bridge-empty.xml ... OK
  8) interfaceschemadata/ipv6-autoconf-dhcp.xml   ... OK
  9) interfaceschemadata/bridge-bond.xml  ... FAILED
xmllint --relaxng 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/../docs/schemas/interface.rng 
--noout 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-bond.xml
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-bond.xml:1:
 element interface: Relax-NG validity error : Element interface failed to 
validate content
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-bond.xml:1:
 element interface: Relax-NG validity error : Element interface failed to 
validate attributes
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-bond.xml
 fails to validate
 10) interfaceschemadata/bond.xml ... OK
 11) interfaceschemadata/ipv6-static.xml  ... OK
 12) interfaceschemadata/ipv6-dhcp.xml... OK
 13) interfaceschemadata/ethernet-static-no-prefix.xml... OK
 14) interfaceschemadata/ethernet-static.xml  ... OK
 15) interfaceschemadata/bridge-vlan.xml  ... FAILED
xmllint --relaxng 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/../docs/schemas/interface.rng 
--noout 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml:7:
 element interface: Relax-NG validity error : Element interface failed to 
validate attributes
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml:8:
 element vlan: Relax-NG validity error : Did not expect element vlan there
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml:1:
 element interface: Relax-NG validity error : Element interface failed to 
validate content
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml:3:
 element protocol: Relax-NG validity error : Expecting element bond, got 
protocol
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml:3:
 element protocol: Relax-NG validity error : Expecting element vlan, got 
protocol
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-vlan.xml
 fails to validate
 16) interfaceschemadata/bridge-no-address.xml... FAILED
xmllint --relaxng 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/../docs/schemas/interface.rng 
--noout 
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata/bridge-no-address.xml
/root/localdev/libvirt/work/libvirt-0.8.1/tests/interfaceschemadata

Re: [libvirt] small bug in spec file (0.8.0)

2010-04-13 Thread Daniel Berteaud
Le mardi 13 avril 2010 à 10:00 +0100, Daniel P. Berrange a écrit :
 On Mon, Apr 12, 2010 at 11:23:54PM +0200, Daniel Berteaud wrote:

 
 It isn't as hard as it might seem:-) For general reference, if anyone 
 else is wondering about a easy way to make some quick fixes for libvirt
 in GIT, this is a 30 second overview avoiding all the hard bits of GIT...

Many thanks for this step-by-step guide, I'll try to use it next time a
find something I can fixe.

Regards, Daniel (hey, there's a lot of Daniels on this list :D)


 
  0. Set your name  email in GIT if not already done
 
 # git config --global user.name Daniel Berrange
 # git config --global user.email berra...@redhat.com
 
  1. Get a local checkout
 
 # git checkout git://libvirt.org/libvirt.git
 
  2. Create a branch 'misc-fixes' (or whatever name you like) where 
 you'll make your change(s)
 
 # cd libvirt
 # git checkout -b misc-fixes
 
  3. Make your changes...
 
   emacs blah.c foo.c
 
  4. Commit the changed files
 
  git add blah.c foo.c
  git commit
 
  5. Repeat steps 3  4 several times if desired to make a series of changes
 
  6. Send us the change(s)...
 
   a) Either format all changes on the branch as patches
 
  git format-patch master..misc-fixes
  ...manually email the patch files created...
 
   b) Or email the branch directly from git
 
  git send-email -c libvir-list@redhat.com master..misc-fixes
 
 
 Regards,
 Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] small bug in spec file (0.8.0)

2010-04-12 Thread Daniel Berteaud
Hi.

I've downloaded libvirt 0.8.0, and tried to re-build a rpm (on CentOS
5.4 x86_64), and found that there's a small bug in the spec file.

Line 608:

rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu

Should be:

rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc


Without this modification, the package fails to build when LXC is
disabled or not abailable.

(Sorry, I really don't know GIT, and so, cannot provide a clean patch)

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] Security driver on el5

2009-11-14 Thread Daniel Berteaud
Hi.

I'm running libvirt (0.7.2) on a CentOS 5.4 host. It's working quite
well, but only if I configure selinux in permissive mode. I've tried to
build libvirt with selinux enabled, but no matter what I try, it's still
disabled. After some searching, I've found that:

http://article.gmane.org/gmane.comp.emulators.libvirt/12282

- Added a configure.in check for selinux_virtual_domain_context_path()
   and selinux_virtual_image_context_path() and make it disable the
   SELinux driver if these aren't found. These functions are new on
   F11, so we don't want to break build on RHEL-5  earlier Fedora.

Does this means there's no way to get selinux security driver on el5 (or 
anything before fedora 11) ?

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] flush guest page cache and suspend?

2009-11-04 Thread Daniel Berteaud
/vg_virt/wtitv'/
target dev='hda' bus='ide'/
  /disk
  interface type='bridge'
mac address='00:16:3e:57:45:4f'/
source bridge='br1'/
model type='e1000'/
  /interface
  console type='pty'
target port='0'/
  /console
  input type='tablet' bus='usb'/
  graphics type='vnc' autoport='yes'/
/devices
 /domain
 
 TIA,
 .TM.
 
 --
 Libvir-list mailing list
 Libvir-list@redhat.com
 https://www.redhat.com/mailman/listinfo/libvir-list
-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] libvirt: use existing network bridge

2009-10-19 Thread Daniel Berteaud
Le lundi 19 octobre 2009 à 09:14 +0200, Chris Lalancette a écrit :
 Sascha Frey wrote:
  Hi,
  
  I met a problem setting up virt-manager and libvirt:
  
  I want to use an existing customized network bridge with libvirt
  (I need special iptables rules and a custom DHCP setup).
  
  So I created a network definition file like this:
  network
nameNAT/name
bridge name='br-nat' /
  /network
  
  Unfortunately, I'm unable to activate this network, because libvirt
  tries to create the bridge `br-nat' and fails, because it already
  exists:
  
  # virsh net-start NAT
  error: Failed to start network NAT
  error: cannot create bridge 'br-nat': File exists
  
  
  I just want libvirt to attach the guest's tap devices to this existing 
  bridge. I don't want libvirt to manage the network.
  
  Is there any chance to realize this set-up?
  It should work with virt-manager using the graphical wizard.
 
 Yes, just don't define a new network.  To use existing bridges, you just need 
 to
 edit your guest XML files to use something like:
 
 interface type='bridge'
   mac address='00:16:3e:4a:f6:89'/
   source bridge='br0'/
 /interface
 
 Note that configured bridges should also show up in virt-manager, I believe.

Existing bridge shows up in virt-manager when run on the local machine.
If you use a remote connection (at least qemu+ssh), you don't see it,
you need to manually edit the guest XML.

(btw, is this a known problem or a bug ?)

Regards, Daniel



 
-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] USB node devices info

2009-10-05 Thread Daniel Berteaud
Hi there.

I have a problem with USB host device enumeration with libvirt.
I'm running libvirt 0.7.0 on a fully updated CentOS 5.3 (libvirt was
rebuilt unmodified from
http://libvirt.org/sources/libvirt-0.7.0-1.fc11.src.rpm)

I want to pas an USB key to one of my guest. lsusb see it just fine:
(I want to pass the device 13fe:1d23)

Bus 005 Device 001: ID :  
Bus 005 Device 002: ID 046b:ff10 American Megatrends, Inc. 
Bus 004 Device 001: ID :  
Bus 007 Device 001: ID :  
Bus 006 Device 001: ID :  
Bus 008 Device 001: ID :  
Bus 002 Device 006: ID 13fe:1d23 Kingston Technology Company Inc. 
Bus 002 Device 001: ID :  
Bus 001 Device 001: ID :  
Bus 003 Device 001: ID :  
Bus 003 Device 002: ID 413c:2003 Dell Computer Corp. Keyboard

If I create a XML file for this device, I can attach it to my guest with virsh 
attach-device, no problem here.

The problem is that libvirt cannot access the devices informations like pretty 
name, 
vendorID and productID, so for example, virt-manager only see devices with name 
USB Raw Device Access
with  as vendorID and productID.

For example, for this particular USB key:

virsh nodedev-dumpxml usb_device_13fe_1d23_07780BA646FD_0_usbraw
device
  nameusb_device_13fe_1d23_07780BA646FD_0_usbraw/name
  parentusb_device_13fe_1d23_07780BA646FD_0/parent
  capability type='usb_device'
bus0/bus
device0/device
product id='0x'USB Raw Device Access/product
vendor id='0x' /
  /capability
/device


SELinux is in permissive mode.

Anybody have an idea ? Where does libvirt get the info about host device ? 
(/sys ?)

Regards, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Some problem with the save function

2009-09-17 Thread Daniel Berteaud
Le mercredi 16 septembre 2009 à 22:14 +0100, Daniel P. Berrange a
écrit :

 Ok, I'd recommend filing a bug report against libvirt then with at
 least the folowing information
 
  - The guest XML file
  - The guest log from /var/log/libvirt/qemu/$GUEST.log after the
restore failed
  - Edit /etc/libvirt/libvirtd.conf and set
 
  log_level=1
  log_filters=1:libvirt 1:qemu 1:util
  log_outputs=1:file:/var/log/libvirt/daemon.log
 
and then restart libvirtd, and try the save/restore again. Then
upload the log you get to the bug
  - Version of QEMU or KVM used
 
 That ought to help us diagnose the problem futher

Thanks for helping me reporting that ;)
Bug opened: https://bugzilla.redhat.com/show_bug.cgi?id=523916

Should I open separated bug for the other problem reported (save with
qemu user and cat -c) ?

Regards, Daniel

 
 Regards,
 Daniel
-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Some problem with the save function

2009-09-16 Thread Daniel Berteaud
Hi everyone. This is my first post to this list, so excuse me if it's
not the right place to poste info like this.

I've found some problems in qemu_driver.c in the latest versions of
libvirt:

- the first problem was also present in 0.7.0. If we run qemu guests
unprivileged, we cannot use the save function (virsh save
guestname /path/to/file). The reason seems to be that libvirt first
create the destination file to write the header and the XML definition.
The file is owned by root with 600 permission. Then, we ask qemu to
append the dump of the memory (via the migrate exec: call) to this file.
This part doesn't work because the qemu user cannot write to this file.
So we endup with a file which only contains the header and the XML, and
the guest is stoped :/

- 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. This is due to this part in the code (qemu_driver.c):

if (STREQ (prog, raw))
prog = cat;
internalret = virAsprintf(command, migrate \exec:
  %s -c  '%s' 2/dev/null\, prog,
safe_path);

which result in migrate \exec cat -c  safe_path 2/dev/null\

But cat doesn't support the -c argument, so once again, the save fails,
as we end up with a save file which only contains the header and the XML
definition.


Unfortunately, my C knowledge is near 0, so I cannot correct this
myself.


- the third problem, is that restore doesn't work any more. I haven't
dig it yet, but when I try to restore a guest using a saved file
(uncompressed produced under libvirt 0.7.0), I've this error:

virsh restore /tmp/guest.state
error: Failed to restore domain from /tmp/guest.state
error: internal error unable to start guest: 


Nothing interesting in /var/log/libvirt/qemu/guest.log:

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/root USER=root
LOGNAME=root /usr/bin/qemu-kvm -S -M pc -m 2048 -smp 4 -name guest -uuid
37b5937b-eacf-fda6-f4d0-33537d61b414 -monitor
unix:/var/lib/libvirt/qemu/guest.monitor,server,nowait -localtime
-no-reboot -boot c -drive file=/dev/data/guest,if=ide,index=0,boot=on
-drive file=/var/lib/libvirt/iso/boot.iso,if=ide,media=cdrom,index=2
-net nic,macaddr=52:54:00:48:c4:ca,vlan=0,name=nic.0 -net
tap,fd=25,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice
tablet -vnc 127.0.0.1:0 -k fr -vga cirrus -incoming exec:cat


The qemu process eats 100% of CPU during a few seconds, then stops (if I
strace it during this time, I see a lot of error like bad file
descriptor). Anyone have save/restore functions working with 0.7.1 ?



Cheers, Daniel

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Some problem with the save function

2009-09-16 Thread Daniel Berteaud
Le mercredi 16 septembre 2009 à 21:36 +0100, Daniel P. Berrange a
écrit :
 On Wed, Sep 16, 2009 at 05:05:36PM +0200, Daniel Berteaud wrote:
  Hi everyone. This is my first post to this list, so excuse me if it's
  not the right place to poste info like this.
  
  I've found some problems in qemu_driver.c in the latest versions of
  libvirt:
  
  - the first problem was also present in 0.7.0. If we run qemu guests
  unprivileged, we cannot use the save function (virsh save
  guestname /path/to/file). The reason seems to be that libvirt first
  create the destination file to write the header and the XML definition.
  The file is owned by root with 600 permission. Then, we ask qemu to
  append the dump of the memory (via the migrate exec: call) to this file.
  This part doesn't work because the qemu user cannot write to this file.
  So we endup with a file which only contains the header and the XML, and
  the guest is stoped :/
 
 Doh, that's a nice problem. You can work around it by editing
 /etc/libvirt/qemu.conf and telling qemu to run as root:root
 again.  For a real fix we'll need to make the save method 
 run 'fchown' on the file descriptor after writing the header.
 And then fchown it back to root:root once complete, to stop
 any other guest overwriting it.

As I only use the save function in a script, I work around it by
touching the file and chowning it to qemu:qemu before calling save, I
sleep better when my guests runs with less privileges ;)

 
  - 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. This is due to this part in the code (qemu_driver.c):
  
  if (STREQ (prog, raw))
  prog = cat;
  internalret = virAsprintf(command, migrate \exec:
%s -c  '%s' 2/dev/null\, prog,
  safe_path);
  
  which result in migrate \exec cat -c  safe_path 2/dev/null\
  
  But cat doesn't support the -c argument, so once again, the save fails,
  as we end up with a save file which only contains the header and the XML
  definition.
 
 Wierd, I don't know where/when we gained a '-c' arg to cat but it
 looks rather bogus. 

The change is in this patch :
http://libvirt.org/git/?p=libvirt.git;a=commit;h=aec22258ef01d7cf36b031a42d9963b58171707e

 
  - the third problem, is that restore doesn't work any more. I haven't
  dig it yet, but when I try to restore a guest using a saved file
  (uncompressed produced under libvirt 0.7.0), I've this error:
  
  virsh restore /tmp/guest.state
  error: Failed to restore domain from /tmp/guest.state
  error: internal error unable to start guest: 
 
 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  burn.

I haven't upgraded qemu, just libvirt. And I must admit that I don't
really know where and how to debug it, I'm very new to libvirt ;) (and I
really don't know anything in C)

Would just like to know if someone could get it working in 0.7.1, or if
there's a big bug somewhere in this release.

Regards, Daniel

 
 This is something QEMU devs are working on fixing by allowing
 for stable machine ABI (available in Fedora 12), and stable
 pci device addressing (targetted for Fedora 13).
 
 Regards,
 Daniel
-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: dan...@firewall-services.com
Web : http://www.firewall-services.com

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list