[CentOS-virt] virsh error: driver is not whitelisted

Wed Apr 19 16:52:42 UTC 2017
Johnny Hughes <johnny at centos.org>

On 04/19/2017 10:00 AM, Marco Aurelio L. Gomes wrote:
> Hi,
> 
> I'm using virsh to instance a VM in my environment, but I'm running on
> some issues. 


> I got the following error:
> 
> error: Failed to create domain from domain.xml
> error: internal error: qemu unexpectedly closed the monitor:
> 2017-04-17T17:00:37.012369Z qemu-kvm: -drive
> file=fat:/usr/src/dpdk-stable-16.11.1,if=none,id=drive-virtio-disk1,readonly=on:
> Driver 'vvfat' is not whitelisted
> 
> If I comment the disk that cause this error, the instance starts without
> error. Is there a way to whitelist this vvfat driver to instance this VM?
> 
> And the strange thing about this error is that when I check the
> available drives, there is vvfat in the list:
> 
> /usr/libexec/qemu-kvm -drive format=?
> Supported formats: ftps http null-aio null-co file quorum blkverify
> vvfat blkreplay qed raw qcow2 bochs dmg vmdk parallels vhdx vpc https
> sheepdog host_cdrom ssh host_device nbd gluster qcow iscsi rbd tftp ftp
> vdi blkdebug luks cloop
> 
> Here some information about the environment:
> 
> cat /etc/redhat-release
> CentOS Linux release 7.3.1611 (Core)
> 
> virsh --version
> 2.0.0
> 
> /usr/libexec/qemu-kvm --version
> QEMU emulator version 2.6.0 (qemu-kvm-ev-2.6.0-28.el7_3.6.1), Copyright
> (c) 2003-2008 Fabrice Bellard
> 
> Thanks in advance for the help
> 


If you look here:

https://rwmj.wordpress.com/2015/09/25/virt-v2v-libguestfs-and-qemu-remote-drivers-in-rhel-7/

The things supported by qemu-img and qemu are not necessarily the same.

If you look at the last qemu-kvm.spec file, you can see what is set to
rw and ro:

https://git.centos.org/raw/rpms!qemu-kvm/976a86fff9adb9a2a6968b9f73fe9a615266f59b/SPECS!qemu-kvm.spec

--block-drv-rw-whitelist=qcow2,raw,file,host_device,blkdebug,nbd,iscsi,gluster,rbd


--block-drv-ro-whitelist=vmdk,vhdx,vpc,ssh,https

So, those listed files are the only ones that will work.

You would need to recompile the qemu-kvm RPMs after modifying those
whitelist lines in the spec file if you want to add things to the whitelist.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20170419/3c9c8fdb/attachment-0006.sig>