[libvirt] problem attaching/detaching disk

Shi Jin jinzishuai at yahoo.com
Thu Mar 3 16:41:51 UTC 2011


More information:

If I simply insert this in the XML and call "virsh create",
<disk type='file' device='disk'>
			<driver name='file' type='qcow2'/>
			<source file='/vrstorm/cloud/PrivateAccounts/74d37709b07be4bbae228dfc273e4339/volumes/vol-126'/>
			<target dev='vdb' bus='virtio'/>
			</disk>

 it would fail with 

[cloudadmin at test2 images]$ virsh create vdb.xml 
error: Failed to create domain from vdb.xml
error: internal error unsupported driver name 'file' for disk '<diskname>'

On the other hand, if I change the driver name to 'qemu', not only "virsh create" works, I can also call "virsh detach-disk <vmname> vdb" to detach the disk successfully.

It seems to clear to me that this is a bug in libvirt attach-disk in terms of setting driver name to 'file' instead of 'qemu'.

Shi


      




More information about the libvir-list mailing list