[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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.

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]