Hide Forgot
Description of problem: cant create snapshot with LVM based image Version-Release number of selected component (if applicable): kvm-qemu-img-83.235.el5 How reproducible: always Steps to Reproduce: 1.Create a LVM based image : qemu-img create -f qcow2 /dev/VolGroup00/image 20G 2.check the image : #qemu-img info /dev/VolGroup00/image image: /dev/VolGroup00/image file format: host_device virtual size: 23G (25098715136 bytes) disk size: 0 3.create a snapshot : # qemu-img snapshot -c helo /dev/VolGroup00/image qemu-img: Could not create snapshot 'helo': -95 (Operation not supported) Actual results: could not create snapshot with LVM based image Expected results: snapshot created successfully Additional info: use qemu-img shipped with RHEL6 ,run same cmd as above,snapshot created successfully.
create a live snapshot can success(in qemu monitor), qemu-img create -f qcow2 /dev/VolGroup00/image qemu-kvm .... -drive file=/dev/VolGroup00/image,index=0,if=virtio,media=disk ...other arguments omitted .... (qemu)savevm first_snap ####### wait for cmd finish (qemu)info sanpshot Snapshot devices: virtio0 Snapshot list (from virtio0): ID TAG VM SIZE DATE VM CLOCK 1 first_snap 4.8M 2011-06-03 15:15:43 00:00:30.604 ####### can see a snapshot created. but if check the image offline,cant see any snapshot. # qemu-img info /dev/VolGroup00/image image: /dev/VolGroup00/image file format: host_device virtual size: 23G (25098715136 bytes) disk size: 0 #qemu-img snapshot -l /dev/VolGroup00/image didn't return a word
(In reply to comment #0) > 2.check the image : > #qemu-img info /dev/VolGroup00/image > image: /dev/VolGroup00/image > file format: host_device > virtual size: 23G (25098715136 bytes) > disk size: 0 The problem is that RHEL 5 always treats block devices as host_device instead of guessing the image format. Therefore the image is treated as raw instead of qcow2, and raw doesn't support snapshots. We can't fix this easily in RHEL 5, internal snapshots are not supported anyway, and RHEL 6 gets it right already. Closing.