[libvirt-users] re-create disk image file

Eric Blake eblake at redhat.com
Mon Nov 5 21:39:11 UTC 2012


On 11/05/2012 02:19 PM, Joe Linoff wrote:

>> Huh?  The current upstream version of qemu is 1.2; I don't recognize
> the
>> 2.0.12 numbering.
> 
> Sorry about that. It was a typo. The version seems to be 0.12.1.2. from
> running
> 
> $ /usr/libexec/qemu-kvm --version
> QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c)
> 2003-2008 Fabrice Bellard

That sounds like RHEL 6 (or CentOS).


> I see. Thank you for the clear explanation. It appears that the file
> name in the XML and the file name referenced by the fd are different:
> 
> /var/lib/libvirt/images/webdev.img (XML, link, domblklist)
> /tools/vm/images/webdev.img        (filer, fd reference)

Sounds like one resolved symlinks while the other did not.  Maybe it's
worth enhancing libvirt to allow all names that resolve to the same
file, rather than just the exact spelling used?  At any rate, we solved
this.

> 
> I modified the command to use /var/lib/libvirt/images/webdev.img but it
> had a different problem:
> 
> # virsh snapshot-create-as webdev \
>     --no-metadata \
>     --disk-only \
>     --diskspec
> /var/lib/libvirt/images/webdev.img,file=/tools/vm/images/webdev.img1
> error: operation failed: Failed to take snapshot: unknown command:
> 'snapshot_blkdev'
> 
> I don't understand what the message is trying to tell me. Why would
> snapshot_blkdev not be available? Perhaps the version I have is too old?

Alas, your qemu is too old.  Red Had did not ship live disk snapshots in
RHEL 6.3; to get that functionality, you need RHEV 3.0.  Wish I had
better news, but at this point, an in-guest dd to a hot-plugged
alternative disk is the best I can think of, since there's nothing you
can do from the host side without qemu support.

> 
> BTW, I tried the dd option with another guest and it seemed to work.

Hope it works for your guest in question, then.  Good luck.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121105/d06acff7/attachment.sig>


More information about the libvirt-users mailing list