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

[libvirt] virsh attach-disk using files and KVM

Currently virsh attach-disk interface only accepts 'file' or 'tap' for
driver type when attaching files as disks.  One can succesfully attach
a file as disk with:

virsh attach-disk <vm> <file> <drive> --driver file --type disk

which generates the following xml which is passed to libvirt:

 <disk type='file' device='disk'>
   <driver name='file' type='raw'/>
   <source file='/images/test02.img'/>
   <target dev='vdc' bus='virtio'/>
   <alias name='virtio-disk2'/>
   <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

Now, if you shutdown the guest and restart, libvirt complains that the
driver type 'file' isn't supported.  This is from
src/qemu/qemu_conf.c:4146 where if the driver name isn't 'qemu' it
rejects the configuration.  

How best to resolve this?  Update qemu_conf.c to accept 'file' type?
update virsh to allow specifying 'qemu' as a driver type for files?

Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh us ibm com

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