[Bug 667986] [NEW] Disk image type defaults to raw since 0.7.5-5ubuntu27.5

EAB 667986 at bugs.launchpad.net
Thu Oct 28 19:50:38 BST 2010


Public bug reported:

Ubuntu 10.04.1 LTS
libvirt-bin 0.7.5-5ubuntu27.6

Since 0.7.5-5ubuntu27.5 (http://www.ubuntuupdates.org/packages/show/253540) the default type of diskimages is RAW.
Before this version the diskimage type was automatically detected.

This new behavior results in boot-failures and head-ages.
After upgrading libvirt-bin and stopping and starting a VM it looked like the qcow2 image was completely unrecoverable. All types of recovery tools were not able to recover most of the data, only some snippets. Converting the qcow2 to RAW worked and it booted directly. So there was nothing wrong with the qcow2 image.
When I checked the kvm-process with ps I found "type=raw" defined for the qcow2 image.

Snippet form virsh dumpxml someVM before:
<disk type='file' device='disk'>
  <driver name='qemu' cache='writethrough'/>
  <source file='/etc/libvirt/qemu/disks/somediskimage.qcow2'/>
  <target dev='vda' bus='virtio'/>
</disk>

Snippet form virsh dumpxml someVM now:
<disk type='file' device='disk'>
  <driver name='qemu' type='raw' cache='writethrough'/>
  <source file='/etc/libvirt/qemu/disks/somediskimage.qcow2'/>
  <target dev='vda' bus='virtio'/>
</disk>

If a file (qcow2 or raw is used) detecting the type of image is very easy:
root at kvm:# file disk0.qcow2 
disk0.qcow2: Qemu Image, Format: Qcow , Version: 2
root at kvm:# qemu-img info disk0.qcow2 
image: disk0.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 8.0G
cluster_size: 4096

Maybe it's better to try to detect the type first, and if that fails use
RAW as default (for blockdevices).

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: libvirt-bin qcow2 raw virsh

-- 
Disk image type defaults to raw since 0.7.5-5ubuntu27.5
https://bugs.launchpad.net/bugs/667986
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.



More information about the Ubuntu-server-bugs mailing list