[libvirt] attach-disk (cdrom) requirements

2009-06-11 Thread Francesco Latino
Hello, if the guest is powered off and I run the following command to attach a CD-ROM virsh attach-disk QEmu-fedora-i686-3 myCDROM.iso hdc --driver file --type cdrom --mode readonly I got error: libvir: QEMU error : internal error cannot attach device on inactive domain Is it a requirement

[libvirt] libvirt API to write sectors on a device

2009-05-19 Thread Francesco Latino
Hello,***I am able to compile libvirt samples on my KVM hypervisor. (I edited and recompiled info.c code) *I am creating a sample code to read/write disk devices. With method *virDomainBlockPeek I can** read sectors from a given device attached to a KVM virtual guest.**I am not able to* find an

Re: [libvirt] libvirt API to write sectors on a device

2009-05-19 Thread Francesco Latino
Great ! Thanks a lot ! On Tue, May 19, 2009 at 2:50 PM, Daniel Veillard veill...@redhat.comwrote: On Tue, May 19, 2009 at 02:39:04PM +0200, Francesco Latino wrote: Hello,***I am able to compile libvirt samples on my KVM hypervisor. (I edited and recompiled info.c code) *I am creating

[libvirt] virStorageVolLookupByPath fails with libvir: Storage error : invalid storage volume pointer in no storage vol with matching path

2009-05-19 Thread Francesco Latino
Hello, I have a running KVM virtual guest demo1 with a defined disk at path /guests/mydisk.img. But when I run conn = virConnectOpenReadOnly(NULL); path = /guests/mydisk.img; virStorageVolLookupByPath(conn,path); I got the error ibvir: Storage error : invalid storage volume pointer in no

[libvirt] Re: virStorageVolLookupByPath fails with libvir: Storage error : invalid storage volume pointer in no storage vol with matching path

2009-05-19 Thread Francesco Latino
Solved by myself - I forget to define a storage pool ! Thanks a lot anyway ! On Tue, May 19, 2009 at 6:31 PM, Francesco Latino francesco.lat...@gmail.com wrote: Hello, I have a running KVM virtual guest demo1 with a defined disk at path /guests/mydisk.img. But when I run conn