[libvirt] [PATCH] util: storage: drop VIR_STORAGE_FILE_AUTO_SAFE

Peter Krempa pkrempa at redhat.com
Mon Aug 26 10:30:43 UTC 2019


On Mon, Aug 26, 2019 at 16:59:45 +0800, Yi Li wrote:
> >> merge VIR_STORAGE_FILE_AUTO_SAFE/VIR_STORAGE_FILE_AUTO to VIR_STORAGE_FILE_AUTO
> >> virStorageFileProbeFormatFromBuf will probe the backingStore format.
> >>
> >> Fix the booting issue when setting backingStore format (QCOW image) to RAW image.
> >
> >This description does not really describe what the problem is.
> >
> 
> The Guest VM cann't boot correctly as below:
> 1: Guest VM disk info when shutdown 
> ......
>     <emulator>/usr/libexec/qemu-kvm</emulator>
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='qcow2' cache='directsync' io='native'/>
>       <source file='/vms/images/.transient/f6e5eb8b-7d81-443d-aab0-bb1cca1cf29e'/>
>       <target dev='vda' bus='virtio'/>
>       <boot order='1'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
>     </disk>
> ......
> pls:
> [root@***-130 ~]# qemu-img info /vms/images/.transient/f6e5eb8b-7d81-443d-aab0-bb1cca1cf29e
> image: /vms/images/.transient/f6e5eb8b-7d81-443d-aab0-bb1cca1cf29e
> file format: qcow2
> virtual size: 80G (85899345920 bytes)
> disk size: 15M
> cluster_size: 65536
> backing file: /vms/images/f6e5eb8b-7d81-443d-aab0-bb1cca1cf29e

The image was created without specifying the backing format. Otherwise
you'd get also a:

backing file format: qcow2

Please specify the backing store format explicitly when creating the
overlays e.g. by using the -F option for qemu-img

qemu-img create -f qcow2 -F qcow2 -b /path/to/backing /path/to/overlay

This is the exact situation we want to protect from and thus the only
thing we could consider is completely reject images which don't have an
explicit backing store specified.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190826/2be3c887/attachment-0001.sig>


More information about the libvir-list mailing list