[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [fedora-virt] ANNOUNCE: Augeas support added to libguestfs



On Sun, Apr 12, 2009 at 08:38:13AM +0100, Richard W.M. Jones wrote:
> On Sun, Apr 12, 2009 at 08:40:30AM +0200, Ján ONDREJ (SAL) wrote:
> > On Sat, Apr 11, 2009 at 11:41:14PM +0100, Richard W.M. Jones wrote:
> > > http://et.redhat.com/~rjones/libguestfs/guestfs.3.html
> > 
> > I just looked against documentation. Can you build this for Fedora 10 i386?
> > Trying to rebuild your src.rpm in mock, but there an unmet dependencies.
>
> I haven't tried to build it in mock yet, but I can't see any reason
> why it wouldn't work, assuming I didn't miss any other BRs.

Building in mock requires all buildrequires available in an repository.

Do you need some help with building libguestfs and all dependencies for
Fedora?
 
> What are the missing deps?  You need to have febootstrap and a patched
> version of fakechroot (from
> http://et.redhat.com/~rjones/febootstrap/files/).  Everything should
> be covered by the BuildRequires in the src rpm, unless I've missed
> something.

Btw, when installing febootstrap, it requires fakechroot >=
2.9-1.fc11.rwmj3. It's not a good idea to require some "fcXX" in Requires,
try to name your package 2.9.1.rwmj3.fc11.

[root work i386]# rpm -Uhv ../noarch/febootstrap-1.5-1.fc10.noarch.rpm fakechroot-2.9-1.fc10.rwmj3.i386.rpm
fakechroot-libs-2.9-1.fc10.rwmj3.i386.rpm error: Failed dependencies:
        fakechroot >= 2.9-1.fc11.rwmj3 is needed by febootstrap-1.5-1.fc10.noarch

After running rpm with --nodeps, libguestfs 0.8 does not build:

../src/guestfs_protocol.c: In function 'xdr_str':
../src/guestfs_protocol.c:11: warning: unused variable 'buf'
../src/guestfs_protocol.c: In function 'xdr_guestfs_lvm_int_pv':
../src/guestfs_protocol.c:23: warning: unused variable 'i'
../src/guestfs_protocol.c:21: warning: unused variable 'buf'
../src/guestfs_protocol.c: In function 'xdr_guestfs_lvm_int_pv_list':
../src/guestfs_protocol.c:58: warning: unused variable 'buf'
...
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protec
tor --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unw
ind-tables   -o guestfsd guestfsd-augeas.o guestfsd-devsparts.o guestfsd-dir.o g
uestfsd-file.o guestfsd-guestfsd.o guestfsd-ls.o guestfsd-lvm.o guestfsd-mount.o
 guestfsd-proto.o guestfsd-stubs.o guestfsd-sync.o guestfsd-guestfs_protocol.o  
-laugeas
guestfsd-augeas.o: In function `do_aug_load':
/usr/src/rpmbuild/BUILD/libguestfs-0.8/daemon/augeas.c:272: undefined reference to `aug_load'
guestfsd-augeas.o: In function `do_aug_defnode':
/usr/src/rpmbuild/BUILD/libguestfs-0.8/daemon/augeas.c:113: undefined reference to `aug_defnode'
guestfsd-augeas.o: In function `do_aug_defvar':
/usr/src/rpmbuild/BUILD/libguestfs-0.8/daemon/augeas.c:97: undefined reference to `aug_defvar'
collect2: ld returned 1 exit status

Can I disable augeas usage when building rpm?

Btw, where there is no "edit filename" command in guestfish? Something
similar to "virsh edit ...", invoke editor on file downloaded from image and
then store changed filename back.

> > > I guess you understand that libguestfs doesn't work (or at least, not
> > > consistently) with live virtual machines.  You can certainly use
> > > libguestfs to take read-only peeks at the live VM's disk image, but
> > > the results you get won't necessarily be correct.  Although in the
> > > virt-df case, which is similar, in practice the results are fine.
> > 
> > Yes, I know.
> 
> One extra thing I should mention is that I will need to patch qemu to
> make this really safe.  Qemu always tries to open the block devices
> with O_RDWR [actually, I should say that the qemu code is very
> confusing here, but at least this is what I think it does].  I need to
> add a patch to qemu so that we can force it to open a drive in
> O_RDONLY mode, eg:
> 
>   qemu -drive foo,readonly
> 
> And then add the corresponding call guestfs_add_drive_ro.

May be "snapshot" mode helps you. It's similar as readonly mode, only
changes are stored in separate file. There must be enough space on device,
where this files is created to allow all changes. For example:

qemu -drive file=...,if=ide,index=0,snapshot=on

> I guess for the rest what you need is some sort of coordination of
> guestfs & (eg) libvirt.  Send to VM the 'lvcreate -s' command [how?],
> sync, pause it, take snapshot, resume it.  Coordinating that so you
> get something consistent is going to be tricky.

I am using LVM on host machine, so I don't need to send lvcreate command to
VM. Just send sync (is it possible with KVM? For xen it's an xm sysrq s
command), pause it, take snapshot, save memory without stopping (it is a
problem yet) and resume it. Scripts for xen using xen migration to simulate
this.

		SAL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]